Jump to content
Scarat

MP Teleport via AddAction for each player

Recommended Posts

Hey guys,

i wanna teleport the playable Units (8 Slots - var name: p1-p8) to a marker.
Each  player should use the teleport action  at a door and then be teleported to the marker with a fade in e.g. "Few moments later…" or something - and only the player that use the action should see the fade in

 

 

 

thx for helping

Share this post


Link to post
Share on other sites

i tried to teleport each player with 

p1 setPosATL getmarkerPos "XXXX"; 


Issue: if only 4 players are playing, then there is an script issue because for example p7 is not available

i testing right now this code:

player setPosATL getmarkerPos "X";

It works but i dont know if the code works with multiple players and if they see the fading text each time when the script is in use...

Share this post


Link to post
Share on other sites
5 minutes ago, Scarat said:

It works but i dont know if the code works with multiple players and if they see the fading text each time when the script is in use...

the code will work if it is executed local on each players client and

I cant see any fading text in your code.... I guess with this code nobody will see any fading text.

Share this post


Link to post
Share on other sites
cutText ["XXXXXXX", "BLACK FADED"];
10 fadeSound 1;
10 fadeMusic 0.5;
sleep 5;
player setPosATL getmarkerPos "t4";
titleCut ["", "BLACK IN", 5];

 

Share this post


Link to post
Share on other sites

You can put the addAction command into initPlayerLocal.sqf.

This way every logged in player will get the action without any further issues.

If the player needs to be able to teleport after respawn simply put it into onPlayerRespawn.sqf as well.

 

Cheers

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

×