Help! (No Cross)

Post your scripting questions / solutions here

Moderator: Moderators

BBmac
Sergeant
Posts: 54
Joined: Sat Oct 28, 2006 6:05 am

Help! (No Cross)

Post 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?
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

hmmm.... need more - like what are you talking about ?
BBmac
Sergeant
Posts: 54
Joined: Sat Oct 28, 2006 6:05 am

Post 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.
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post 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
Image
BBmac
Sergeant
Posts: 54
Joined: Sat Oct 28, 2006 6:05 am

Post 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.
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post 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:
Image
BBmac
Sergeant
Posts: 54
Joined: Sat Oct 28, 2006 6:05 am

Post by BBmac »

ok thank you!... can anyone post the code for me?
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post 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
BBmac
Sergeant
Posts: 54
Joined: Sat Oct 28, 2006 6:05 am

Post by BBmac »

TY SO MUCH... ill try it now.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Mindfield

Post by tltrude »

You could also spawn a "minefield" to blow players up.
Tom Trude,

Image
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

Yea, Them are awsome, Theyll do a big flip....
Alot funnier to watch :P
Image
BBmac
Sergeant
Posts: 54
Joined: Sat Oct 28, 2006 6:05 am

Post 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?
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post 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
Image
BBmac
Sergeant
Posts: 54
Joined: Sat Oct 28, 2006 6:05 am

Post 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?
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

trigger_multiple will trigger as soon as a player touches it.
Image
Post Reply