Home   Help Search Login Register  

Author Topic: addEventHandler  (Read 545 times)

0 Members and 1 Guest are viewing this topic.

TrackenHit

  • Guest
addEventHandler
« on: 07 Aug 2003, 05:35:42 »
Ok, I keep asking this question. Is there another way to script something that does what 'addEventHandler' does, but without using that scripting tool?  'addEventHandler' doesn't work in v1.46, so I really need a way to get around this!!!  

Please give me any advice, and an example so I can learn from it if you could!!  Thanks guys!

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:addEventHandler
« Reply #1 on: 07 Aug 2003, 07:09:44 »
First of all, you will need to be more specific. Which eventhandler are you talking about, exactly?

Now, it is possible to SORT of simulate eventhandlers in 1.46. Depending on the type, you are going to have to do it a different way. For example, instead of: "aP addeventhandler ["killed",{blahabla}]", you could have a script that starts off as: @!alive aP. Similar methods can be used for basically all of the eventhandlers, even "fired".

HOWEVER, the real power behind an eventhandler is its ability to return values, such as "who-shot-what-bullet-from-which-muzzle-and-what-type-of-bullet-was-it" :). It may be possible to get some of these values in a script, but it really depends on which values you are looking for.

Please give some specifics and I'll try to help.


HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
Re:addEventHandler
« Reply #2 on: 19 Aug 2003, 22:47:34 »
You would probably need to do stuff with triggers...

Doolittle