Results 1 to 6 of 6

Thread: init eventhandler doesn't work?

  1. #1
    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 &#91;&#34;Init&#34;, {_this exec &#34;camera.sqs&#34;}&#93;[/QUOTE]
    I can&#39;t get any init handler to work.
    I&#39;ve tried
    _this
    this
    _this select 0
    this select 0
    Its like the game doesn&#39;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&#33;&#33;&#33;
    Also changing the event call to something like &#39;killed&#39; or &#39;hit&#39; makes it work. So is Arma not using the init handler or what???




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

    Ranger School - Make your own mission in game! Full MP support (Old ver)
    DooACS - Arma2 anti-cheat to protect your server, feared by cheaters

  3. #3
    Gunnery Sergeant Sakura_Chan's Avatar
    Join Date
    Feb 1 2007
    Location
    Canada town
    Posts
    492
    Author of the Thread
    but it doesn&#39;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?

  4. #4
    try [this]
    Okay, I am forum lurking lol.

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

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

  6. #6
    Chief Warrant Officer
    Join Date
    Jan 17 2004
    Location
    Auckland, New Zealand
    Posts
    3,788
    Init eventhandler is more useful for mods, where it&#39;s set in the config.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •