I' m sorry if I gave you that Idea, and I' m glad you are helping me out.
I really tried it. I want it to work and I would be crazy not to try it out!
I also play this mission on my machine first, before trying it on LAN, so it' s the server machine.
here are the three way' s I tried and none seem to work in this mission
; building a lawsoldier in your group
#check
if (WestRecource < 149) then {goto "endmon"}
if (soldierlimit - 1 < 0) then {goto "endsol"}
_group = group player
_pos = getpos player
_soldier= "SoldierWLAW" createunit [_pos,_group]
WestRecource=WestRecource-150;publicvariable "WestRecource"
soldierlimit=soldierlimit-1
#live
~2
?alive _soldier:goto "live"
goto "dead"
#dead
hint "a Law Soldier died"
deletevehicle _soldier
soldierlimit=soldierlimit+1
~0.5
goto "end"
#endmon
hint "not enough money"
exit
#endsol
hint "you can only support 11 men"
exit
#end
exit
(this is the way you advised me too do.. )
; building a aawsoldier in your group
#check
if (WestRecource < 124) then {goto "endmon"}
if (soldierlimit - 1 < 0) then {goto "endsol"}
_group = group player
_pos = getpos player
_soldier= "SoldierWAA" createunit [_pos,_group]
WestRecource=WestRecource-125;publicvariable "WestRecource"
soldierlimit=soldierlimit-1
#live
~2
if (alive _soldier) then {goto "live"} else {goto "dead"}
#dead
hint "an AA Soldier died"
deletevehicle _soldier
soldierlimit=soldierlimit+1
goto "end"
#endmon
hint "not enough money"
exit
#endsol
hint " you can only support 11 men"
exit
#end
exit
this was my first attempt
; building a lawsoldier in your group
#check
if (WestRecource < 149) then {goto "endmon"}
if (soldierlimit - 1 < 0) then {goto "endsol"}
_group = group player
_pos = getpos player
_soldier= "SoldierWLAW" createunit [_pos,_group]
WestRecource=WestRecource-150;publicvariable "WestRecource"
soldierlimit=soldierlimit-1
#live
~2
_dammage = getdammage _soldier
if (_dammage < 1) then {goto "live"} else {goto "dead"}
#dead
hint "a Law Soldier died"
deletevehicle _soldier
soldierlimit=soldierlimit+1
~0.5
goto "end"
#endmon
hint "not enough money"
exit
#endsol
hint "you can only support 11 men"
exit
#end
exit
this was my second and I posted this one on the forum.
I am convinced that all these codes should work.. they all say the same in a different way!
I discovered that after the soldier
really dies, it gets deleted. I also have respawn in this mission and the script prevents them from respawning, just as it was meant to.
The soldierlimit doesn' t seem to function right (soldierlimit + 1)
one extra question, what' s the biggest difference in your code and mine
(I know it' s writtin in a different way:
?this:then and I
IF (this) thenbut it comes down to the same. )What' s the difference flashpoint sees in it?