Jump to content
cool=azroul13

How use chemlight as marker in the editor?

Recommended Posts

Hi all,

I want to create a marker with chemlight, this marker would be preplaced in the editor !!

And not to be placed Ingame! ;)

I want to preplaced this like a smoke but I don't any idea how to do! :o

Share this post


Link to post
Share on other sites

Is the chemlight added by script or is it thrown? If its added by script you could just name it something like chemlight1 then just setMarkerPos the marker to it. If its thrown then I reckon you would need a script or trigger running checking for the chemlight and then to setMarkerPos it. Maybe you could find the ammo classname for the chemlights & make a nearestObjects command to look for them? Wiki will have more info on that though.

Share this post


Link to post
Share on other sites

The problem is chemlight has two classes:

one for the "weapon" chemlight

one for the "ammunition" chemlight

So I thinck they need a script for "fire" the chemlight and for this I have no idea how to do??

Share this post


Link to post
Share on other sites

"ACE_Knicklicht_Object_R"

"ACE_Knicklicht_Object_G"

"ACE_Knicklicht_Object_B"

"ACE_Knicklicht_Object_W"

"ACE_Knicklicht_Object_Y"

"ACE_Knicklicht_Object_IR"

There is your answer, the classnames of the glowing an activated chemlights. Yo can add it editing the mission.sqm or via createvehicle. They aren't made to be created this way so you may have some troubles, i haven't look at the code :rolleyes:

Share this post


Link to post
Share on other sites
"ACE_Knicklicht_Object_R"

"ACE_Knicklicht_Object_G"

"ACE_Knicklicht_Object_B"

"ACE_Knicklicht_Object_W"

"ACE_Knicklicht_Object_Y"

"ACE_Knicklicht_Object_IR"

Thanks for the reply ;) lol,

I try this classname!

Share this post


Link to post
Share on other sites

It doesn't work, I try to create the chemlight with create vehicle but this no work !!

Edited by Cool=Azroul13

Share this post


Link to post
Share on other sites
It doesn't work, I try to create the chemlight with create vehicle but this no work !!

Does it create anything? Perhaps it just creates it underground or something. Try raising it higher and see if anything happens.

Share this post


Link to post
Share on other sites

sorry by the delay but it works fine i have tried it, as Jakerod try to put a little higher, you may be creating then bellow the ground or inside some object. Also make sure that the mission it's at nightime, they are a lot of more visible.

For example put in the palyer init:

xxx=createVehicle ["ACE_Knicklicht_Object_R", [getpos player select 0,getpos player select 1,2], [], 0,"CAN_COLLIDE"] 

this will create a chemlight just above de player flying in the air :P.

Edited by columdrum

Share this post


Link to post
Share on other sites

Im trying to make an LZ at night and want 3x chemlights in a triangle about 100m apart. Can anyone help me please?

Share this post


Link to post
Share on other sites

In editor, or created dynamically in mission?  Having the classnames, you need the positions.  In editor position can be obtained with a marker.

centerPos = getMarkerPos "marker1";

Getting the position in mission depends on what you intend to use for a center pos.

 

There's a math calculation I can't recall (would have to dig) that uses sin, cosine, direction and range from a central pos to get perfect pos from a circle.  But a less precise, much simplified version, where pos serves as the (centered) base of a triangle, would be:
 

Spoiler



/* layout:
	o
	|
	+88
	|
o (-50) M1 +50  o

*/

// 0.1 to elevate slightly so it's not in the ground.  Might need higher depending on the terrain.
posM1 = getMarkerPos "marker1";
veh1 = "ACE_Knicklicht_Object_W" createVehicle [posM1 select 0, (posM1 select 1) + 88, 0.1];
veh2 = "ACE_Knicklicht_Object_W" createVehicle [(posM1 select 0) - 50, posM1 select 1, 0.1];
veh3 = "ACE_Knicklicht_Object_W" createVehicle [(posM1 select 0) + 50, posM1 select 1, 0.1];

 

 

Share this post


Link to post
Share on other sites

Hi and thanks for your swift reply.Its for editing and being a total noob to scripting, all this info you provided I have no clue were to place it. I have placed a parachute landing target on the map which sits 64m ASL. Do I have to give it a name and or put the

posM1 = getMarkerPos "marker1";
veh1 = "ACE_Knicklicht_Object_W" createVehicle [posM1 select 0, (posM1 select 1) + 88, 0.1];
veh2 = "ACE_Knicklicht_Object_W" createVehicle [(posM1 select 0) - 50, posM1 select 1, 0.1];
veh3 = "ACE_Knicklicht_Object_W" createVehicle [(posM1 select 0) + 50, posM1 select 1, 0.1];

into its init slot? being 64ASL Im not sure what figures that are in there may need to be changed to accomdate this.

Do I have to set a marker and three other objects down? each being named veh1,veh2,veh3 and then only put the corresponding script line in each of the init files of those veh,s?

Share this post


Link to post
Share on other sites

Put the code in the init field of the parachute jump target.  Place a marker about 50 meters south of your jump target and name it "marker1".  You don't have to place the nightlight objects down.  They'll be created at mission start when the jump object initializes.  The objects are created AGL - at ground level.  But they tend to clip into the ground, or be obscured by grass, which is why they're raised  (+0.1 meter).

 

veh1, veh2 and veh3 are variables you use to refer to those nightlights.  Example, you could place a radio trigger to find the distances between them:

 

Trigger:

Activation: Radio Alpha - Repeatedly

Text: Get distances

On Act.:

dis1 = veh1 distance veh2;

dis2 = veh2 distance veh3;

dis3 = veh3 distance veh1;

hint format ["light 1 to light 2: %1 m \n light 2 to light 3: %2 m \n light 3 to light 1: %3 m",dis1,dis2,dis3];

 

  • Like 1

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

×