Right, im trying to, when an scv builds something, i.e a comand centre, i want it to be removed and another building/multiple units be put on its place, but i just somehow cant do it, can some one please enlighten me, pardon my newbiness, but this is the first map i'm making. thanx in advance!!!
A Map-maker named TriX made a game called 'Bound Defense 2'. Your asking the same thing that he does. In his game with an scv you create a supply depot and it removes it and puts a bunker and your units you selected go into the bunker and it becomes invinsible.
Enough talk i think this trigger should help. (In StarForge Triggering)
Trigger |
Description: |
Removing a building and replacing with building and units |
|
Players: |
¤ Each Human Player (Seperate triggers for each) |
Conditions: |
¤ Bring(Player *, Atleast, 1, CommandCenter, Anywhere); |
Actions: |
¤ RemoveUnitAtLocation(All, CommandCenter, Player *, Anywhere);
|
¤ CreateUnit(1, Building, Where, Player *);
|
¤ CreateUnit(Howmany, Unit, Where, Player *);
|
¤ PreserveTrigger(); |
EDIT: Make More CreateUnit Triggers for however many Units you want to make. Thank you mate, thing is i have some suply depots and comand centres at another location for all the players, for supply depot and technology reasons lol, so wont it affect them aswell?
Hmm...I dont think it should if you have them with seperate triggers.
In TriX's Bound Defense 2 he has supply depots to the side of the maps.
Maybe if you place them as sprites?
ADDITION: Cause on StarForge when you go under Sprite Layer you can click 'Unit' or 'Sprite' ok, il sort that out, but when i build it appears at the middle of the map, not where the comand centre was before.... any idead y?
Do you mean that when you build a command center somewhere the building with the units appear at the middle of the map??
Or do you mean when you build a command center somewhere it appears at the middle of the map.
If you wanna look at TriX's Triggers of how he did it, i suggest you use Trigger Viewer
ADDITION: If you dont have Bound Defence 2 i can get on and let you download it OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO Din't know of a program like this, il look at defence f or something, i got some other maps, thanx mate, u been of extreme help lol FANX!!
ADDITION:
O FFS, I'm still hving trouble though, whenever i build a comand center, it dissapears,(so far so good) reapears as the other building...(great going)...but it reapears at the middle of the map, not where the coman centre was previously at... any ideas on why??? heeelp
You need to center location onto the Command Center and then create the other building on the location centered on the CC or else the building will just spawn in the middle of the map.
Here is a tutorial that is pretty similar to what you are doing.
http://www.staredit.net/index.php?tutorial=51I whipped up this experimental map for ya
You can open it and look at the triggers and locations and such. I think it should answer your questions.
Hopefully
right click; Save Target as...and go under All files and put .scx at the end of the name.
Thanx You Lot problem solved, you have all been of great help! mods you can close this if you want...
You can too. go to the bottom right at the end of the topic and press arrow to click on 'Close This Topic'.
Town wars v3 so ya this map has almost every building changed and you can use this. its not protected just play the map first to know what u want to know b4 you look at the triggers
If there are units all over the map that are the same, what you could do is have a 2x2 or 3x3 location follow the scv and check for a building inside that location. That way, only buildings next to the scv are replaced. Also, you may want to move away the scv so there is room for the building to be built. For example:
Always: Center location 3x3 on scv owned by current player. Preserve trigger.
If current player brings atleast 1 Command Center to 3x3:
Center location (another larger one) on command center owned by current player at 3x3.
Remove command center at (larger location)
Move SCV to somewhere on the map not used.
Create whatever units you need at larger location.
Move SCV back.
Preserve Trigger.