Page 1 of 1
Changing player into item?
Posted: Sat May 08, 2004 3:59 pm
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?
Posted: Sat May 08, 2004 4:04 pm
by fuhrer
ahhahahahaa a toilet? thats classic
Posted: Sat May 08, 2004 7:55 pm
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"
Posted: Sat May 08, 2004 8:04 pm
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?
Posted: Sun May 09, 2004 1:01 am
by nuggets
parm.other model "static/toilet.tik"
Posted: Sun May 09, 2004 2:39 pm
by meowmix11
How would i put this into a trigger?
Posted: Sun May 09, 2004 3:18 pm
by MadMapper
Have a script object trigger that script I'd think, but I really dont understand scripting

Posted: Sun May 09, 2004 5:31 pm
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.
Posted: Mon May 10, 2004 3:10 am
by fuhrer
i tried it to see if it would work, i got ERROR: stopping due to possible infite torso state loop or something.
Posted: Mon May 10, 2004 5:03 pm
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