Page 1 of 2
2 Questions
Posted: Thu Jan 27, 2005 10:55 pm
by MPowell1944
How would I check to see when a player spawns?
Can you set runspeed on a player like you can with scale and gravity?
I need to wipe off the modding rust

Posted: Fri Jan 28, 2005 8:15 am
by jv_map
Glueing a trigger to a player and waiting for it to be triggered is an option... might be easiers ways but I'm not aware of a fully functioning one.
Runspeed can be set via weaponcommand (runspeed is a weapon property)

Posted: Fri Jan 28, 2005 11:01 am
by Elgan
jv_map wrote:Glueing a trigger to a player and waiting for it to be triggered is an option... might be easiers ways but I'm not aware of a fully functioning one.
Runspeed can be set via weaponcommand (runspeed is a weapon property)

Runspeed can be set via weaponcommand (runspeed is a weapon property)

what about unarmed?
Posted: Fri Jan 28, 2005 1:11 pm
by Rookie One.pl
jv_map wrote:Glueing a trigger to a player and waiting for it to be triggered is an option... might be easiers ways but I'm not aware of a fully functioning one.
Isn't this going to be triggered all the time?

Posted: Fri Jan 28, 2005 1:28 pm
by Elgan
Rookie One wrote:jv_map wrote:Glueing a trigger to a player and waiting for it to be triggered is an option... might be easiers ways but I'm not aware of a fully functioning one.
Isn't this going to be triggered all the time?

it depends what trigger it is
Posted: Sat Jan 29, 2005 3:49 am
by lizardkid
can;t you do this?
Code: Select all
spawn_listener:
for($player[local.i] = 1; $player[local.i] < 32; $player[local.i]++)
{
local.curPlayer = $player[local.i]
local.curPlayer waittill spawn
// code
}
? or is the player array something totally different?
Posted: Sat Jan 29, 2005 8:13 am
by jv_map
I don't think waittill spawn works for players

Posted: Sun Jan 30, 2005 4:25 pm
by Rookie One.pl
jv_map wrote:Glueing a trigger to a player and waiting for it to be triggered is an option... might be easiers ways but I'm not aware of a fully functioning one.
Jv, you are wrong.

This doesn't work. You're using this in your bots and notice that the bots start spawning right after you choose the team, not after choosing the weapon and spawning physically. That's because the trigger is activated right after choosing the team and there's a direct jump from stage 2 to stage 3.
I badly need to know when a player spawns!

Has anyone got an idea how to figure this out?
Posted: Sun Jan 30, 2005 5:05 pm
by Elgan
well triggers at spawn points is what i used but i thought maybe have a trigger like jv said then have spawnednearly = 1
then when state land is reached they have spawned right?
Posted: Sun Jan 30, 2005 5:24 pm
by Rookie One.pl
Elgan wrote:well triggers at spawn points is what i used but i thought maybe have a trigger like jv said then have spawnednearly = 1
then when state land is reached they have spawned right?
Could you expand this a bit? What's this spawnedearly? How to use it?
Posted: Sun Jan 30, 2005 5:32 pm
by Bjarne BZR
Check the scanner scripting in
The Canna LIB, especially
player_scanner and the
detect_player_status functions that jv_map helped me with.
Posted: Sun Jan 30, 2005 5:51 pm
by Rookie One.pl
No, Bjarne, this is exactly the same issue as I described in my previous post - it will be triggered before you choose the weapon.
Elgan, expand it, please...
Posted: Sun Jan 30, 2005 5:54 pm
by jv_map
Rookie One wrote:Jv, you are wrong.

This doesn't work. You're using this in your bots and notice that the bots start spawning right after you choose the team, not after choosing the weapon and spawning physically. That's because the trigger is activated right after choosing the team and there's a direct jump from stage 2 to stage 3.
No I am not wrong

the bots start spawning as soon as either team has any players, but that doesn't mean a trigger has been fired or a bug has been found

... the player triggers aren't used there...
However for the bots the trigger 'trick' is primarily responsible for making sure bots don't attack or folllow spectators.
Posted: Sun Jan 30, 2005 5:57 pm
by Rookie One.pl
Whoops... I must have misread something...

Well it appeared to me that the bots will spawn after somebody has physically spawned. Dangit, must look into it more carefully...
<EDIT>Nah, I tell you, this doesn't work!

Here's my thread:
Code: Select all
waitTillJoinGame:
while (self.dmteam == "spectator" || !isAlive(self))
waitframe
local.trigger = spawn trigger_multiple origin self.origin
local.trigger setsize ( -16 -16 -16 ) ( 16 16 16 )
local.trigger waittill trigger
self thread global/enemyterritory/class_handler.scr::determineClass
self thread waitTillDeath
end
The determineClass thread reads the weapon the player's carrying and gives him a new, class-specific loadout, but it's called right at the moment of choosing a team... Aaargh!!!

</EDIT>
Posted: Sun Jan 30, 2005 6:05 pm
by Master-Of-Fungus-Foo-D
thatll teach you o call jv_map
wrong 