Page 1 of 1
how notice player exist in room?
Posted: Fri Aug 06, 2004 5:59 am
by tsensor

one player move into the room, door close
he is die or leave the room, door open
i tried to understand tltrude's map 'test_altelevater' bucket car
but i couldn't understand
Posted: Fri Aug 06, 2004 7:59 am
by At0miC
huh?
Posted: Fri Aug 06, 2004 8:28 am
by Splaetos
while(local.player istouching $your_trigger_name)
make a trigger multiple filling the whole room(targetname:your_trigger_name)
when its activated do whatever in the loop.
Posted: Fri Aug 06, 2004 3:28 pm
by Master-Of-Fungus-Foo-D
Posted: Fri Aug 06, 2004 3:34 pm
by lizardkid
unfortunately, he wants in in DM or Obj form, which means a totally different messaging system. and i think he jsut wants the door to open and close depending on whether a living player is inside.
while(local.player istouching $your_trigger_name)
{
$door close
}
Posted: Fri Aug 06, 2004 8:07 pm
by fuhrer
im not an expert but i cant see that workin, as the door will keep trying to close as long as the player is in the trigger? id say what u want is a trigger to detect then a player enters then a loop that keeps checking to see if that player is still in there
Posted: Fri Aug 06, 2004 9:39 pm
by Splaetos
you want the while loop to stop the thread while the player remains in the room. The door should close(and other precautions be engaged or whatever) at the start of the thread when the trigger is first activated.
seal_room:
waitTill trigger your_trigger_name
local.player = parm.other
--Close Door - Seal Room - Whatever--
while (local.player istouching your_trigger_name)
{
waitframe
}
--open door- unseal room yadda yadda yadda--
end
not sure if all of that works, but thats what I would first try.
--edit--
im not sure if dead people can be touching a trigger, but if they can that would be annoying(in this case) so alternatively:
while (local.player istouching your_trigger_name)
could become-
while ((local.player istouching your_trigger_name) && (local.player isalive))
bucket
Posted: Sat Aug 07, 2004 3:41 am
by tltrude
My bucket truck will return the bucket to the down position if the player in it is killed or leaves the bucket while it is up. It uses a very simple goto loop and checks every 0.1 seconds.
Code: Select all
$bucket_occupied_trigger waitill trigger
local.guy = parm.other
thread downcheck local.guy
downcheck local.guy:
if (!(isalive local.guy) || !(local.guy istouching $bucket_occupied_trigger))
{
$bucket_truck_speaker stoploopsound
$bucket_truck_speaker loopsound bucket_truck_snd
$bucket time 6
$arm1 time 6
$arm2 time 6
$arm1 rotateXupto 0
$arm2 rotateXdownto 0
$bucket rotateXupto 0
$arm1 move
$arm2 move
$bucket waitmove
$bucket time 1
$arm1 time 1
$arm2 time 1
$bucket_truck_speaker stoploopsound
end
}
wait .1
goto downcheck local.guy
end
As you can see the thread does its thing, and ends, if the player dies or jumps out of the bucket. "!" = "is not", and "||" = "or".
Posted: Sun Aug 08, 2004 1:47 am
by rodney
I need help to creat a trigger...
I play mohaa in network... and to play the mohdm3.bsp... i creat rules...
It is...
Four x four...
Have a house in the mohdm3.bsp i use to this... first a team need enter in the house with the minimum of one player... and if the allied enter... the house "is of the allied team"...
If you are "outside"... you can fire only to inside the house...
If you are "inside"... you can fire inside and outside the house...
But if your team "have the house"... and if you are outside... you can not fire inside... you can fire only if you are inside the house...
But if your team "have not the house"... and if you are outside... you can fire inside... but not fire outside... because you are outside...
To the team get the house... the team need kill all players of the other team... if the other team are inside the house...
It is good to play... because the house help to play like this...
But have a problem... much times the players do not remember the rules... and creat confuse rules...
Is possible i creat a trigger... with space (example... ( 2895 2963 -1212 ) ( -2237 2963 -1212 ) ( -2237 -2985 -1212 ))???
Is possible i creat a weapon clip in the mohdm3.scr???
Is possible i creat my idea in the mohdm3.scr???
Sorry because i do not start a new post...
Sorry with my bad english...
Thanks!!!