Code: Select all
destinations:
if(local.p.dmteam == allies)
{
thread tele1
}
else
// must be axis if gametype >= 2
{
thread tele2
}
end
Moderator: Moderators
Code: Select all
destinations:
if(local.p.dmteam == allies)
{
thread tele1
}
else
// must be axis if gametype >= 2
{
thread tele2
}
end
jv_map wrote:Code: Select all
destinations: if(local.p.dmteam == allies) { thread tele1 } else // must be axis if gametype >= 2 { thread tele2 } end
Well tested it and it behaves just if there was only one spawn tele for both teams. Still can not make diferrence betwing the allies from axis. They all continue to spawn using only one spawn point. Any more Ideas?jv_map wrote:Code: Select all
destinations: if(local.p.dmteam == allies) { thread tele1 } else // must be axis if gametype >= 2 { thread tele2 } end
Code: Select all
destinations:
local.p = parm.other
if(local.p.dmteam == allies)
{
thread tele1
}
else
// must be axis if gametype >= 2
{
thread tele2
}
end
Yes the players already have choosen their teams. What exactly you mean by the adjusting timing?tltrude wrote:You need to adjust your timing because the teleporter and a target must already be there before the player teleports. Will the player already have choosen a team when he spawns at the spawn point?Code: Select all
destinations: local.p = parm.other if(local.p.dmteam == allies) { thread tele1 } else // must be axis if gametype >= 2 { thread tele2 } end
tltrude wrote:Rats it still continue to use only one destination regardless of which team your in. There is got to be a way to tell it that this one is axis therefore use the axis destination and same for the allied. it justs keeps using one selection. We are missing something in the code. LOL.Code: Select all
destinations: local.p = parm.other if(local.p.dmteam == allies) { thread tele1 } else // must be axis if gametype >= 2 { thread tele2 } end
<TWZ>WarTech
You need to adjust your timing because the teleporter and a target must already be there before the player teleports. Will the player already have choosen a team when he spawns at the spawn point?
jv_map wrote:Code: Select all
destinations: if(local.p.dmteam == allies) { thread tele1 } else // must be axis if gametype >= 2 { thread tele2 } end
What should I use then? If I remove that line the script will not work. Post me a modification as to how it should look them.tltrude wrote:"tele" is a command word and should not be used as a targetname.
Code: Select all
main:
level waittill prespawn
exec global/ambient.scr mohdm7
thread tele1
thread tele2
thread teleport
level waittill spawn
end
teleport: //Teleport Player
local.tele = spawn trigger_multiple targetname "tele_trigger"
local.tele.origin = ( 64 -896 -56 )
local.tele setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 )
while (1)
{
$tele_trigger waittill trigger
local.player = parm.other
if (local.player.dmteam == "allies")
{
local.player tele $teled1
}
if (local.player.dmteam == "axis")
{
local.player tele $teled2
}
wait .1
}
end
tele1: //Teleport dest 1 Allies
local.teledest = spawn func_teleportdest targetname "teled1"
local.teledest.origin = ( 416 32 -56 )
local.teledest setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 )
end
tele2: //Teleport dest 2 Axis
local.teledest = spawn func_teleportdest targetname "teled2"
local.teledest.origin = ( -416 32 -56 )
local.teledest setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 )
end
Great job. I see what you mean. Thanks for the work. Check up you PM.tltrude wrote:This seems to work. Sorry. I changed your coordinates for my test map. See what I mean about "tele" being a command word?
Code: Select all
main: level waittill prespawn exec global/ambient.scr mohdm7 thread tele1 thread tele2 thread teleport level waittill spawn end teleport: //Teleport Player local.tele = spawn trigger_multiple targetname "tele_trigger" local.tele.origin = ( 64 -896 -56 ) local.tele setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 ) while (1) { $tele_trigger waittill trigger local.player = parm.other if (local.player.dmteam == "allies") { local.player tele $teled1 } if (local.player.dmteam == "axis") { local.player tele $teled2 } wait .1 } end tele1: //Teleport dest 1 Allies local.teledest = spawn func_teleportdest targetname "teled1" local.teledest.origin = ( 416 32 -56 ) local.teledest setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 ) end tele2: //Teleport dest 2 Axis local.teledest = spawn func_teleportdest targetname "teled2" local.teledest.origin = ( -416 32 -56 ) local.teledest setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 ) end
I hoped it had a function like thattltrude wrote:The "func_teleportdest" will automattically kick the player off the destination spot, so other players can land there.
Well its more than that; let me explaning it to you guys:tltrude wrote:Bjarne BZR - He is using this for singleplayer maps that have only the info_player_start as a spawn spot. The "func_teleportdest" will automattically kick the player off the destination spot, so other players can land there.
I switched it from using a trigger_teleport to using a trigger_multiple because it takes to long to spawn a new trigger each time a player joins or switches teams. So, the trigger will always be there for anyone spawning or when someone tries to block the spot.
I don't know if it will work right when 32 people try to spawn at the same time. But, it is worth a shot.