I've did a search, helpful as most are, not really sure how to put eventhandlers in config without scripts. After experimenting here's the data should u wanna run simultaneous animations when your addon starts ingame without any control.
1. Usually for any animations u make u would have to define it as class animation in cpp.
2. if u dont have control switches over the animations, then u would'nt need to write out the user animations, just put your class animation package - class watever in class eventhandler.
init="(_this select 0) animate [""ani_rlife3"", 1]";
- and ingame it should start the animation.
3. But if u have many animations to run, then just put it:-
init="(_this select 0) animate [""ani_rlife3"", 1]; (_this select 0) animate [""ani_rlife2"", 1]; (_this select 0) animate [""ani_rlife2"", 1]";
***** take note of the "".....its init ="xxxx;xxxx;xxx"; and not init="xxx";"xxx";"xxx";
Hope it helps.
Further to "init=" eventhandler, there are other codes recognised by ofp1.9x which allows greater flexibility for addonmakers when creating addons.
Most use these codes to call upon scripts and scripts are very useful but some prefer not to use scripts. It would be possible to do so, or had been possible to do so but the knowledge to use no scripts was perhaps not so readily accessible in the past.
The codes are:-
these are states in which the addon behaves and react ingame, therefore the addonmaker can determine the destiny of his/her addon, for example;- engine = setdamage1 whereby the car explodes when engine starts..lol! something for the mafia mod!
There are many corresponding behaviour found in the Command Reference file over at ofpec.com which u can use. Best of all, if the user dont like the setbehaviour the addonmaker set for it, he can countermand the command, simple eg..door animate 1 -will open door, but door animate 0 will shut it. Guess the limit is only the addonmaker's imagination.
I guess some of u newer folks taking a stab in making addons might wanna see some examples, so i will post some testing working examples so that u may get the idea on how to config the eventhandler .
I wanted when i fire:-
1. the missile to disappear(setobjecttexture)
2. the clamp holding the missile to animate
therefore, in the class eventhandler i placed:-
"(_this select 0) setObjectTexture [0,""""];
(_this select 0) animate [""ani_clasp1"", 1]; (_this select 0) animate [""ani_clasp2"", 1]";
"(_this select 0) setObjectTexture [0,""""] - this will apply an empty texture to my hidden selection, making it disappear
(_this select 0) animate [""ani_clasp1"", 1]; (_this select 0) animate [""ani_clasp2"", 1] - this will make the clasp open once the trigger is pulled.
No scripts needed...limit only to your imagination on what u can do
Any idea whether these trigger when the player is all the way into a vehicle or whether they activate when the player chooses the 'get in' command?
Originally Posted by (philcommando @ July 22 2004,23:12)
I should be able to test later, might save some time to find out first though.
The possiblilities are truly endless, crowley..i havent tested them and tried only some but...gosh!....this feature is really untapped!!!!!...almost like ofp2 on the things one can do to the addon with ideas from the community!
i believe the getin command is activated once u enter the command and not in the process of getting into the vehicle as getting in is only a timed animation. I have tested the fire = event and it depends on the speed of your comp..as soon as u type the enter button, it activates...might need to work out some delay timming into the commands perhaps for certain features.....