Jump to content
Sign in to follow this  
h -

Init event handler

Recommended Posts

Tried the search but found nothing...

What does the 'Init' Event Handler do or return and when it is activated?

I've tried to make sense of it but with no luck...  sad_o.gif

Share this post


Link to post
Share on other sites

The init event handler performs one-time initialisation of a unit.

Insert it into your addon like so:

class Zombie1: Civilian1

{      

       class eventhandlers

      {

           init = [_this select 0] exec {\scottsaddon\initzombie.sqs};

     };

};

In the above example, a script called initzombie.sqs is called to initialise the zombie unit. Note the use of "_this" instead of "this" - the underscore is important.

Replace scottsaddon with the name of your pbo file (minus pbo extension of course)

Share this post


Link to post
Share on other sites

Tnx...

Share this post


Link to post
Share on other sites

The initialisation begins just before the mission starts, BTW.

Sorry I never said that before.

Scott

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  

×