Combining PLayer states to script threads?

Post your scripting questions / solutions here

Moderator: Moderators

Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Combining PLayer states to script threads?

Post 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]
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post 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
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post 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
}
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

oh, i thoguth u banned that from a jv script.

just put playsound in state run:P
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post 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?
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

exec a script that explodes self from state crouch via entrycmds
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Or take a look at jv's Snow Contest - the script gives snowball ammo to everyone crouching.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

It's done with $player getposition. :)
Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Yeah, I'm just encouraging people to research on their own. ;)
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

yay :) thx jv...

uhm thx rookie ;)
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post 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:
Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post 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
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Me too. But I'd say copy/paste is wincrap-style.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

*shows maturity and restraint and doesnt respond*
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Locked