Hi guys,
In my Command & Conquer scenario I want to have an event on turn 5 (and then copy the code for some other turns too) where some squares convert to green Tiberium.
I thought I'd be 'clever' and take some of the change terrain event code from the original Microprose FW Mars scenario and use it for what I want.. Metropolis also used the same commands in our HoMM scenario. I notice in all cases that there's 4 sets of coordinates all in one line with no spaces. eg..
@IF
TURN
turn=5
@THEN
CHANGETERRAIN
terraintype=4
maprect
112,16,118,16,118,22,112,22
@ENDIF
When I put in the exact same code and didn't touch the coordinates it worked and changed a patch of terrain to the one I wanted (my custom Tiberium one). However I'd like to change individual cells in different parts of the map instead of 1 clump. However when I changed the coordinates to various locations far away from each other it did not work.
I thought that the code simply changed those 4 squares only however on closer inspection I can see that the change terrain code actually changes other squares too but they are in between the 4 specified.. almost like this event is actually a 'fill command' for all cells in between these coordinates.
If that's the case then if I want to do single cells in different parts of the map then I'm going to need to do something different. Is the the 'maprect' subcommand for this 'fill' mode and I need some sort of other command to do individual cells? Or should I just be use the same code but only having one coordinate entry. Then make a copy of the event code for the next cell I want to change meaning I'd end up with heaps of copies of the code block just to change a hand full of cells lol.
If its none of those then I'll need some help or a link to a guide as I just wanted to change single cells in different places at the same time so I need an example of that haha.
In my Command & Conquer scenario I want to have an event on turn 5 (and then copy the code for some other turns too) where some squares convert to green Tiberium.
I thought I'd be 'clever' and take some of the change terrain event code from the original Microprose FW Mars scenario and use it for what I want.. Metropolis also used the same commands in our HoMM scenario. I notice in all cases that there's 4 sets of coordinates all in one line with no spaces. eg..
@IF
TURN
turn=5
@THEN
CHANGETERRAIN
terraintype=4
maprect
112,16,118,16,118,22,112,22
@ENDIF
When I put in the exact same code and didn't touch the coordinates it worked and changed a patch of terrain to the one I wanted (my custom Tiberium one). However I'd like to change individual cells in different parts of the map instead of 1 clump. However when I changed the coordinates to various locations far away from each other it did not work.
I thought that the code simply changed those 4 squares only however on closer inspection I can see that the change terrain code actually changes other squares too but they are in between the 4 specified.. almost like this event is actually a 'fill command' for all cells in between these coordinates.
If that's the case then if I want to do single cells in different parts of the map then I'm going to need to do something different. Is the the 'maprect' subcommand for this 'fill' mode and I need some sort of other command to do individual cells? Or should I just be use the same code but only having one coordinate entry. Then make a copy of the event code for the next cell I want to change meaning I'd end up with heaps of copies of the code block just to change a hand full of cells lol.
If its none of those then I'll need some help or a link to a guide as I just wanted to change single cells in different places at the same time so I need an example of that haha.