Changing player into item?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
meowmix11
Lance Corporal
Posts: 24
Joined: Sun May 02, 2004 6:22 pm

Changing player into item?

Post by meowmix11 »

I have seen thid before in a server. When a player walked over a trigger, the player was turned into a toilet for 60 seconds. Can anyone tell me how to do this using triggers and scripts?
fuhrer
Captain
Posts: 253
Joined: Sun Mar 14, 2004 3:36 am

Post by fuhrer »

ahhahahahaa a toilet? thats classic
Rindog
Corporal
Posts: 29
Joined: Wed Sep 24, 2003 6:34 pm

Post by Rindog »

hehehehe...That is classic! What do you do? Flush the enemy for your primary attack and bash em with your toilet brush for your secondary.

I'm guessing, but in the trigger thread you could have something like;

local.player = parm.other
local.player.model = "static/toilet.tik"
User avatar
Mj
Map Reviewer
Posts: 1394
Joined: Sun Apr 25, 2004 3:36 pm
Location: England

Post by Mj »

I'm geussing youd want to make the player invinsible (check playertanks) and unable to move to(player walk+runspeed 0?)... is this for like a "catch the jerry's with their trousers down" mod or summat?
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

parm.other model "static/toilet.tik"
hope this helps, prob not cos it's all foreign 2 me :-/
meowmix11
Lance Corporal
Posts: 24
Joined: Sun May 02, 2004 6:22 pm

Post by meowmix11 »

How would i put this into a trigger?
MadMapper
Second Lieutenant
Posts: 170
Joined: Fri Apr 16, 2004 5:47 pm

Post by MadMapper »

Have a script object trigger that script I'd think, but I really dont understand scripting :(
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post by MPowell1944 »

You have to spawn a trigger with a targetname, and then thread that script to change models once they hit the trigger. Use a Trigger_Multiple and the Targetname would have to be the same name as the thread you are exec'ing.
fuhrer
Captain
Posts: 253
Joined: Sun Mar 14, 2004 3:36 am

Post by fuhrer »

i tried it to see if it would work, i got ERROR: stopping due to possible infite torso state loop or something.
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

Post what you have in your script, I'll see if we can find the infinite loop...

This would cause an infinite loop:

Code: Select all


thread mythread
mythread:

iprintln "HI!"

goto mytrigger

end

This would print 'HI!' then go back to mythread and print 'HI!' again and keep repeating that forever and ever.

You could do this to loop it 10 times

Code: Select all

level.loopstogo = 10
thread mythread
mythread:

while (;level.loopstogo > 0; level.loopstogo--)
{

iprintln "HI!, " level.loopstogo " to go"

wait 1
goto mythread
end

}

end


That would print HI, x loops to go, while loopstogo is greater than zero and then subracts one from it. Then repeats the process over until loopstogo reaches 0
Image
Post Reply