Home   Help Search Login Register  

Author Topic: Arrrggghh! Script frustration  (Read 604 times)

0 Members and 1 Guest are viewing this topic.

Mr.BoDean

  • Guest
Arrrggghh! Script frustration
« on: 25 Jun 2003, 10:36:34 »
Hi all. Okay, so I'm near to completing a mission and I'm using a combination of David Berka's helidrop and heli4drop scripts with (coyote- altered) Paradrop script. Now I tested this on a plain desert map where it worked great over and over. I even have a backup cargo-drop trigger if the heli gets damaged, thanks to some of u guys.
  I then set all of this up in the mission , only changing the names of the vehicles and troops involved. I decided to setFuel 0 for all the helis and vehicles involved. When a trigger goes off, the helis get setpos'ed and fueled and are on their way, troops and cargo in tow. When I first started testing it , it all worked great. I even had it all in one trigger for each heli :
vehicle setFuel 1; release1 = 1; [Echo, heli] exec "paradrop.sqs"

First chopper tested great each time. Then I added other 2 and they worked . Then suddenly, It was really random whether the vehicles would drop or troops would eject. I then tried separate triggers for each event (fuel, vehicle drop, troop eject) , set the timers to 0 and got rid of my heli-damage triggers. I have tried rebooting the game, rebooting the PC , I've tried preview in both regular mission editor and MP mission Editor and now am just frustrated out of my gourd. ::)   :-X

Anyone have experience with these scripts in using multiple choppers? I now even have a separate script for each chopper and corresponding release numbers.   :P

here are the scripts:

; helidrop script by David Berka (David.Berka@nmi.at)

_heli = _this select 0
_car = _this select 1
_chute = _this select 2


#Update

_heliPos = getPos _heli
_heliPosX = _heliPos select 0
_heliPosY = _heliPos select 1
_heliPosZ = _heliPos select 2

_chutePos = getPos _chute
_chutePosX = _chutePos select 0
_chutePosY = _chutePos select 1
_chutePosZ = _chutePos select 2

_chute setPos [_chutePosX, _chutePosY, 300]
_car setPos [_heliPosX, _heliPosY, _heliPosZ - 5]
_heading = getDir _heli
_car setDir _heading
~0.01
? (release1 == 1) : goto "Drop"
goto "Update"


#Drop
_chute setDir _heading

~0.01

_carPos = getPos _car
_carPosX = _carPos select 0
_carPosY = _carPos select 1
_carPosZ = _carPos select 2

_chute setPos [_carPosX, _carPosY, _heliPosZ - 18]

#DropUpdate

_chutePos = getPos _chute
_chutePosX = _chutePos select 0
_chutePosY = _chutePos select 1
_chutePosZ = _chutePos select 2

_car setPos [_chutePosX, _chutePosY, _chutePosZ - 3]
~0.01
? (_chutePosZ > 3) : goto "DropUpdate"


; heli4drop script by David Berka (David.Berka@nmi.at)

_heli = _this select 0
_car = _this select 1
_chute1 = _this select 2
_chute2 = _this select 3
_chute3 = _this select 4
_chute4 = _this select 5


#Update

_heliPos = getPos _heli
_heliPosX = _heliPos select 0
_heliPosY = _heliPos select 1
_heliPosZ = _heliPos select 2

_chute1Pos = getPos _chute1
_chute1PosX = _chute1Pos select 0
_chute1PosY = _chute1Pos select 1
_chute1PosZ = _chute1Pos select 2
_chute1 setPos [_chute1PosX, _chute1PosY, 300]

_chute2Pos = getPos _chute2
_chute2PosX = _chute2Pos select 0
_chute2PosY = _chute2Pos select 1
_chute2PosZ = _chute2Pos select 2
_chute2 setPos [_chute2PosX, _chute2PosY, 300]

_chute3Pos = getPos _chute3
_chute3PosX = _chute3Pos select 0
_chute3PosY = _chute3Pos select 1
_chute3PosZ = _chute3Pos select 2
_chute3 setPos [_chute3PosX, _chute3PosY, 300]

_chute4Pos = getPos _chute4
_chute4PosX = _chute4Pos select 0
_chute4PosY = _chute4Pos select 1
_chute4PosZ = _chute4Pos select 2
_chute4 setPos [_chute4PosX, _chute4PosY, 300]


_car setPos [_heliPosX, _heliPosY, _heliPosZ - 5]
_heading = getDir _heli
_car setDir _heading
~0.01
? (release2 == 2) : goto "Drop"
goto "Update"


#Drop

_chute1 setDir _heading
_chute2 setDir _heading
_chute3 setDir _heading
_chute4 setDir _heading

~0.01

_carPos = getPos _car
_carPosX = _carPos select 0
_carPosY = _carPos select 1
_carPosZ = _carPos select 2

_chute1 setPos [_carPosX + 1.5, _carPosY - 1.5, _heliPosZ - 18]
_chute2 setPos [_carPosX + 1.5, _carPosY + 1.5, _heliPosZ - 18]
_chute3 setPos [_carPosX - 1.5, _carPosY + 1.5, _heliPosZ - 18]
_chute4 setPos [_carPosX - 1.5, _carPosY - 1.5, _heliPosZ - 18]

#DropUpdate

_chute1Pos = getPos _chute1
_chute1PosX = _chute1Pos select 0
_chute1PosY = _chute1Pos select 1
_chute1PosZ = _chute1Pos select 2

_car setPos [_chute1PosX, _chute1PosY, _chute1PosZ - 3]

_chute2 setPos [_chute1PosX, _chute1PosY + 3, _chute1PosZ]
_chute3 setPos [_chute1PosX - 3, _chute1PosY + 3, _chute1PosZ]
_chute4 setPos [_chute1PosX - 3, _chute1PosY, _chute1PosZ]

~0.01
? (_chute1PosZ > 3) : goto "DropUpdate"


; AIRBONE PARADROP SCRIPT
; Modified From Rapple.sqs by: Mustang60348
; Modified by: the[]coyote
;
; This script calls two parameters: the name of the group to paradrop
; and the name of the helicopter to paradrop from. Syntax is:
;
; [groupname, heliname] exec "Paradrop.sqs"
;
; In order to use the script, place a trigger where you want to paradrop to start from.
; In the Actvation field type: [groupname, heliname] exec "Paradrop.sqs"
; Once the trigger is activated, the helicopter will drop one paratrooper per second until
; all units in the group are in the skies. Personally, I make the helo stay at limited
; speed and no less than 100 height for safety of the paratroops.

_Group = _this select 0
_Vehicle = _this select 1


_listunits = units _Group

_A = 0
_B = count _listunits
#KEEPSENDING
_listunits select _A action ["EJECT", _vehicle]
Unassignvehicle (_listunits select _A)
_A=_A+1
~1
?_B >_A:goto "KEEPSENDING"
~1
MoveNext = TRUE

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Arrrggghh! Script frustration
« Reply #1 on: 25 Jun 2003, 14:26:25 »
i think da main prob is da activationof da trigers or mebe syntax dere - da scripts shud b workin - usualy da scripter makeem 2 work ::) ;) - unless dis r f00ked script  :-X - mebe attach da file or somin


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

Mr.BoDean

  • Guest
Re:Arrrggghh! Script frustration
« Reply #2 on: 26 Jun 2003, 07:22:23 »
Hmmm ...attach mission.sqm ....it's over 187k without music

At any rate, I'm using Vehicle-Present triggers for all of these events ....grouped to their respective chopper. I even tried grouping the Vehicle-present to the CARGO Vehicles they were carrying, but that was still hit and miss.

Should I be adding something in condition field like:

heli intrigger    ???

Didn't see that on the ComRef, but ??

D.Berka's scripts say specifically to modify the release numbers if you wanted to use it with multiple helis and it HAD
worked most of the time previously. When it didn't , I just chalked it up to a RAM error or something didn't load right, but this keeps happening now.   >:(   I suppose I should export it to a .PBO file and see if that makes any difference.

(BTW, I'm 1.46 with Ed. Update 102 and BAS LittleBirds addons.  ;)   Not another bug with that Gunslinger's is it?  :-\ )
« Last Edit: 26 Jun 2003, 07:24:01 by Mr.BoDean »

Mr.BoDean

  • Guest
Re:Arrrggghh! Script frustration
« Reply #3 on: 26 Jun 2003, 08:26:36 »
Just curious.... I've noticed that neither of these scripts have an EXIT command. Should they?  ???

I've tried now isolating it to just one chopper.... worked fine 3x in a row , then nothing happened fourth or fifth time.

 So then I tried to add the
release1 = 1
part to the top of the paradrop script , (though I'm not sure if that messes with that script's setup parameters) and again it worked fine 3x in a row then no more. WT%$#*&&!!!  Is it "learning" to not execute these commands just to piss me off?  ::)   :-X

I then tried naming the top part of that script #FuelDrop and added the UAZ setFuel 1  line , but it no worky. More arrgghhs .. . I really wanted to finish this before my vacation this weekend so I can relax.  :P    8)

Mr.BoDean

  • Guest
Re:Arrrggghh! Script frustration
« Reply #4 on: 26 Jun 2003, 10:01:00 »
OKAY! Now that I've used up a whole web page for my whining, do you plan to pass out the BoneHead Awards soon, LCD?  ;D  
     So I decided to try something crazy ....I widened my triggers (from 5 or 10) to 40 ... and wouldn't ya know it ... it all works as it should now, in one trigger.    :wow: Who'da thunkit? I've never noticed that in a tute before, but I guess there wasn't always enough time for the vehicle to register and process all of the stuff in the On Activation field.   ::)       Well, that was a beating!  :beat:  But now ...Onwards! Thanks for minding the drivel.  :wave: