Home   Help Search Login Register  

Author Topic: Flag pole used as teleport to squad leader.SOLVED!  (Read 2313 times)

0 Members and 1 Guest are viewing this topic.

Offline Cougarxr7

  • Members
  • *
Flag pole used as teleport to squad leader.SOLVED!
« 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.
« Last Edit: 01 Aug 2009, 05:39:40 by Cougarxr7 »
If this thread is in volation of forum rules , please delete.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Flag pole used as teleport to squad leader.
« Reply #1 on: 13 Jul 2009, 23:17:32 »
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).
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Cougarxr7

  • Members
  • *
Re: Flag pole used as teleport to squad leader.SOLVED!
« Reply #2 on: 01 Aug 2009, 01:35:26 »
Spooner, thanks for the reply.
I got this script to work.
teleportSQL.sqf
Code: [Select]
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;
};
};
« Last Edit: 01 Aug 2009, 04:01:36 by Cougarxr7 »
If this thread is in volation of forum rules , please delete.