Home   Help Search Login Register  

Author Topic: Errors In Some Scripts???  (Read 430 times)

0 Members and 1 Guest are viewing this topic.

SSgt Shaw M A

  • Guest
Errors In Some Scripts???
« on: 06 Dec 2004, 00:07:08 »
how do all,  ;D, this is my first post here, 1st up, i love this game and the freedom BIS have given me to be a little armchair general, anyways before i start to dribble over keyboard i should get back to what this post is all about. I am making a mission at the moment which uses LustyPoohs GroupEject.SQS Script. This script is a godsend for me as i finally can add some elements of randomness to the mission. Unfortunately though, after the trigger calls the script, the units eject from the helo with no problems but the Freakin helo immediately after the last guy is out proceeds to land about 50-100m away from the trigger and the the units that ejected climb back in.ARRRRGH FUCK :-X.....i have tried every possible combination of move and transport unload waypoints,no good! i`ve tried using wp`s to call the script, no good! as i said the problem doesnt lie with the script not working, its the damn helo calling my guys back. i have posted a similar question on the OPF Forum but its shut down at the moment so i cannot see if any1 has replied.

for the regular OPF geniuses out there, this is the sequence of events....

1. I created two empty BAS MH-60G`s and 2 groups of JAM Soldiers. The Player commands one Squad (Alpha) and AI does the rest. With one of the helos, i also placed two normal pilots, cuz i have a problem making the BAS Soldiers/Pilots work!! ??? n.b:there is no problem with the JAM Soldiers/Pilots/Weapons tho???

2:i named the respective units Alpha & Bravo..Alpha1,2 etc

3:i then used the Movein command for each unit....The Player controls alpha`s helo.

4: i then placed all the appropriate WP`s and Triggers to move about and call the script. no problems so far :)

5:Bravo moves to its WP where i have synchronised it to wait for an EAST not present trigger in the IP. No probs

6: i eliminate all hostiles in the IP, the East not Present trig gets called, Bravo Helo flies in at the right height( i used the Bravo flyinheight command), ejects the troops,

AND LANDS THE FUCKING HELO >:( >:( >:(.....its supposed to go into a 30 second holding pattern then RTB for Radio Call India Trigger.......

what am i doing wrong??? i have trawled the pages of this website and OPF.org and i`m no nearer to my solution than i was three days ago...
someone, anyone please tell me that - you can help me. or that i`m a bigger twit than i thought cuz the answer was in front of my face the whole time...either way i`ll be a happy little Guba.... ok cheers gents.  <1MC>McNuggy ;D

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:Errors In Some Scripts???
« Reply #1 on: 06 Dec 2004, 00:53:55 »
I don't know the workings of groupeject.sqs but my initial guesses are:

1) The ejected units aren't being 'UnassignVehicle'd from the chopper (though I'd have thought this would've been in the script)

2) There's a hint that the pilots and/or the chopper are grouped with the infantry; are they? And do the infantry have independent WPs they can go to after ejecting?

Normally, the infantry would be a separate group to the chopper with their own WPs from the LZ to their objective.

Sorry it's more elimination than solution, but it does sound like the script might be ejecting the 'payload' part of a group who then want to reunite themselves with the 'crew' part of the same group.  But it's late and I could be hallucinating . . .

SSgt Shaw M A

  • Guest
Re:Errors In Some Scripts???
« Reply #2 on: 06 Dec 2004, 01:18:38 »
cheers ace......i`ll have a look in the script to see if the unassign value is there....i`m not that crash hot with writing code so if it is there perhaps you could add the lines that i need to it.....as for the group and the helo....yes they are two seperate groups...Group1(Bravo1-Infantry) and HeloUnit1(BravoBlack_1) do have seperate WP`s.....here is lustys script------------>

Script Invokation :
;   To execute this script you use the following format :
;     [groupid,vehicleid] exec "groupeject.sqs"
;
;   where :
;      groupid : This is the id of the group that you get when you do a group this in one
;      of the group's vehicle Initialization fields.
;      vehiclename is the value of the name field (including quotes) for vehicle you want
;      to have the group eject from
;
; Example :
;    [mygroup,heli1] exec "groupeject.sqs"


; Get the script arguments from the _this variable
_grp = _this select 0
_vehicle = _this select 1

_aunits = units _grp
_i = 0
_j = count _aunits

#Here
(_aunits select _i) action ["EJECT",_vehicle]
_i=_i+1
~1
?_j>_i:goto "Here"

exit


if there is something missing here perhaps you could add the relevant lines of code i need to change.......and a note to lusty.....if by changing/modifying  your script is against the rules please do post and let me know, if i do post this mission for people to play, all credit will be given where credit is due....cheers mcnuggy

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Errors In Some Scripts???
« Reply #3 on: 06 Dec 2004, 03:36:42 »
Try adding this line:

unassignVehicle (_aunits select _i)

Here:

#Here
(_aunits select _i) action ["EJECT",_vehicle]
unassignVehicle (_aunits select _i)
_i=_i+1
~1
?_j>_i:goto "Here"


Hopefully that will work



Planck
« Last Edit: 06 Dec 2004, 03:37:13 by Planck »
I know a little about a lot, and a lot about a little.

SSgt Shaw M A

  • Guest
Re:Errors In Some Scripts???
« Reply #4 on: 06 Dec 2004, 05:40:54 »
 :o :o ;D :D YAY FOR ME.........CHEERS PLANCK.........WAT A LEGEND YOU IS......

FOR THOSE WITH THE SAME PROBLEM I HAD HERES AN UPDATE OF LUSTYPOOHS "GROUPEJECT.SQS" SCRIPT
-----------------------------------------------------------------------------------------------------------
Script Invokation :
;   To execute this script you use the following format :
;     [groupid,vehicleid] exec "groupeject.sqs"
;
;   where :
;      groupid : This is the id of the group that you get when you do a group this in one
;      of the group's vehicle Initialization fields.
;      vehiclename is the value of the name field (including quotes) for vehicle you want
;      to have the group eject from
;
; Example :
;    [mygroup,heli1] exec "groupeject.sqs"


; Get the script arguments from the _this variable
_grp = _this select 0
_vehicle = _this select 1

_aunits = units _grp
_i = 0
_j = count _aunits

#Here
(_aunits select _i) action ["EJECT",_vehicle]
unassignVehicle (_aunits select _i)
_i=_i+1
~1
?_j>_i:goto "Here"

exit
-----------------------------------------------------------------------------------------------------------

OK THANKS AGAIN PLANCK......THANKS ALL AT OFPEC.........