kaoz
General
inter faesces et urinam nascimur
Posts: 1,112
|
elseif
Jul 26, 2010 13:06:04 GMT 1
Post by kaoz on Jul 26, 2010 13:06:04 GMT 1
For the 1st time i have used the elseif in a lua script. It works. but unfortunately, not correct, strange things happen instead.
Anyone who wants to take a look at the script and help me out? Please pm, thx.
|
|
|
elseif
Jul 27, 2010 21:31:34 GMT 1
Post by danzig70 on Jul 27, 2010 21:31:34 GMT 1
|
|
kaoz
General
inter faesces et urinam nascimur
Posts: 1,112
|
elseif
Jul 28, 2010 14:39:30 GMT 1
Post by kaoz on Jul 28, 2010 14:39:30 GMT 1
thx danzig70!
thx to runrum who noticed my mistake. to share the info, here's what you do:
function Objective1() if (GetNUnitsInArea(0, "Tarasov") <= 0) then ObjectiveChanged(1, 2); RunScript("RevealObjective7", 19000); Suicide(); elseif (GetNUnitsInScriptGroup(207, 1) <=1) then ObjectiveChanged(1, 1); Suicide(); end; end;
it's nice to have a mission that can succeed or fail depending on the player's actions. in my case, i forgot the Suicide(); in blue...
|
|