Page 1 of 2

Combining PLayer states to script threads?

Posted: Fri Jun 17, 2005 7:34 pm
by Master-Of-Fungus-Foo-D
Im not sure if i put it right but i saw this in JV's"The Sky is the Limit"...

Maybe the right question is "can i check for a player's state and thread something if it is the right state..maybe this might help to show what i mean..

Code: Select all

for (local.i=1;local.i<=$player.size;local.i++)
{
  if ($Player[local.i].state == "FORWARD : FORWARD")
   $player[local.i] loopsound lighthouse_run
} 
any help?[/code]

Posted: Fri Jun 17, 2005 8:52 pm
by Elgan
hmm

i didnt see it before. the best guy to ask might be jv;)?

he may have a script or somehting somewhere setting the state variable.


u can use getmovement and getposition

and also track the state files.

why?:D

Posted: Fri Jun 17, 2005 10:11 pm
by Master-Of-Fungus-Foo-D
uhm.. i dunno.. im feeling curious today.. or i might be making a mod that makes a player loop a sound while he is running ;)

to anyone who is out here:

could it be this?

Code: Select all

while ($player[local.i].state == "Run"
{
playound lighthouse_run
}

Posted: Fri Jun 17, 2005 10:13 pm
by Elgan
oh, i thoguth u banned that from a jv script.

just put playsound in state run:P

Posted: Sun Jun 19, 2005 10:50 am
by Master-Of-Fungus-Foo-D
oh.. yay :)

uhm how could i check wha state a player has and make him explode if he ducks?

Posted: Sun Jun 19, 2005 5:03 pm
by Elgan
exec a script that explodes self from state crouch via entrycmds

Posted: Mon Jun 20, 2005 1:16 pm
by Rookie One.pl
Or take a look at jv's Snow Contest - the script gives snowball ammo to everyone crouching.

Posted: Tue Jun 21, 2005 7:08 am
by jv_map
It's done with $player getposition. :)

Posted: Tue Jun 21, 2005 11:57 am
by Rookie One.pl
Yeah, I'm just encouraging people to research on their own. ;)

Posted: Tue Jun 21, 2005 2:24 pm
by Master-Of-Fungus-Foo-D
yay :) thx jv...

uhm thx rookie ;)

Posted: Thu Jun 23, 2005 3:14 am
by Green Beret
Rookie One.pl {sfx} wrote:Yeah, I'm just encouraging people to research on their own. ;)
These forums are here to HELP people, Not to tell everyone to figure it out thereself :wink:

Posted: Thu Jun 23, 2005 11:05 am
by Rookie One.pl
If you research yourself, you are bound to acquire knowledge. If someone just gives you the solution, you are not.

The knowledge allows you to figure things out on your own, which means satisfaction for you and peace for those you would bug otherwise. :P

Posted: Thu Jun 23, 2005 7:30 pm
by lizardkid
different people with different passions learn different things different ways. i'd look into and experiment with code i got to see how it works, some peopel are content with Mac-style copy/paste and you have a working thing.

Posted: Fri Jun 24, 2005 10:36 am
by Rookie One.pl
Me too. But I'd say copy/paste is wincrap-style.

Posted: Fri Jun 24, 2005 8:05 pm
by lizardkid
*shows maturity and restraint and doesnt respond*