Home   Help Search Login Register  

Author Topic: Lights out. . . .?  (Read 560 times)

0 Members and 1 Guest are viewing this topic.

mr.sert

  • Guest
Lights out. . . .?
« on: 12 Aug 2003, 06:05:36 »
What would be the easiest way to do the following, either with a script, or trigger.

After blowing up a target (communication center) the lights in a specified city turn off, and it stops a countdown timer allowing reinforcements to enter the city?

Thanks in advance....

- Mr. Sert

Knut Erik

  • Guest
Re:Lights out. . . .?
« Reply #1 on: 12 Aug 2003, 14:04:48 »
Okay...

To switch the lights off, the easiest way would be to use a script.
Create a trigger with the condicion,
not (alive NameOfBulding)
On activation
[] exec "Scriptname.sqs"

Now you need to find the ID of every lightpost. You press the show ID button in the editor. You need to zoom a lot to see the id's.

Then write this in your script file...

Light1 = NearestObject ["Object xxxx",StreetLight]
Light1 switchLight "Off"

Not sure about the syntax though...

I know that I'm not very clear here, but at least it can give you some ideas to build on...

Good luck.

deaddog

  • Guest
Re:Lights out. . . .?
« Reply #2 on: 12 Aug 2003, 16:22:09 »
If you already have the object ID of the lamp, then all you have to do is this:

(object xxxxx) switchlight "off"

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Lights out. . . .?
« Reply #3 on: 12 Aug 2003, 19:15:08 »
For the countdown part, the easiest way would be just to use a variable.

Condition:    not alive building1
On activation:     [] exec "scriptname.sqs"; reinforce=true


The variable "reinforce" controls whether reinforcements are allowed.    If you have a timer going as well use the timer to switch another variable from false to true (or vice versa).     The reinforcements can only come if both variables are (say) true.
Plenty of reviewed ArmA missions for you to play

mr.sert

  • Guest
Re:Lights out. . . .?
« Reply #4 on: 12 Aug 2003, 19:58:57 »
Ty sirs for the help...

- Mr. Sert