Home   Help Search Login Register  

Author Topic: cutscene linked to "fired" eh  (Read 1931 times)

0 Members and 1 Guest are viewing this topic.

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:cutscene linked to "fired" eh
« Reply #15 on: 14 Feb 2004, 00:45:07 »
Quote
this addeventhandler ["fired",{[this] exec "mgshot.sqs"}]
Tsk, would it hurt to check out the exact format of the command from comref?  ;) If you had done that, you would've only got one answer that would suffice.

this addEventHandler ["fired",{_this exec "mgshot.sqs"}]
It MUST be followed to the letter, _this in this case means an array of "fired", not the unit in whose init that is in. "fired" _this will contain that unit, the weapon, ammo, muzzle and all that, while this [_this] would contain only the unit, and ofp won't understand why an EH won't contain anything else, as far as I can comprehend it's picky ways.
« Last Edit: 14 Feb 2004, 00:46:17 by MI_Fred »
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

PsyWarrior

  • Guest
Re:cutscene linked to "fired" eh
« Reply #16 on: 14 Feb 2004, 17:17:54 »
Confirmed, error in addEventHandler syntax.

Damn "_this" operators can get confusing sometimes...

As you say, Fred, OFP doesn't really care about case or spaces (unless you put them in the middle of commands...), but it does get fussy about what you do with the "this" operator.

And I quote Psychic Command Directive No. 2:
Quote
When all else fails, return to the ComRef.

-Supr. Cmdr. PsyWarrior
-Psychic Productions

abomb1508

  • Guest
Re:cutscene linked to "fired" eh
« Reply #17 on: 17 Feb 2004, 03:00:51 »
k. sorry, should have looked there first. oops. ok, script well under way now!

if you wish to see the mission when it is released, look for BS07 at the CoC website. otherwise i may use the betatest forum 1st. who knows. but thanks for your help!

Cheers,

A-Bomb