Home   Help Search Login Register  

Author Topic: can someone tweak this script for me??  (Read 676 times)

0 Members and 1 Guest are viewing this topic.

ColonelShubaltz

  • Guest
can someone tweak this script for me??
« on: 11 Mar 2004, 16:04:07 »
this is the vehicle re-spawn script for the USCM dropship, for some reason the APC doesn't spawn high enough and the very talented KyleSarnik is missing, so if someone could modify this script so that the APC spawned goes 2-4m higher when spawned then i would be most grateful

Code: [Select]
_ship = _this select 0
_veh = _this select 1
_crew = _this select 2
_invis = _this select 3

_driver = driver _veh
_gunner = driver _veh
deletevehicle _veh
deletevehicle _invis
_fake = "BASfakejeep" createvehicle [0,0,0]
_fake moveincargo _ship
~0.01
"_X moveincargo _ship" foreach _crew

#loop
? (getpos _fake select 2) <= 5 && _ship animationPhase "ramp" >= 0.01 : goto "unload"
goto "loop"

#unload
deletevehicle _fake
_invis ="vag_invisible" createvehicle [0,0,0]
_invis moveincargo _ship
_veh = "USCM_apc" createvehicle [0,0,0]
_dir = (getdir _ship - 270)
_posx = (getpos _ship select 0)-(3 * cos _dir)
_posy = (getpos _ship select 1)+(3 * sin _dir)
_veh setpos [_posx,_posy,(getpos _invis select 2)+1]
_veh setdir (getdir _ship)
{_X action ["GETOUT",_ship]} foreach _crew
_driver moveindriver _veh
_gunner moveingunner _veh
"_X moveincargo _veh" foreach _crew
~1
_posA = (getpos _ship select 0)-(25 * cos _dir)
_posB = (getpos _ship select 1)+(25 * sin _dir)
_driver domove [_posA,_posB,0]
[_ship,_invis] exec "\vag_cheyenne\cargo.sqs"
exit

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:can someone tweak this script for me??
« Reply #1 on: 11 Mar 2004, 16:15:03 »
this is the vehicle re-spawn script for the USCM dropship, for some reason the APC doesn't spawn high enough and the very talented KyleSarnik is missing, so if someone could modify this script so that the APC spawned goes 2-4m higher when spawned then i would be most grateful

Code: [Select]
_ship = _this select 0
_veh = _this select 1
_crew = _this select 2
_invis = _this select 3

_driver = driver _veh
_gunner = driver _veh
deletevehicle _veh
deletevehicle _invis
_fake = "BASfakejeep" createvehicle [0,0,0]
_fake moveincargo _ship
~0.01
"_X moveincargo _ship" foreach _crew

#loop
? (getpos _fake select 2) <= 5 && _ship animationPhase "ramp" >= 0.01 : goto "unload"
goto "loop"

#unload
deletevehicle _fake
_invis ="vag_invisible" createvehicle [0,0,0]
_invis moveincargo _ship
_veh = "USCM_apc" createvehicle [0,0,0]
_dir = (getdir _ship - 270)
_posx = (getpos _ship select 0)-(3 * cos _dir)
_posy = (getpos _ship select 1)+(3 * sin _dir)
_veh setpos [_posx,_posy,(getpos _invis select 2)+4]
_veh setdir (getdir _ship)
{_X action ["GETOUT",_ship]} foreach _crew
_driver moveindriver _veh
_gunner moveingunner _veh
"_X moveincargo _veh" foreach _crew
~1
_posA = (getpos _ship select 0)-(25 * cos _dir)
_posB = (getpos _ship select 1)+(25 * sin _dir)
_driver domove [_posA,_posB,0]
[_ship,_invis] exec "\vag_cheyenne\cargo.sqs"
exit

Like so?
Not all is lost.

ColonelShubaltz

  • Guest
Re:can someone tweak this script for me??
« Reply #2 on: 11 Mar 2004, 17:06:06 »
thanks so much!!!!!!!! WOOHOO *cheers for Artak*

can you help me with the last glitch in the dropship plz????

ok when the apc boards the dropship instead of a fake apc spawned inside the cargo hold (in the center) a fake jeep is spawned and it takes up the infantry positions, but when the apc is disembarked the fake jeep remains....how can i fix this??? if you would like all the scripts then i attached them all

if you need more information please just ask

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:can someone tweak this script for me??
« Reply #3 on: 11 Mar 2004, 17:31:19 »
this is the vehicle re-spawn script for the USCM dropship, for some reason the APC doesn't spawn high enough and the very talented KyleSarnik is missing, so if someone could modify this script so that the APC spawned goes 2-4m higher when spawned then i would be most grateful

Code: [Select]
_ship = _this select 0
_veh = _this select 1
_crew = _this select 2
_invis = _this select 3

_driver = driver _veh
_gunner = driver _veh
deletevehicle _veh
deletevehicle _invis
_fake = "BASfakejeep" createvehicle [0,0,0]
_fake moveincargo _ship
~0.01
"_X moveincargo _ship" foreach _crew

#loop
? (getpos _fake select 2) <= 5 && _ship animationPhase "ramp" >= 0.01 : goto "unload"
goto "loop"

#unload
deletevehicle _fake
_invis ="vag_invisible" createvehicle [0,0,0]
_invis moveincargo _ship
_veh = "USCM_apc" createvehicle [0,0,0]
_dir = (getdir _ship - 270)
_posx = (getpos _ship select 0)-(3 * cos _dir)
_posy = (getpos _ship select 1)+(3 * sin _dir)
_veh setpos [_posx,_posy,(getpos _invis select 2)+4]
_veh setdir (getdir _ship)
{_X action ["GETOUT",_ship]} foreach _crew
_driver moveindriver _veh
_gunner moveingunner _veh
"_X moveincargo _veh" foreach _crew
~1
_posA = (getpos _ship select 0)-(25 * cos _dir)
_posB = (getpos _ship select 1)+(25 * sin _dir)
_driver domove [_posA,_posB,0]
~5
deletevehicle _fake
[_ship,_invis] exec "\vag_cheyenne\cargo.sqs"
exit

In the above the fake jeep will be deleted from cargo 5 seconds after the APC has had a driver in it. Maybe. Try it out.
Not all is lost.

ColonelShubaltz

  • Guest
Re:can someone tweak this script for me??
« Reply #4 on: 11 Mar 2004, 17:54:53 »
nope it didn't work, the jeep is still there...is there anyway i can replace the fakejeep for a fake apc?

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:can someone tweak this script for me??
« Reply #5 on: 11 Mar 2004, 21:22:25 »
Hmm.. maybe the jeep needs to out of the cargo before it can be deleted.. Anywho, you can have an APC instead of the jeep by replacing the string name for the jeep with a string name of the APC.

If the marinepack boys have done their readme.txt file, it should contain this string name.

This is the line you have to change, and the bold tex indicates the place for the string name.
_fake = "BASfakejeep" createvehicle [0,0,0]

Sorry that I can't be of more help. I have never played with the marinepack (I'm assuming it is the marine pack you're talking about), and I only have a faint image of what the script really does in game.
Not all is lost.

ColonelShubaltz

  • Guest
Re:can someone tweak this script for me??
« Reply #6 on: 12 Mar 2004, 09:19:55 »
ok thanks for all your help  ;D