Jump to content
Sign in to follow this  
crassus

Eventhandlers

Recommended Posts

I'm hoping someone will point me to a list, if such exists, of which events can and cannot be checked for.

I mean, can such events such as reload, prone out, drop or pick up <this weapon>, weapon on back, basically anything either requiring a keystroke by the player or some event in-game be checked and a script written to act upon it?

Share this post


Link to post
Share on other sites

Well, that's a start toward my understanding of it. I'm hoping for a more no-brainer oriented definition. smile_o.gif

I'm a bit confused:First there is this:

Quote[/b] ]Event handlers can be defined in unit config

Does this mean I can define any old evenhandler I wish?

But then, in the same paragraph:

Quote[/b] ] Event handler types are defined below.

Or am I limited to the types...defined below?

Share this post


Link to post
Share on other sites

You are limited to the types defined in the comref. I am not aware of any eventhandlers not listed.

For example:

Add a GetIn eventhandler and check to see if a unit enters a specific type of vehicle so you can add actions. Then remove them with a GetOut eventhandler to remove them.

Fired, Init, and Hit eventhandlers are pretty popular for creating some wild scripts.

Another example: Add an init eventhandler that runs a script that loops while checking various conditions to in a sense develop your own events.

Share this post


Link to post
Share on other sites
Well, that's a start toward my understanding of it. I'm hoping for a more no-brainer oriented definition. smile_o.gif

Hell what do you want, you got a CoC signature! Where are the no-brainers? wink_o.giftounge_o.gif

Share this post


Link to post
Share on other sites

As your original request touched on two different areas (or at least that is how I read it), here are two links that should answer either or both of your questions.

As for the returned values from event handlers, I use Igor Drukov's tutorial available from OFPEC.

If you want info on the actions available in OFP, but not obtaining any returned values from these actions, read up on it on this  sticky topic on the OFPEC Forums.

One, if not both of these links, should provide you with the information that you seek.

Wadmann

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  

×