Kill, Kill and Kill again

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

Moderator: Moderators

Rich Tea Biscuit
Corporal
Posts: 34
Joined: Wed Apr 25, 2007 11:57 pm
Location: mohaa\dm2

Kill, Kill and Kill again

Post by Rich Tea Biscuit »

Perhaps this question is a little more ambitious than my last.. but Its a neat Idea I was considering..

Is there a way to script a button (presumably as a trigger) to kill random players by designation of their client numbers? I was thinking something along the lines of a roulette button.. when pressed, there's a chance of killing another player, but a similar chance of killing oneself..

Just curious I guess. Sorry, but no sugar based snacks for correct answer this time :P

The one and only RTB
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

easy

Post by tltrude »

The Random killing part would be easy, but a wheel that points at the player might be a bit tricky. The idea seems silly to me because the player that died would probably not get the joke!
Tom Trude,

Image
Rich Tea Biscuit
Corporal
Posts: 34
Joined: Wed Apr 25, 2007 11:57 pm
Location: mohaa\dm2

Post by Rich Tea Biscuit »

Doesnt have to be a particular wheel or anything.. just a button that when pressed kills off someone.. And as for players not understanding, I wouldnt worry about it too much as im planning on this being a clan training map.. it wont be open to general public, only the clan members would know about it..

Although half its purpose is to get revenge on admins who occasionally abuse their rcon powers :mrgreen:
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yah that should be relatively easy to make :) , but right now I don't know how to help you without making the whole thing :?
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

trigger

Post by tltrude »

Will there be a trigger_use in the map or are you going to spawn one in the script? In either case, you'll need a trigger_use with the targetname "kill_trigger".

death_thread:
$kill_trigger waittill trigger
local.num= randomint($player.size)
local.sucker = $player[local.num]
local.sucker kill
wait 3
goto death_thread
end


I'm not to sure it will work.
Last edited by tltrude on Fri Apr 27, 2007 2:04 am, edited 2 times in total.
Tom Trude,

Image
Rich Tea Biscuit
Corporal
Posts: 34
Joined: Wed Apr 25, 2007 11:57 pm
Location: mohaa\dm2

Post by Rich Tea Biscuit »

Probably a trigger_use within the map.. I hope. My worry is that it wont work since I dont have admin powers for the server it'll be used on. Can map properties override admin control in this case? find out soon.. i guess.

edit:I presume i need to use death_thread as the targetname, right?? Im VERY noobish with scripting.
Image
Ric-hard
Sergeant Major
Posts: 102
Joined: Sun Feb 29, 2004 6:44 am
Location: sweden
Contact:

Post by Ric-hard »

I Just couldn?t resist the challenge :P (to make something continuosly aim at the player ), heres my contribution, a toilet toilet that chases a random craphead.

Code: Select all

	roulette:
	local.button = spawn script_model model static/toilet_short.tik origin ( -100 100 -140 ) spawnflags 1

	local.start_origin = local.button.origin

	local.button_trigger = spawn trigger_use origin (local.button.origin)
	local.button_trigger setsize ( -40 -40 0 ) ( 40 40 80 )

	while (1)
	{
	local.button_trigger waittill trigger
	local.button_trigger nottriggerable

	locprint 130 70 ("RussianRouletteToilet activated, a randompicked player will be chased and flushed")

	if ($player.size == 1)
	{
	local.player = parm.other
	}
	else
	{
	local.victim = randomint($player.size)
	local.player = $player[local.victim]
	}

	local.rot_speed = randomint (500)+100
	local.button rotateY local.rot_speed

	local.wait = randomint (5)+2
	wait local.wait
	local.button rotateY 0

	local.distance = vector_length (local.player.origin - local.button.origin)

	local.player stufftext ("say " + "Crap, a toilet chases me.")

	while ( (isalive local.player) && (local.distance > 50) )
	{
	local.yaw =  angles_pointat local.button local.button local.player
	local.pitch =  angles_pointat local.player local.player local.button
	local.button.angles = ( (local.pitch[0])  (local.button.angle + (local.yaw[1] - 180)) local.button.angles[2] )

	local.button.origin = (local.button.origin + local.button.forwardvector * 10)
	local.distance = vector_length (local.player.origin - local.button.origin)
	waitframe
	}

	local.button playsound toilet_flush

	local.player hurt 100 explosion // lava falling explosion bullet
	wait 3

	local.say = randomint (3)+1
	switch (local.say)
	{
	case 1:
	local.player stufftext ("say " + "Life is like a toilet it's always full of assholes.")
	break
	case 2:
	local.player stufftext ("say " + "Life is like a toilet roll, when it's near the end, you panic.")
	break
	case 3:
	local.player stufftext ("say " + "Life is like a toilet, sooner or later all goes down the drain.")
	break
	}

	local.button.origin = local.start_origin
	local.button_trigger triggerable
	}
	end
Last edited by Ric-hard on Fri Apr 27, 2007 2:09 pm, edited 2 times in total.
Rich Tea Biscuit
Corporal
Posts: 34
Joined: Wed Apr 25, 2007 11:57 pm
Location: mohaa\dm2

Post by Rich Tea Biscuit »

What Can I say.. Im certainly Intrigued.. that will certainly freak people out..

I think Im actually speechless..
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

i... don't know what to say to that.

Have you been institutionalized recently, ric?
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Re: trigger

Post by tltrude »

tltrude wrote:...you'll need a trigger_use with the targetname "kill_trigger".
The only way the server admins can stop it is to remove your map from the rotation. They will probably do that because everyone will be angry about being killed for no reason!

By the way, if you want the player to catch on fire before he dies, try this version.

Code: Select all

random_death_thread:
 
	$kill_trigger waittill trigger 
	local.num = randomint($player.size)
	local.sucker = $player[local.num]
	local.sucker damage local.sucker 120 local.sucker (0 0 0) (0 0 0) (0 0 0) 1 2 6 0
	wait 1 
	local.fire = spawn script_model angle "-1"
	local.fire model "emitters/firegood.tik"
	local.fire.scale = .75 
	local.fire.origin = local.sucker.origin + (0 0 16)
	wait 9.5
	local.fire remove

	goto death_thread
 
end
Tom Trude,

Image
Rich Tea Biscuit
Corporal
Posts: 34
Joined: Wed Apr 25, 2007 11:57 pm
Location: mohaa\dm2

Post by Rich Tea Biscuit »

Ooooh.. me likey fire.. cheers a lot Tom.. (Thanks as well Ric, you may just have inspired me to do a gag map after this one :mrgreen: )

So in the map itself, do I link to the killing script to the button via script_object and the targetname value? Or is it trigger_use followed by setthread? (So ridiculously inexperienced at this :D

EDIT: Just read the post above, whoops^^


Oooh.. and whilst posting - Bottomless pits that dont drop through the map yet kill the player... -would I just create a tigger_hurt layer that has damage of 100 or is there more to it? (I tried to adapt instructions from a JK:JA forum that uses radiant, but with less than pleasing results..)
Image
Ric-hard
Sergeant Major
Posts: 102
Joined: Sun Feb 29, 2004 6:44 am
Location: sweden
Contact:

Post by Ric-hard »

lizardkid wrote:i... don't know what to say to that.

Have you been institutionalized recently, ric?
he... dont worry, I use to talk to the german scientist, hes a very good listener :wink: and he use to say...
Life is like a toilet it's always full of assholes.
Life is like a toilet roll, when it's near the end, you panic.
Life is like a toilet, sooner or later all goes down the drain.
(btw..Iv? added these wise words to the script)
So in the map itself, do I link to the killing script to the button via script_object and the targetname value? Or is it trigger_use followed by setthread? (So ridiculously inexperienced at this
if u use the toilet-thingie... u dont have to do any in radiant, all is done via the map-script, just post the code at the bottom of it and start it after
level waittill spawn
thread roulette


u also need to change the toilets coords
local.button = spawn script_model model static/toilet_short.tik origin ( -100 100 -140 ) spawnflags 1
Rich Tea Biscuit
Corporal
Posts: 34
Joined: Wed Apr 25, 2007 11:57 pm
Location: mohaa\dm2

Post by Rich Tea Biscuit »

You're really plugging this toilet thingy arent you (And I dont care how wrong that sounded)

Im just thinking a toilet chasing someone across the map is a little too cooky for a clan training map.. although i gonna be saving that script for my next genius attempt at a DM level.. Perhaps the concept would be *really* irritating in a freeze tag game.. (Must suggest that to admins :mrgreen: )


About the pit.. I think I remember reading a post about having to use trigger_multiple because of trigger_hurt being poo somehow.. Suggestions for usage would be awesome
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Post by tltrude »

The "random_death_thread" thread needs to be started in the "main" thread of your map's script like this.

level waittill prespawn

thread random_death_thread

Your map does have a script, right?

Note: I don't know why you are talking about script_objects. The trigger is a brush with trigger texture that has been turned into a "trigger_use" entity -- with the targetname "kill_trigger". A trigger is invisable in the game, so you'll need to create some kind of fake button to show where it is. Players activate it by pressing their "use" key in the game.

For the pit, players will die automatically, if it is deep enough -- I think its 512 units. But you could always put a minefield at the bottom to make sure they're dead, ha ha.
Tom Trude,

Image
Rich Tea Biscuit
Corporal
Posts: 34
Joined: Wed Apr 25, 2007 11:57 pm
Location: mohaa\dm2

Post by Rich Tea Biscuit »

tltrude wrote:Your map does have a script, right?

Urmm.. Kind of.. Im sorta being the optimistic enthuastic moron who's trying to do everything at once.. realistically, the map isnt finished, so no, it doesnt have a complete script, per se.. certainly no where near finished at least, but sinc eI have shaders for custom textures in a pk3 already, I was hoping to put the scripts in halfway through the project so I can test various bits everytime I do a minor compile with MBuilder..

As for players dying at -512, your right, but is it only due to fall damage?? Because the clan server have it turned off.. I guess I'll have to stick a minefield down there, minus the explosions..
Last edited by Rich Tea Biscuit on Sat Apr 28, 2007 12:12 am, edited 2 times in total.
Image
Post Reply