Page 1 of 2

Help! (No Cross)

Posted: Sat Oct 28, 2006 6:11 am
by BBmac
Ok, i need help with a no cross script. The coordinate for the point where i dont want anyone to go is (-506.74 -1253.69 -959.88). I am trying to learn my self but this is frustrating me. Can anyone help me?

Posted: Sat Oct 28, 2006 8:24 am
by ViPER
hmmm.... need more - like what are you talking about ?

Posted: Sat Oct 28, 2006 12:08 pm
by BBmac
Ok so like.... When they step into a certain area in the map i want it to kill them. Like this one is for the axis roof glitch (Malta map in demo). I want to make it so like when they step in the glitch, it will automatically kill them. Can you help me? I have been to modtheater but all their post are outdated and they have a little bit more experience in their descussions so im not catching on to their intstructions for this scripting.

I have also worked very hard on some weapon limiting commands for my clan. Now the commands for each weapon are put in a separate .cfg. Now, in order to be able to put all of those in a .pk3 (so that it works and i will be able to exec multiple cfgs at once) what would i need? Im thinking a .scr but what does it need to look like exactly? I also would like help with this mod very badly but the no cross zone is more important to me.

Posted: Sat Oct 28, 2006 5:36 pm
by Green Beret
Spawn a Trigger and add a setthread and use volumedamage 15
the bigger the number, the more health is taken, If you just want them dead, Use kill

Heres a similar thread with the script to do what you want

/forum/viewtopic.php?t=8111

Posted: Sat Oct 28, 2006 7:48 pm
by BBmac
thank you! I get it but im still not sure... like with the example from that post is barbwire just a code name or is it actual barbwire? I dont really want to have to put an object up there, I just want it to be a zone where it automatically kills you. So would the wholecode look like this:

Code: Select all

Player_Detector:

local.trig = spawn trigger_multiple
local.trig.origin = (-506.74 -1253.69 -959.88)
local.trig setsize (-30 -30 0 ) ( 30 30 50 )
local.trig wiattill trigger
local.player = parm.other
{
$player[local.p] stufftext ("kill")
lprintbold "Do not Cross!"
wait 1
}
while (isalive local.player)
{
$player[local.p] stufftext ("kill")
wait 1.1
}
local.trig remove
thread Player_Detector
end
I have tried using that. I need to work on my origins a bit but thats not the problem. Can you tell me what is wrong with that code and post the correct coding? Also if you can leave out any extra non needed spaces because that just confuses me more while im learning this kind of stuff :? Is that all i need in the .scr? I dont need any extra values or anything for it to work right? (I know i have to do the dmpreache exec global/roofglitch.scr) Thanks soooo much for the help!

Also can a respawn delay be added on to it. Like after it kills them for being there they wont be able to respawn for lets say 45-60 seconds? And would i be able to bypass this whole set .scr if i needed to? Sorry, i know im asking a lot but i just want to learn this stuff first hand by example.

Posted: Sat Oct 28, 2006 9:29 pm
by Green Beret
local.trig wiattill trigger

You mis spelled waittill ^=wiattill

correct spelling is waittill

That can all be done, I dont have time right this minute to post but im sure one of the forums regulars will help out for sure :wink:

Posted: Sun Oct 29, 2006 12:44 pm
by BBmac
ok thank you!... can anyone post the code for me?

Posted: Sun Oct 29, 2006 7:37 pm
by ViPER
thread your kill trigger from after prespawn


put these after end

Code: Select all


badspot:
local.spot1 = spawn trigger_multiple
local.spot1.origin = ( 0 0 0 ) //your coords here
local.spot1 setsize ( -60 -60 -10 ) ( 60 60 30 ) //setsize here
local.spot1 waittill trigger
local.spot1 setthread badboy
local.spot1 message "This is a bad spot!"
local.spot1 delay 0
end

badboy:
local.badboy = parm.other
local.badboy say "I'm a bad boy!"
wait 1
local.badboy kill
end
add a new badspot thread for each spot e.g.-

badspot2

and thread it from after prespawn

Posted: Sun Oct 29, 2006 10:19 pm
by BBmac
TY SO MUCH... ill try it now.

Mindfield

Posted: Mon Oct 30, 2006 5:16 am
by tltrude
You could also spawn a "minefield" to blow players up.

Posted: Mon Oct 30, 2006 2:31 pm
by Green Beret
Yea, Them are awsome, Theyll do a big flip....
Alot funnier to watch :P

Posted: Mon Oct 30, 2006 10:06 pm
by BBmac
This is the code im using now...

Code: Select all

roofkill:
	local.trig = spawn trigger_+moveup
	local.trig targetname roofkill
	local.trig.origin = ( -488 -1252 -926 ) 
	local.trig setsize ( -20 -20 0 ) ( 60 60 150 )
	$roofkill waittill trigger
	local.player = parm.other
	local.player stufftext "kill"	
	wait 2
	$roofkill remove
	wait .1
	thread roofkill
end
And it works! But what would i need to set the spawn trigger to for it to kill if someone even touches? What im trying to do is set one under ladders so when someone sharks it automatically kills or kicks them. Right now i have one on the ladder that if press use it will kill you. When u shark do u actually go under the floor and is it possible to set this to automatically kill people who fall under?

Posted: Tue Oct 31, 2006 12:02 am
by Green Beret
your first line is wrong

local.trig = spawn trigger_+moveup

Should be

local.trig = spawn trigger_multiple or trigger_use

Just make your coords under the ladder, And change the setsize to go further back for when they jump back

local.trig setsize 10 10 10

Im not sure wich is height, Width, Or depth

Posted: Tue Oct 31, 2006 1:02 am
by BBmac
Yea, that was an accident, but what exactly does trigger_multiple do? Is there a way i can set it to trigger on other actions instead of use?

Posted: Tue Oct 31, 2006 4:47 am
by Green Beret
trigger_multiple will trigger as soon as a player touches it.