Sage Lead Designer of The New Era Expansion Project
Posts : 1226 Reputation : 8 Join date : 2008-08-02 Age : 37 Location : West Haven
| Subject: How to Make Units Build Wed Jul 22, 2009 4:48 pm | |
| Having scriptor open, check a building unit, and add this codes to the unit you are editing.
}
StartBuilding() {
set INBUILDSTANCE to 1; return; }
StopBuilding() { set INBUILDSTANCE to 0; return; }
"Okay just quickly looking at the files...
You need the static-var = building You need this script before any other script =
quote: --------------------------------------------------------------------------------
BuildControl() { while( TRUE ) { if( building AND ( !aiming ) ) { while( pause_loop ) { sleep 100; } call-script build(); } else { sleep 100; } } } --------------------------------------------------------------------------------
Though you can remove the line 'call-script build()' if you want, because that just starts the animation.
Then you need these lines in the 'Create()' section = building = FALSE; start-script BuildControl();
Try these things.
Here's a tip also, if you want to look closely at stuff like this just go to a unit thats sole purpose is to build, so things like Dark Mason and Priestess which have no attacks make the scripts easier to go through compared to looking through a monarch's files for their build scripts." - By Soma
Last edited by KM-Sage on Wed Jul 29, 2009 7:36 pm; edited 3 times in total | |
|
Clay4141
Posts : 498 Reputation : 0 Join date : 2008-08-02
| Subject: Re: How to Make Units Build Thu Jul 23, 2009 9:23 am | |
| This sounds pretty cool! So would I be able to make any unit build? So I could make a spirit wolf, build a hunter? hehe
Imagine the modded scripted map!!!! Start with veteran wolf, create hunters, can res risen wolves! And have to kill the opponent veteran wolf! | |
|