Activation Events

Non-platform specific questions.

Activation Events

Postby Hblade » Mon May 06, 2013 4:46 pm

I never used these, what exactly do these do?
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Activation Events

Postby skydereign » Mon May 06, 2013 5:42 pm

Activation events in my opinion are one of the more powerful tools provided by gE. If you set them up properly, they act as custom events that you can insert at any point in code. For instance if you wanted to have a Create Actor 2 event which triggers after the actor has already been created (useful if you want to change some values of the actor after its actual create).
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Activation Events

Postby lcl » Mon May 06, 2013 6:43 pm

They are very useful! For example, Sabre won't exist without activation events.
Activation events allow you to activate code in other actors, even multiple times per one frame!
When a script executes a SendActivationEvent() -call, the code interpretation of the current event is stopped for the time the activation event is being executed. You won't of course notice that since it all happens in one frame, but it really does and gives one great possibilities.

Sabre uses activation events to change the texture actors animation and animation position for every single vertical line on the screen, so it happens as many times in a frame as the views width is (default 640). Without the use of activation events, the animation and animation position would be changed only once per frame, and that would make all the vertical lines to have the same animation and animation position. That's why Sabre needs activation events.

There is also much more you can do with activation events, but that's the basic idea of them. :)

EDIT: Sky explained the basic idea better than I did. He told the idea, I told what I use it for.... Well,anyway, I hope my post is helpful. :)
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Activation Events

Postby Hblade » Mon May 06, 2013 7:33 pm

Thanks guys :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron