how notice player exist in room?

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
tsensor
Sergeant
Posts: 52
Joined: Wed Feb 11, 2004 1:25 pm

how notice player exist in room?

Post by tsensor »

Image
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
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

Post by At0miC »

huh?
Splaetos
Major General
Posts: 730
Joined: Tue Jan 20, 2004 2:55 pm
Contact:

Post 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.
When I am king, you will be first against the wall~
Image
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

Lol detailed pic :lol: :roll: :lol: :roll: :lol: :roll: :lol:

anyway, lets say the trigger had a setthread and targetname of..trigger. The script could be

Code: Select all

trigger:
iprintln_noloc "A player is in the room''
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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
}
fuhrer
Captain
Posts: 253
Joined: Sun Mar 14, 2004 3:36 am

Post 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
Splaetos
Major General
Posts: 730
Joined: Tue Jan 20, 2004 2:55 pm
Contact:

Post 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))
When I am king, you will be first against the wall~
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

bucket

Post 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".
Tom Trude,

Image
rodney
Second Lieutenant
Posts: 172
Joined: Sat Mar 13, 2004 5:49 pm

Post 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!!!
Last edited by rodney on Sun Aug 08, 2004 1:49 am, edited 1 time in total.
Post Reply