Home   Help Search Login Register  

Author Topic: more rotorblades with eventhandlers  (Read 1099 times)

0 Members and 1 Guest are viewing this topic.

Offline granQ

  • Contributing Member
  • **
    • Anrop.se
more rotorblades with eventhandlers
« on: 23 Mar 2003, 17:16:45 »
Okey so i am kinda a newbie in some areas, but would it be possible to use like the "eventhandler engine on" and check to see if he has started engine, and if he has it starts to move a "animation" thats spinns fast and looks like the blades on a chopper. Need this for helping sole with a machine that needs more then one "rotor". and nope. 2 isn't enough (chinock). Need 3.
Cura Posterior

Rubble_Maker

  • Guest
Re:more rotorblades with eventhandlers
« Reply #1 on: 28 Mar 2003, 00:15:44 »
Although it sounds crazy, yes I think this could work. Use something like this to do the actual rotation:

_chopper animate ["rotor", _c]
_c=(_c+1)%1


Offline granQ

  • Contributing Member
  • **
    • Anrop.se
Re:more rotorblades with eventhandlers
« Reply #2 on: 29 Mar 2003, 11:51:06 »
thanks for that. I will soon try it but still would like some more help. Kinda new on everything with eventhandlers..
Cura Posterior

Rubble_Maker

  • Guest
Re:more rotorblades with eventhandlers
« Reply #3 on: 29 Mar 2003, 21:10:45 »
its simple:

engine="_this exec {blades.sqs}";

now in blades.sqs you extract two params:

_unit=_this select 0
_engine_status=_this select 1

_engine_status is true if the engine is on, and its false if its off. Notice that the event handler is only executed when the player switches the engine on or off.

Rubble_Maker

  • Guest
Re:more rotorblades with eventhandlers
« Reply #4 on: 29 Mar 2003, 21:12:18 »
I forgot, this goes into the CfgVehicles->eventhandlers class:

class CfgVehicles bla
{
      class eventhandlers
     {

        engine="_this exec {blades.sqs}";

     }
}