Home   Help Search Login Register  

Author Topic: Execing script in createunit  (Read 429 times)

0 Members and 1 Guest are viewing this topic.

evil

  • Guest
Execing script in createunit
« on: 14 Apr 2004, 19:48:18 »
Can it be done?

"OfficerE" createUnit [_loc, eastgroup1, "this allowfleeing 0; [this] exec "script.sqs"",1] doesn't work.  The only way around it I see is to give the guy a name and then execute it, like this:

"OfficerE" createUnit [_loc, eastgroup1, "this allowfleeing 0; badguy=this",1]
[badguy] exec "script.sqs"

I can't do it like that though, because the createunit script will be run more than once, and you can't have two guys named the same thing!

Any ideas?

Offline Jezuro

  • Members
  • *
  • Hookah 4 lyfe!
    • Jezuro's ArmA Workshop
Re:Execing script in createunit
« Reply #1 on: 14 Apr 2004, 19:59:38 »
I think it's caused by the obvious quotes problem  ;) Try this:

"OfficerE" createUnit [_loc, eastgroup1, "this allowfleeing 0; [this] exec ""script.sqs""",1]

or

"OfficerE" createUnit [_loc, eastgroup1, "this allowfleeing 0; [this] exec {script.sqs}",1]
"We are Her salvation, and through Her command we shall live forever. I will not die. Not here. Not now. Never!!!"

evil

  • Guest
Re:Execing script in createunit
« Reply #2 on: 14 Apr 2004, 20:47:45 »
Works great.  I didn't know you could get around the quotes problem.  Thanks.