Home   Help Search Login Register  

Author Topic: Bolean limitations  (Read 415 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
Bolean limitations
« on: 22 Jun 2004, 21:47:58 »
I have a group running a script with a bolean.
 
Alert = true

When I have a second group standing somewhere else and running the same script, the event that's executed by the bolean will ocour on both locations.
What can I do to prevent this without running a new script (with a new bolean) for each group?

Can I add a number to a boleanname?

like Alert1,Alert2, alert3,...

And updating the number via a variable?

Code: [Select]
_c = 0
...
_c = _c + 1

Hmmm, I think I need a format call command but I don't know the exact code...
Or can I have a boleanname as parameter in the exec array?

Help!

« Last Edit: 22 Jun 2004, 23:14:38 by Blanco »
Search or search or search before you ask.

Unnamed

  • Guest
Re:Bolean limitations
« Reply #1 on: 22 Jun 2004, 22:53:39 »
Is it for Multi Player or Single player?

Multi Player use the call command, single player use a global array.

Give each group an index number. Then for the Call command you can have:

Your.sqs

Code: [Select]
_Index=_This Select 0
Call {Format ["Alert%1=True",_Index]}

Or for an array:

Init.sqs

Code: [Select]
Alarms=[False,False,False]
Your sqs:

Code: [Select]
_Index=_This Select 0
Alarms Set [_Index,True]




« Last Edit: 22 Jun 2004, 23:10:49 by Unnamed »

Offline Blanco

  • Former Staff
  • ****
Re:Bolean limitations
« Reply #2 on: 22 Jun 2004, 23:17:27 »
Nice one !

It's for SP.

Thanks a lot!

Search or search or search before you ask.