hello
does anyone no the script for adding and target naming spawn points?
if u do can give exzample
niceone
target naming spawn points
Moderator: Moderators
target naming spawn points
dragon013
thats good i need that, also
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
example2
hope this can help u help me
niceone
Dragon013
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 )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 )niceone
Dragon013
dragon013
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
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 ).
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
}
$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
}
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Actually, writing:
...will disable all spawns with that targetname. I guess the command was ment to work on arrays from the start.
Code: Select all
$allies_front_spawnpoint disablespawn
