Page 1 of 1
target naming spawn points
Posted: Sun Oct 03, 2004 12:20 pm
by Dragon013
hello
does anyone no the script for adding and target naming spawn points?
if u do can give exzample
niceone
Posted: Sun Oct 03, 2004 2:06 pm
by bdbodger
yes pak5.pk3 - maps/obj/obj_team3.scr look for
$spawn_allied2 disablespawn
$spawn_allied3 disablespawn
or
$spawn_axis1 disablespawn
$spawn_axis2 enablespawn
$spawn_allied1 disablespawn
$spawn_allied3 enablespawn
thats good i need that, also
Posted: Mon Oct 04, 2004 9:13 am
by Dragon013
thats good i need that also but need to no the correct way of creating the target named spawn this is what i have tried:
example1
Code: Select all
local.allies = spawn info_player_allied "targetname" "al1"
local.allies.angle = 7
local.allies.origin = ( -6480 -3802 476 )
local.axis = spawn info_player_axis "targetname" "al1"
local.axis.angle = -97
local.axis.origin = ( 4438 -181 570 )
example2
Code: Select all
spawn info_player_axis "targetname" "ax1"
$ax1.angle = -106
$ax1.origin = ( -1040 -479 448 )
spawn info_player_allies "targetname" "al1"
$al1.angle = -9
$al1.origin = ( -5136 -3295 459 )
hope this can help u help me
niceone
Dragon013
Posted: Mon Oct 04, 2004 11:04 am
by Bjarne BZR
The first should work. The second will not work, as using the targetname as handle will probably screw up because as you have multiple entities with the same targetname... so I think $al1 will contain an array of spawns in the second variant ( not sure exactly, by anyways: the first one should work just fine ).
Posted: Mon Oct 04, 2004 1:48 pm
by bdbodger
If you give the both the same targetname you will need to call them as an array $al1[1] $al1[2] etc also how are you going to tell which one is the axis or allies spawnpoint . I assume you want to turn some off and others on like this maybe only do the same for each team with different targetnames so you can tell what ones to turn off for each team.
$allies_front_spawnpoint disablespawn
$allies_back_spawnpoint enablespawn
or for more than one
for(local.i=1;local.i<=$allies_front_spawnpoint.size;local.i++)
{
$allies_front_spawnpoint[local.i] disablespawn
}
for(local.i=1;local.i<=$allies_back_spawnpoint.size;local.i++)
{
$allies_back_spawnpoint[local.i] enablespawn
}
Posted: Mon Oct 04, 2004 4:24 pm
by Bjarne BZR
Actually, writing:
Code: Select all
$allies_front_spawnpoint disablespawn
...will disable all spawns with that targetname. I guess the command was ment to work on arrays from the start.
Posted: Mon Oct 04, 2004 9:43 pm
by bdbodger
Is that right? cool thats better