Jump to content
Sign in to follow this  
4waymedia

How to get location of downed / dead player

Recommended Posts

I am trying to set a task with a marker that is located where a player dies. when I use the Task Module Location and sync to a object, it works until the object dies, or is blown up....And I am trying to have a helicopter shot down so that we can retrieve intel...

 

Please help.

Share this post


Link to post
Share on other sites
Guest

EventHandlers maybe ? I don't really understand what you are trying to do.

Share this post


Link to post
Share on other sites

Are you using the editor only or do you script a bit?

 

A killed EH would do the trick : you could use it to store the position of the dead player in a global variable.

You'd only need to delay the task creation with something like this :

waitUntil {!isNil "myGlobalVariable"};

Share this post


Link to post
Share on other sites

I am using the event handler to set markers on the map as well as move the Task location.

 

this addEventHandler ["hit", {  _pos = position (_this select 1);  hint format ['Taking fire. Guidance system malfunction. May-day'];  td2 setPosATL _pos;  }]

 

 

But, I am still having problems with my task marker being the altitude of the helicopter when it is first shot at.....

Share this post


Link to post
Share on other sites

This should make sure markers are always at 0 altitude :

this addEventHandler ["hit", {
	_pos = position (_this select 1);
	_pos params ["_x", "_y", ""];
	hint format ['Taking fire. Guidance system malfunction. May-day'];
	td2 setPosATL ["_x", "_y", 0];
}]

More infos on how positions work : https://community.bistudio.com/wiki/Position#PositionAGLS

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  

×