OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: Cougarxr7 on 13 Jul 2009, 18:15:11
-
The respawn on squad leader (RSSQL) works very well thanks to Spooner however, players sometimes respawn at default.
To work around this, I am reusing a flag pole/trigger that was used for the "Halo". I set it up that a player gets "Teleport RQL" when he gets close to the flag pole.
I just do not have the script "teleportSQL.sqf" for that, I need help scripting it.
How would you script that?
Thanks.
-
Hmm, I really don't understand why anyone should be spawning at the default base position, unless the leader is dead or unless you are the leader (in which case you can't spawn on yourself).
-
Spooner, thanks for the reply.
I got this script to work.
teleportSQL.sqf
if (not isDedicated) then
{
if (player == (leader player)) then
{
hint "You are not a Squad Member! You are a Leader!";
}
else
{
private ["_leader", "_spawnPos"];
_leader = leader player;
_spawnPos = (vehicle _leader) modelToWorld [0, -2, 0];
_spawnPos set [2, 0];
player setPos _spawnPos;
};
};