Page 1 of 1
spawn Info_player_allied/axis
Posted: Wed Apr 28, 2004 6:16 pm
by Phil
Is there anyway of spawning a
Info_player_allied/axis into a map.
I would like to add somes spawns to a compiled map. I can do it threw the bsp, but this involves removing something to add something.
Is it possible to spawn them before the
prespawn maybe like the way you would with a mg42, crate, etc....
Thanks

Posted: Wed Apr 28, 2004 6:54 pm
by jv_map
Yes

Posted: Wed Apr 28, 2004 7:07 pm
by Phil
Any ideas of the working script?
would this work or do you know what needs changing?
local.player1 = spawn info_Player_allied
local.player1.origin = ( 111.00 111.00 111.00 )
local.player1.angles = ( 90 )
Could'nt seem to get anything to work last night.

Posted: Wed Apr 28, 2004 7:23 pm
by jv_map
Should be info_player_allied (or maybe _allies), for all that matters do not type player with a capital
Also angles should be a vector, i.e. (0 90 0)
Posted: Thu Apr 29, 2004 2:43 pm
by WarTech
jv_map wrote:Should be info_player_allied (or maybe _allies), for all that matters do not type player with a capital
Also angles should be a vector, i.e. (0 90 0)
Hi there Jv.
Here is what I use:
// For Allies
local.allied = spawn info_player_allied origin "xxx xxx xxx" angle x
// For Axis
local.axis = spawn info_player_axis origin "xxx xxx xxx" angle x
Make sure its before this line or else you may want to call it with a thread.
level waitTill prespawn
<TWZ>WarTech
Remember, its just a game!! LOL

Posted: Fri Apr 30, 2004 3:54 pm
by Rindog
Both methods will work. The thing you must realize though, is that there are two different properties of an entity (angle and angles). Angles represent pitch, yaw and roll; whereas angle just represents Yaw. Since yaw is the only one that really applies to a spawn point, I prefer to use angle like WarTech did, but if you use angles then it has to be in vector form like JV_Map suggested.
Here's an example taken from Malta. Basically what I have is 3 different scenerios for Mefys Capture the Flag and based on the flag positions I change the spawn locations. It actually creates an array of spawn spots for each team and I used the indy crate to block the original spawns.
In the main script file for Malta I have the line:
Code: Select all
waitthread maps/dm/mapfixes/mp_malta_dm_fix.scr::main local.nextbase
And in the file maps/dm/mapfixes/mp_malta_dm_fix.scr
Code: Select all
main local.nextbase:
switch (local.nextbase)
{
case 0 : Waitthread spawn0
break
case 1 : Waitthread spawn1
break
case 2 : Waitthread spawn2
break
}
end
new_spawnspot local.team local.origin local.angle:
switch(local.team)
{
axis:
local.axis = spawn info_player_axis
local.axis.origin = local.origin
local.axis.angle = local.angle
break
allied:
local.allied = spawn info_player_allied
local.allied.origin = local.origin
local.allied.angle = local.angle
}
end
new_model local.model local.origin local.angles:
local.models = spawn script_model
local.models.model = local.model
local.models.origin = local.origin
local.models.angles = local.angles
local.models show
local.models solid
local.models nodamage
end
spawn0:
waitthread new_spawnspot axis ( 2472 491 -1291 ) 270
waitthread new_spawnspot axis ( 2507 -1257 -1279 ) 180
waitthread new_spawnspot axis ( 1506 -2073 -1364 ) 90
waitthread new_spawnspot axis ( 686 -542 -1247 ) 180
waitthread new_spawnspot axis ( 710 -438 -1087 ) 225
waitthread new_spawnspot axis ( -505 -13 -1183 ) 270
waitthread new_spawnspot axis ( -1005 172 -1407 ) 315
waitthread new_spawnspot axis ( -604 -27 -1391 ) 270
waitthread new_model "static/indycrate.tik" ( -2512 -2312 -1560 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -2528 -3120 -1392 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -2688 -2400 -1272 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -1940 -2236 -1012 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -2640 -1736 -1264 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -2176 -2288 -1284 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -2184 -1520 -1536 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -1584 -2032 -1536 ) (0 0 0)
end
spawn1:
waitthread new_spawnspot allied ( -72 8 -1080 ) 0
waitthread new_spawnspot allied ( 824 -432 -1080 ) 0
waitthread new_spawnspot allied ( 1680 424 -1256 ) 270
waitthread new_spawnspot allied ( 2472 -536 -1264 ) 180
waitthread new_spawnspot allied ( 2280 -1344 -1256 ) 180
waitthread new_spawnspot allied ( 1016 -1288 -752 ) 0
waitthread new_spawnspot allied ( 2504 -264 -1680 ) 0
waitthread new_spawnspot allied ( 2288 -1512 -1416 ) 270
waitthread new_spawnspot axis ( -2264 -488 -1272 ) 315
waitthread new_spawnspot axis ( -1149 -2040 -936 ) 90
waitthread new_spawnspot axis ( -176 -1032 -1344 ) 270
waitthread new_model "static/indycrate.tik" ( -2512 -2312 -1560 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -2184 -1520 -1536 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -1584 -2032 -1536 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( 1404 3600 -1392 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( 2408 4040 -1254 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( 1606 3032 -1396 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( 2536 3856 -1048 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( 2688 1224 -1392 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( 2440 2304 -1384 ) (0 0 0)
waitthread new_model "static/indycrate.tik" (64 2456 -976 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( 2132 2468 -1000 ) (0 0 0)
end
spawn2:
waitthread new_spawnspot axis ( -88 1816 -1392 ) 90
waitthread new_spawnspot axis ( -968 2024 -1384 ) 0
waitthread new_spawnspot axis ( -1024 264 -1464 ) 90
waitthread new_spawnspot axis ( 160 2120 -1400 ) 0
waitthread new_spawnspot axis ( -184 2296 -1400 ) 0
waitthread new_spawnspot axis ( -200 2776 -1392 ) 270
waitthread new_spawnspot axis ( -208 2896 -1008 ) 270
waitthread new_spawnspot axis ( -976 56 -1464 ) 0
waitthread new_model "static/indycrate.tik" ( -2512 -2312 -1560 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -2528 -3120 -1392 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -2688 -2400 -1272 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -1940 -2236 -1012 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -2640 -1736 -1264 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -2176 -2288 -1284 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -2184 -1520 -1536 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( -1584 -2032 -1536 ) (0 0 0)
waitthread new_spawnspot allied ( 760 -1584 -1352 ) 135
waitthread new_spawnspot allied ( 1304 -1512 -1096 ) 225
waitthread new_spawnspot allied ( 176 -1792 -1352 ) 90
waitthread new_spawnspot allied ( 1520 -2024 -1344 ) 180
waitthread new_spawnspot allied ( 1848 -1720 -1360 ) 180
waitthread new_spawnspot allied ( -64 -888 -1080 ) 270
waitthread new_spawnspot allied ( -760 -896 -1080 ) 315
waitthread new_spawnspot allied ( 152 -1168 -1336 ) 135
waitthread new_model "static/indycrate.tik" ( 1404 3600 -1392 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( 2408 4040 -1254 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( 1606 3032 -1396 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( 2536 3856 -1048 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( 2688 1224 -1392 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( 2440 2304 -1384 ) (0 0 0)
waitthread new_model "static/indycrate.tik" (64 2456 -976 ) (0 0 0)
waitthread new_model "static/indycrate.tik" ( 2132 2468 -1000 ) (0 0 0)
end
Posted: Fri Apr 30, 2004 5:08 pm
by jv_map
Great info Rindog

also great to see you posting here again

Posted: Sat May 01, 2004 2:13 am
by MPowell1944
jv in your new botpack you managed to spawn pathnodes for the bots. could you do this same method to spawn spawnpoints? since this is AA and not SH or BT i figured it would be near impossible to do.
Posted: Sat May 01, 2004 6:54 am
by jv_map
Well it is very simple actually... just spawn the pathnodes or spawnpoints
before level waittill prespawn and you should be fine

Posted: Sun May 02, 2004 2:38 pm
by MPowell1944
here is the line i have right before prespawn and i still cannot get the spawnpoint to come up in the map for DV
local.allied = spawn info_player_allied origin "96.64 1037.86 22.57" angle -180
this is for AA. you sure it works?
Posted: Sun May 02, 2004 3:10 pm
by jv_map
Yes... I think that should work...
Posted: Sun May 02, 2004 8:12 pm
by MPowell1944
Well, it does not seem to be working for me. Possibility of you getting a single spawn in there and showing me how you get it to work? Would be appreciated.
Posted: Tue May 04, 2004 2:16 pm
by Rindog
Thanks for the warm welcome JV

I've been around, but I usually spend more time searching and reading than I do posting.
MPowell1944, Sitting_Duck has a mod at
http://wave.prohosting.com/uberduck/spawnmod.htm . Although written for SH, it has spawn spots added to DV.
Posted: Tue May 25, 2004 7:26 pm
by WarTech
MPowell1944 wrote:here is the line i have right before prespawn and i still cannot get the spawnpoint to come up in the map for DV
local.allied = spawn info_player_allied origin "96.64 1037.86 22.57" angle -180
this is for AA. you sure it works?
Hi there MPowell1944:
Send me your map script and and Ill try to make it work for your.
Contact at
twzfragzone@hotmail.com
Regards
<TWZ>WarTech
try
Posted: Tue May 25, 2004 8:45 pm
by tltrude
Try this:
local.allied = spawn info_player_allied
local.allied.origin = ( 97 1038 23 )
local.allied.angle = 180
Here is a cute little script that will move players to a new location, right after they spawn in a sp map, depending on which team they join. It probably is not what you are looking for, but it shows you can spawn teleport triggers at the exsisting spawn points and move the spawner to a new spot.
Code: Select all
main:
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
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 = ( -8 -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
}
if (local.player.dmteam == "spectate")
{
end
}
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