Pherry 1 Posted March 10, 2013 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
neven 14 Posted March 11, 2013 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
Mattar_Tharkari 10 Posted March 11, 2013 http://community.bistudio.com/wiki/attachTo http://community.bistudio.com/wiki/Category:Scripting_Commands Please use the wiki and search the forum or use google eg: Arma 2 attachTo Share this post Link to post Share on other sites
bootleg soldier 2 Posted March 11, 2013 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
fortun 14 Posted March 11, 2013 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 Share this post Link to post Share on other sites
bootleg soldier 2 Posted March 11, 2013 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
dwringer 45 Posted March 11, 2013 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
bootleg soldier 2 Posted March 11, 2013 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
f2k sel 164 Posted March 11, 2013 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
Mattar_Tharkari 10 Posted March 12, 2013 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
LeYuno 1 Posted March 12, 2013 (edited) 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 March 12, 2013 by LeYuno Share this post Link to post Share on other sites
theaveragetwin 11 Posted June 24, 2013 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. 1 Share this post Link to post Share on other sites
Redphoenix 1540 Posted June 24, 2013 Do they then have unlimited light/smoke? Share this post Link to post Share on other sites
victim913 10 Posted June 24, 2013 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
2nd ranger 282 Posted June 24, 2013 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
Duke101 18 Posted November 14, 2013 Thanks for sharing this- very handy. Share this post Link to post Share on other sites