OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Wolf on 30 Jun 2003, 18:40:00
-
Ok, I have a slight problem, in a mission I'm using Toadlifes grouplink script, and and hunt script LCD gave me.
Now, the hunt script seems to work fine when I put it everything together in a demo mission, then I copyed it into my mission. but apon ejecting from the choppers, the men land, and just stay there, now, this is not from the unassignvehicle prob, I have that in, and all works fine in the demo mission, but when added to the actual mision, they just land, group up and stand still.
As a test I put myself in with the squad that is ejected, now the guy in charge is telling them every few seconds to move to the location the target is, to hunt them, but he himself is not moving, making them just stand there with him saying all move to eb 45 every 3 seconds.
This is the script I have from LCD. Can anyone tell me what is wrong, and if it is a conflict with toadlife's grouplink script, how I can still use both?
_unit = _this select 0
_num = _this select 1
_tar = _this select 2
_vari = _this select 3
_if = _this select 4
_group = group _unit
#loop
[_group,_num] setwppos getpos _tar
? _if : [_group,_num+1] setwppos getpos _tar
~5
? ends : exit
goto "loop"
-
try a
"_X stop False"
...command ?!
or try "commandMove" even though you say he tells them to.
-
I'm afraid I don't understand.
I know almost nothing about sripting.
-
can u post da part dat doesnt work - i dont c da oder commands of da units :P ;)
LCD OUT
-
Is this what you mean?
[rg2,1,tar,false] exec "hunt.sqs"
The only thing I don't get, it that is works perfectly in my demo mission, but when in the main mission, the leader of each group just stands whereever he landed and tells his troops to move where the target is.
-
That script is looking for five variables but you are only passing four to it.
-
But then why does it work perfectely in the demo mission with the exact same line?
-
I've always suspected that preview mode works a bit differently than the normal mission mode. The variable that is missing corresponds to the _if variable. Since this is undefined, it will never be true, hence the second setwppos command never gets executed.
-
i just cant remember dis script ::) or wat was suposed 2 b pased 2 it - mebe attach da demo mision ? nd mebe da real not workin thingy ?
or mebe just try passing false ? or mebe true on da last 1 ? ;D
LCD OUT
-
The demo mission is played through the mission editor.
That would not be the reason why.
However, after playing around with the darn thing all day, I've discovered that it does seems to work, only if the target to be hunted, is within 1km, if they are any farther away, they don't want to move.
Even if I'm the leader and tell them to move to the next waypoint a couple km away, they don't move. Its very frustratting.
I don't know, I think scripts just don't friggin like me.
I guess its solved then, thanks for trying to help me.