OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: gimplord on 06 Apr 2004, 09:43:35

Title: Multiple Init scripts defined in CPP
Post by: gimplord on 06 Apr 2004, 09:43:35
Hi everyone,

                   Need some help here, Im working on an addon and it already has one Init.sqs, which sets the faces to a random choice of custom ones, but I also want to add ANOTHER init.sqs to add some other features- Do I need to create one, uber-complex init script? or is there a way to just add another? plz help!
Title: Re:Multiple Init scripts defined in CPP
Post by: WizzyWig on 06 Apr 2004, 09:49:16
ok its just like any other script excepted scripts have two " instead of one " but any way all you do is add a ; betwean the two scripts like this:
Code: [Select]
class EventHandlers
{
init = "if (alive (_this Select 0)) then {[_this select 0] exec ""\xplane\sqs\init.sqs""};[_this select 0] exec ""\xplane\sqs\door1.sqs"";"

i hope this helps
Title: Re:Multiple Init scripts defined in CPP
Post by: gimplord on 06 Apr 2004, 16:05:39
Cheers mate, can't believe I didnt think to try this earlier!  ::)
Title: Re:Multiple Init scripts defined in CPP
Post by: WizzyWig on 06 Apr 2004, 16:40:06
no problem buddy