Jump to content
Sign in to follow this  
Crimson_Raptor

Creating an Objective Based Mission for AA

Recommended Posts

OKay, so this is the plan.

You are approaching a town, there are manned searchlights scanning everywhere and machine gunners are right next to them.

You know those little "city powerplant" areas that are all enclosed in a fence usually? Basically your mission is to destroy those powerplant buildings so that the entire city loses power. Unfortunately there are also streetlights everywhere. How can I turn those lights off at the same time as well?

How would one go about doing this? help.gif

Share this post


Link to post
Share on other sites

In OFP, you would issue the following command for each streetlight:

(object 12345) switchLight "off"

In the editor, there is a "Show Object IDs" option where you can find the individual ID for objects built into the map. You can find your lamp object ID that way.

Then construct a trigger that would execute the switchLight commands to turn off all the lamps.

Whether the same command is supported in ARMA, I don't know. But you could do a quick simple test by creating a night mission, find the ID of one lamp, and create a trigger with the above line of code in it (substitute 12345 with the lamp object id).

www.ofpec.com is an AWESOME editing help site...go there and search for answers to your scripting questions.

And you can find the syntax for the commands at the new wiki.

Here's the link for switchLight command:

http://community.bistudio.com/wiki/switchLight

Post if the command works in ARMA, so the rest of us will know!

Share this post


Link to post
Share on other sites

Yeah this light code doesn't seem to be working in Armed Assault.

(object 488947) switchLight "off" nearestObject [player, "Streetlamp"] switchLight "OFF"

Keeps coming up in

unexpected)

Missing;

Missing)

Share this post


Link to post
Share on other sites
Yeah this light code doesn't seem to be working in Armed Assault.

(object 488947) switchLight "off" nearestObject  [player, "Streetlamp"] switchLight "OFF"

Keeps coming up in

unexpected)

Missing;

Missing)

You have 2 different commands there, and you don't need the second one. Try just this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(object 488947) switchLight "off"

And make sure the object ID is correct.

Share this post


Link to post
Share on other sites

I set it up as a trigger and it's a no go. sad_o.gif

Activation OPFOR

Condition this

On Act. object490123 switchLight "off"

Type None

Can't have () for some reason. And I switched the type to "None" and "Switch" which no change.

__

Also we got the ability to kill a person and it'll trigger the end senario. However we can't get it to work on an object without naming it.

And since the object ids are static.... sad_o.gif

If there was a way to set damage tot he light, maybe once the generators are destroyed, the lights can go out.

Unfortunately I can't shoot the lgihts out so that maybe why the lights won't switch off. I thought we could shoot the lights out in the original OFP?

Share this post


Link to post
Share on other sites

You need a space between object and the ID.

Also, you do know that it will only turn off that one light right?

Share this post


Link to post
Share on other sites

after a bit of playing around ive found a command that works

position player nearestobject 1111 switchLight "off"

replace 1111 with the ID of the light

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×