I am making a basic 3 D 'map editor' and so far it is working . I can read and write to a text file and place the 'blocks' on the map grid . I can add more 'blocks' to the map and text file by loading the file and then adding more 'blocks' and saving . The example below shows how I have been saving the map info (without the comments) . I place a 'block' and then use the 'C' key to enter the new 'block' position and save to the text file at the same time . I am writing to the text file every time I hit the 'C' key . I have been using 'WriteLine' and then 'ReadLine' ..
What I need is a way to delete the last 'block' placed in the text file and it's data ( 5 lines) ..Obviously using Delete removes the 'block' from the map but not from the text file . I can also load and save the map data from 'memblocks' . i need a basic routine to edit the file , from text file or the memblock .
Have I gone in the wrong direction ?
I am learning as I go . I have had AGK2 for about 3 weeks now .
Lance
// Basic example
1 // block number
2 // texture number
3 // X position
-10 // y position
15 // z position
2 // block number **** to remove
4 // texture number **** to remove
6 // x position **** to remove
12 // y position **** to remove
4 // z position **** to remove