Jump to content
Sign in to follow this  
Pherry

Adding lit chemlights to mission in ARMA 3

Recommended Posts

I didn't see this posted anywhere and I was searching the web/experimenting for a good two hours trying to figure it out since I don't have much mission editing experience.

Solution was entirely based on this post so I don't really take any credit for coming up with this.

Now here's how you do it!

Create a marker, I used the same as in the thread mentioned above; "chem1".

Now create a trigger, I changed the activation from "this" to "true" to make it trigger as soon as I start the mission.

In the Activation field of the trigger type in this:

_light = "Chemlight_green" createVehicle getMarkerPos "chem1";

This will also work with Chemlight_red, Chemlight_yellow and Chemlight_blue. Probably also with smoke grenades and stuff.

Share this post


Link to post
Share on other sites

Thanks! This works great.

Can you possibly share the syntax to attach this to an object like an ammo crate? I noticed in the thread you linked, "_light attachTo" is used, but I'm not what to replace"getMarkerPos" with.

Share this post


Link to post
Share on other sites
Thanks! This works great.

Can you possibly share the syntax to attach this to an object like an ammo crate? I noticed in the thread you linked, "_light attachTo" is used, but I'm not what to replace"getMarkerPos" with.

This is also what i need to know as its not a simple matter of attaching an object, your attaching a marker or trigger to an object and thats not something easily brushed off with the "please use the wiki comment"

Normally i would but this is different!

Bootleg

Share this post


Link to post
Share on other sites
Not to be that one, but yes, it was already a thread about it, just search on chemlights.

http://forums.bistudio.com/showthread.php?148331-Placing-Chemlights-on-the-map-How

I see you didn't read :)

And i do check as many threads as possible before posting (and wiki)

It's not the creation of the chemlight we are after it's the subsequent attaching of said chemlight to a different object ie a tent, ammocrate etc

Not seen a thread or solution to that, hence why we are asking for help!

Bootleg

Share this post


Link to post
Share on other sites

Ah, no you're not moving the trigger.

After the _light = createvehicle line, in the trigger's activation field, add another line of the form:

_light attachTo [syntax...]

That should help. _light is a variable that exists only in the scope of the trigger activation, so you can't access it from anywhere else without making it global somehow or passing a reference some other way.

Share this post


Link to post
Share on other sites
Ah, no you're not moving the trigger.

After the _light = createvehicle line, in the trigger's activation field, add another line of the form:

_light attachTo [syntax...]

That should help. _light is a variable that exists only in the scope of the trigger activation, so you can't access it from anywhere else without making it global somehow or passing a reference some other way.

thanks for reply but i'm still not getting this at all :@( at the moment i understand you to be saying

_light = "Chemlight_green" createVehicle getMarkerPos "c1" ; _light attachTo [b1,[0,0,2]]

all it says to me is local variable in global space! I know i'm reading what you've said wrong but could you write out what i'd need if "c1" is the marker for the chem and "b1" is the barrel its to be attached to

Excuse my retardedness

Bootleg

Share this post


Link to post
Share on other sites

As your using it in the init lines you need to remove the underscore from _light just use light

"c1" is the marker name but don't use the brackets when naming the marker. just in the code.

b1 is the name of the barrel and doesn't use brackets.

Share this post


Link to post
Share on other sites

chmlight = "Chemlight_green" createVehicle [0,0,0]; chmlight attachTo [ammoBoxName,[0,0,2]];

Removes the need for a marker - that will work in an init line. You might need to test the [0,0,2] part to make sure the light is positioned correctly on the box as the ammoboxes are different sizes.

Would be a good project to get the correct pos for each type of ammobox and script this as a function so that the light is positioned in the right place every time with a switch/class.

Share this post


Link to post
Share on other sites

wanted to add to this that the marker is not necessary.

name your trigger chem1

instead of getmarkerpos use getpos in your code, just make sure to add chem1 without the quotes this time;

_light = "Chemlight_green" createVehicle getPos chem1;

thanks for this though I was looking for this.

Edited by LeYuno

Share this post


Link to post
Share on other sites

In the upcoming beta, there is a built in solution to this. The editor now has the option of placing both smoke and chem lights, both in multiple color options. Here's how you do it:

>Modules

Category: Effects

Module: Chemlight (or Smoke)

As I said this is only in the beta version.

  • Thanks 1

Share this post


Link to post
Share on other sites

It's not unlimited. go to modules, effects, then you will see smoke and chemlights. You get to chose what colors but not time. The light stays on permanently I believe, but smoke runs out

Share this post


Link to post
Share on other sites

As I said this is only in the beta version.

Actually this has been in the Alpha for some time.

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  

×