Hop1ite 10 Posted May 15, 2010 Hi, I've searched for this idea and found many threads about Halo jumping which I can get to work just fine, but is there a way to respawn falling from the sky at a certain height? Any help would be much appreciated! (I apologize if this has been covered before but I couldn't find it) -Gary ---------- Post added at 10:46 AM ---------- Previous post was at 10:39 AM ---------- Oh, I've been using this to start units mid Halo drop, if that helps. [this, 5000] exec "ca\air2\halo\data\Scripts\HALO_init.sqs"; Share this post Link to post Share on other sites
Joshii 10 Posted May 15, 2010 Addeventhandler killed make the eventhandler execute the script? Share this post Link to post Share on other sites
Fuzzy Bandit 10 Posted May 15, 2010 Indeed. If not, post the code of HALO_init.sqs so we can have a look at what exactly that does. Share this post Link to post Share on other sites
Hop1ite 10 Posted May 15, 2010 I was toying with something like this, couldn't get it to work though. player addEventHandler ["killed",{[] spawn {waitUntil {alive player}; execvm "ca\air2\halo\data\Scripts\HALO_init.sqs"};}]; I don't have a very good handle (no pun intended) on eventhandlers so any help would be great! Share this post Link to post Share on other sites
Fuzzy Bandit 10 Posted May 15, 2010 Ok add this to the init of your unit: _xhandle = this addEventHandler ["killed", "_this execvm 'respawn.sqf'"]; Then, create a file called respawn.sqf and add this to it: _unit = _this select 0; waituntil {alive player}; _unit = player; [_unit, 5000] exec "ca\air2\halo\data\Scripts\HALO_init.sqs"; That might work. Share this post Link to post Share on other sites
Hop1ite 10 Posted May 16, 2010 worked perfectly! Thanks for the help! Share this post Link to post Share on other sites
Fuzzy Bandit 10 Posted May 16, 2010 Awesome and glad to hear it! May I ask what's inside the HALO_init.sqs script? Might be useful to me as well! :) Or is it built into the game? Share this post Link to post Share on other sites
Andy455 11 Posted May 16, 2010 (edited) HALO_init.sqs is built into the game but if you unPBO the air2.PBO you can easily find it: _HALOunit = _this select 0 _HALOunitaltitude = _this select 1 ;// Set the unit pos in the air _HALOunit setpos [getpos _HALOunit select 0, getpos _HALOunit select 1, _HALOunitaltitude] ;// Run player or AI script ~0.05 ? (_HALOunit == player) : playsound "BIS_HALO_Flapping"; setAperture 0.05; setAperture -1; _HALOunit switchMove "para_pilot"; [_HALOunit] exec "ca\air2\halo\data\Scripts\HALO.sqs" ? ! (isplayer _HALOunit) : [_HALOunit] exec "ca\air2\halo\data\Scripts\HALO_AI.sqs" exit Just find yourself a good unPBOing tool and you can see how BIS made a lot of the built in scripts / modules... Edited May 16, 2010 by Andy455 Share this post Link to post Share on other sites
Fuzzy Bandit 10 Posted May 16, 2010 Good stuff! Cheers! :D Share this post Link to post Share on other sites