Home   Help Search Login Register  

Author Topic: Script activated, when game starts...  (Read 1115 times)

0 Members and 1 Guest are viewing this topic.

Serial Killer

  • Guest
Script activated, when game starts...
« on: 02 Apr 2005, 17:11:59 »
What I have to do, if I want that some script, like Burn.sqs begins, when the game starts? I'm talking about addon's Init... You know?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Script activated, when game starts...
« Reply #1 on: 02 Apr 2005, 17:55:25 »
As long as it is a mission editor placed addon you could use the 'init' eventhandler.

This would be defined in the config of said addon.


Planck
I know a little about a lot, and a lot about a little.

Serial Killer

  • Guest
Re:Script activated, when game starts...
« Reply #2 on: 02 Apr 2005, 18:01:21 »
Uhm.. You mean that I can put that in addon's config..? How? ???

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Script activated, when game starts...
« Reply #3 on: 02 Apr 2005, 18:18:34 »
Something along the lines of:

class EventHandlers
{
init = "(_this select 0) exec  {\mypbo\myscript.sqs}";
};

This of course is a subclass of your addons entry in cfgVehicles.

AFAIK the 'init' eventhandler does not work for .wrp placed objects though.


Planck
I know a little about a lot, and a lot about a little.

Serial Killer

  • Guest
Re:Script activated, when game starts...
« Reply #4 on: 03 Apr 2005, 09:51:56 »
Thank you! :D