HellToupee 0 Posted January 16, 2002 is there any scripts or scripts in the making the can respawn paratroopers in the air ive used a vechicle respawn script to respawn people but it dosent work on parachutes i even tried editing it. If some one decides to make on can u have it so u can define location and time to respawn. Share this post Link to post Share on other sites
4ntifa 0 Posted January 16, 2002 You could try hacking with vehicle paradrop tutorials: http://www.ofpeditingcenter.com/coding.shtml. However, I think parachutes are considered vehicles. So, try a script run in soldiers' init, which creates a parachute in air with createVehicle and assigns the soldier to it with assignAsCargo/assignAsDriver/whatever and finally moves the soldier to crew the parachute with moveinCargo/moveinDriver/whatever. Share this post Link to post Share on other sites
HellToupee 0 Posted January 17, 2002 tried that donr work cant make i respawn at all or the guy. Share this post Link to post Share on other sites
4ntifa 0 Posted January 17, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (HellToupee @ Jan. 17 2002,07:14)</td></tr><tr><td id="QUOTE">tried that donr work cant make i respawn at all or the guy.<span id='postcolor'> Pardon, sir, what did you mean?! You don't get respawning to work at all? Try the search, there's lots of threads about respawning. Anyway, has anyone experimented with soldiers' Initialization and respawning? Does Init stuff get run every time one respawns? Share this post Link to post Share on other sites
HellToupee 0 Posted January 17, 2002 im not talking normal respawn here im talking like vechcile respawn and stuff. Some vechcile respawns also work with people but none seem to affect parachutes or paratroopers placed in editor. Share this post Link to post Share on other sites
4ntifa 0 Posted January 17, 2002 Try something like this... In soldiers' Initialization field: [this, height] exec "pararespawn.sqs" with height replaced by the altitude from which to start paradropping. Write "pararespawn.sqs", it should be something like this: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ; The soldier object should have been passed as param 1 _soldier = _this select 0 ; The altitude should have been passed as param 2 _alt = _this select 1 _xpos = getPos _soldier select 0 _ypos = getPos _soldier select 1 _zpos = (getPos _soldier select 2) + _alt _parachute = "Parachute" createVehicle [_xpos, _ypos, _zpos] _soldier assignAsDriver _parachute _soldier moveInDriver _parachute <span id='postcolor'> Warning! This code is 100% untested. I don't know how initialization scripts and respawn mix, and I'm not sure if the soldier should be driver, cargo or commander or the parachute. Also, you might need to export the mission first, I've heard that respawning ("real" soldier respawning, not vehicle respawning) doesn't work in preview mode. Share this post Link to post Share on other sites
4ntifa 0 Posted January 17, 2002 Oops, "exit" at the end of the script would probably be useful... Share this post Link to post Share on other sites
4ntifa 0 Posted January 17, 2002 I tried it myself, it didn't work until I tried camCreate instead of createVehicle. It didn't work decently with respawn, though. Init scripts aren't run when respawning, and polling player state and then doing "setDammage 0" resulted in weird stuff, such as "ghost" players parachuting down while the player respawns normally... Share this post Link to post Share on other sites
4ntifa 0 Posted January 17, 2002 Awlrightee!!! I finally solved this puzzle. Each soldier to be "pararespawned" has his own trigger (covers the whole battlefield, activated on "present", repeatedly), to which he is grouped. The trigger runs the respawn script when activated. Share this post Link to post Share on other sites
HellToupee 0 Posted January 18, 2002 Thanks haven't tried it yet but from what i can see i seems to work ok. Share this post Link to post Share on other sites
HellToupee 0 Posted January 19, 2002 it works i made some changes so you could choose where it respawns also got it to work with setdammage </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ; The soldier object should have been passed as param 1 _soldier = _this select 0 ; The location should have been passed as param 2 _place = _this select 1 ; The altitude should have been passed as param 3 _alt = _this select 2 _xpos = getPos _place  select 0 _ypos = getPos _place select 1 _zpos = (getPos _place select 2) + _alt _parachute = "Parachute" camCreate [_xpos, _ypos, _zpos] _soldier assignAsDriver _parachute _soldier moveInDriver _parachute _soldier setdammage 0 exit<span id='postcolor'> Share this post Link to post Share on other sites