Jump to content
TheMakaan

Addaction Teleport

Recommended Posts

Hello I'm little rusty on my mission editing skills, but I'm trying to make a mission so one player as the ability to click on map to teleport I have this on him at the moment Mosstone addAction ["Teleport", {player execVM "teleport.sqf"}]; 
Mosstone being the name of the player, but when the player is killed the action doesn't reappear, but anyone is then able to active it when near the dead body that once had this action. Hope someone can set me straight on this little problem I have  :rolleyes:  

Share this post


Link to post
Share on other sites

Hello I'm little rusty on my mission editing skills, but I'm trying to make a mission so one player as the ability to click on map to teleport I have this on him at the moment Mosstone addAction ["Teleport", {player execVM "teleport.sqf"}]; 

Mosstone being the name of the player, but when the player is killed the action doesn't reappear, but anyone is then able to active it when near the dead body that once had this action. Hope someone can set me straight on this little problem I have  :rolleyes:  

Isnt it supposed to teleport you WHILE you are living?

 

Nonetheless share your teleport.sqf

Share this post


Link to post
Share on other sites

This will give the player an action again when he has respawned. Use it in init.sqf

Mosstone addEventHandler ["respawn", {Mosstone addAction ["Teleport", {player execVM "teleport.sqf"}]; } ];

Share this post


Link to post
Share on other sites

 

This will give the player an action again when he has respawned. Use it in init.sqf

Mosstone addEventHandler ["respawn", {Mosstone addAction ["Teleport", {player execVM "teleport.sqf"}]; } ];

Didn't work  :huh:. Do I have to put anything special on the unit itself ? I named the unit Mosstone and added those to the Init.sqf

Share this post


Link to post
Share on other sites

Sorry I mightve gotten confused, it may need to be in initplayerLocal.sqf
 

if (player == mosstone) then {player addEventHandler ["respawn", {player addAction ["Teleport", {player execVM "teleport.sqf"}]; } ];};

Share this post


Link to post
Share on other sites

 

Sorry I mightve gotten confused, it may need to be in initplayerLocal.sqf

 

if (player == mosstone) then {player addEventHandler ["respawn", {player addAction ["Teleport", {player execVM "teleport.sqf"}]; } ];};

Oh thanks no problem, we are all here to learn  :D I'll try it out and tell you the methods if it worked out 

Share this post


Link to post
Share on other sites

 

Sorry I mightve gotten confused, it may need to be in initplayerLocal.sqf

 

if (player == mosstone) then {player addEventHandler ["respawn", {player addAction ["Teleport", {player execVM "teleport.sqf"}]; } ];};

 

Hmm still not working, Do I have to put anything in the mosstone init line in the editor ? I'm starting up my mission and nothing is coming up on the scroll wheel =<

Share this post


Link to post
Share on other sites

How are you executing it? or post your code, it doesnt require anything other than the player in question being the unit called mosstone

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

×