Jump to content
Sign in to follow this  
sakura_chan

init eventhandler doesn't work?

Recommended Posts

shouldn't this work?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addeventhandler ["Init", {_this exec "camera.sqs"}]

I can't get any init handler to work.

I've tried

_this

this

_this select 0

this select 0

Its like the game doesn't even register that the unit initiated. WTF is going on??? No other scripts or units are present in the mission this is bugging the hell out of me. HELP!!! banghead.gif

Also changing the event call to something like 'killed' or 'hit' makes it work. So is Arma not using the init handler or what???

Share this post


Link to post
Share on other sites

I never understood init events... also since you are adding this AFTER the object was created, what would make the init fire??

Share this post


Link to post
Share on other sites

but it doesn't work after respawn either (I assume that it should be run again?) if not how can you apply an init handler to a unit without changing its config?

Share this post


Link to post
Share on other sites

The init event, assigned with the script commands for units. Only fires when the unit gets out of a vehicle. Not when it's re-spawned.

I've never played around with re-spawn scripts, so perhaps check out how others have done it?

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  

×