Home   Help Search Login Register  

Author Topic: Scripting problem.  (Read 1291 times)

0 Members and 2 Guests are viewing this topic.

Wolf

  • Guest
Scripting problem.
« 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"

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Scripting problem.
« Reply #1 on: 30 Jun 2003, 18:47:14 »
try a

   "_X stop False"

...command ?!


or try "commandMove" even though you say he tells them to.
« Last Edit: 30 Jun 2003, 18:48:19 by Tomb »

Wolf

  • Guest
Re:Scripting problem.
« Reply #2 on: 30 Jun 2003, 20:43:22 »
I'm afraid I don't understand.
I know almost nothing about sripting.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Scripting problem.
« Reply #3 on: 01 Jul 2003, 00:29:07 »
can u post da part dat doesnt work - i dont c da oder commands of da units  :P  ;)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Wolf

  • Guest
Re:Scripting problem.
« Reply #4 on: 01 Jul 2003, 01:23:00 »
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.

deaddog

  • Guest
Re:Scripting problem.
« Reply #5 on: 01 Jul 2003, 01:27:52 »
That script is looking for five variables but you are only passing four to it.

Wolf

  • Guest
Re:Scripting problem.
« Reply #6 on: 01 Jul 2003, 01:35:51 »
But then why does it work perfectely in the demo mission with the exact same line?

deaddog

  • Guest
Re:Scripting problem.
« Reply #7 on: 01 Jul 2003, 02:04:28 »
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.


Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Scripting problem.
« Reply #8 on: 01 Jul 2003, 03:05:56 »
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
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Wolf

  • Guest
Re:Scripting problem.
« Reply #9 on: 01 Jul 2003, 03:15:53 »
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.