Jump to content
Sign in to follow this  
Hop1ite

Respawn into Halo?

Recommended Posts

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

Addeventhandler killed

make the eventhandler execute the script?

Share this post


Link to post
Share on other sites

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

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

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

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

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 by Andy455

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×