Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-21-2001, 02:31 AM
Onyx_Brasil Onyx_Brasil is offline
Registered User
Join Date: Oct 2001
Location: Jundiai, SP, Brazil
Posts: 35
Onyx_Brasil is on a distinguished road
Send a message via AIM to Onyx_Brasil
Exclamation Dance Script

i have a dance script, i want to do this:
when player enter in the level, only A button will appear
and when u press A u start to dance and when u stop pressing, u stop,,, how can i do it?
Reply With Quote
  #2  
Old 11-21-2001, 04:39 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
just use disableweapons;
then just do a keydown for the A button
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #3  
Old 11-21-2001, 04:43 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
yah and for the dance script you would do a timeout with random sprites going on right? and random positions? i am just wondering
Reply With Quote
  #4  
Old 11-21-2001, 06:15 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
sigh, i have given up hope of forcing the population to learn to do it themselves, here you go:

if (playerenters) {
timeout=.05;
disableweapons;
}
if (timeout) {
if (keydown(6)) playersprite=int(random(0,40));
timeout=.05;
}
Reply With Quote
  #5  
Old 11-21-2001, 09:53 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
Quote:
Originally posted by Faheria_GP2
sigh, i have given up hope of forcing the population to learn to do it themselves, here you go:

if (playerenters) {
timeout=.05;
disableweapons;
}
if (timeout) {
if (keydown(6)) playersprite=int(random(0,40));
timeout=.05;
}
thats xactly what i had in mind! i am not going to use it i just wanted to know if i did it right...
Reply With Quote
  #6  
Old 11-21-2001, 09:57 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Randomsprites = ghay
__________________

subliminal message: 1+1=3
Reply With Quote
  #7  
Old 11-21-2001, 01:05 PM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
Quote:
Originally posted by Falcor
Randomsprites = ghay
Reply With Quote
  #8  
Old 11-21-2001, 02:48 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
True Dat!

Quote:
Originally posted by royce
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #9  
Old 11-21-2001, 11:46 PM
T3CK T3CK is offline
Banned
Join Date: Aug 2001
Location: Atlanta, GA
Posts: 557
T3CK is on a distinguished road
Send a message via AIM to T3CK Send a message via MSN to T3CK Send a message via Yahoo to T3CK
Um, if I were you, I'd change the (0,40) to (0,39) because no one wants to see thierself dead every .1 seconds.
Reply With Quote
  #10  
Old 11-21-2001, 11:48 PM
T3CK T3CK is offline
Banned
Join Date: Aug 2001
Location: Atlanta, GA
Posts: 557
T3CK is on a distinguished road
Send a message via AIM to T3CK Send a message via MSN to T3CK Send a message via Yahoo to T3CK
Oh, yes, and try putting that in a for loop to make it where when the player is in a certain area he will dance. just using a button isn't..natural. for(playerx<15;playery>10;playerx>10&&playery<5){ code here;}
Reply With Quote
  #11  
Old 11-22-2001, 01:03 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
not a very bright one are you?

with random(0,40) the highest possible number is

39.99999999999999999999999999999999999999999999

which int() will cut off to 39, so technically, you would only see sprites 0-39.
Reply With Quote
  #12  
Old 11-22-2001, 01:08 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
then you would be swimming too and that is the ****ed thing...
Reply With Quote
  #13  
Old 11-22-2001, 03:34 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~AlphaFlame~

... set an array of the sprites you do want, then do a random for the arrayed sprite to show...

this.sprites={1,2,3,4,5,9,14,20};
this.show=int(random(0,arraylen(this.sprites)));
playersprite=this.sprites[this.show];

*passes out the dunce caps*
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #14  
Old 11-22-2001, 03:59 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
even simpler
NPC Code:

this.sprites={1,2,3,4,5,9,14,20};
playersprite=this.sprites[intrandom(0,arraylen(this.sprites)+.4))];


*hands ~Alpha Flame~ a dunce team baseball cap.*
__________________

subliminal message: 1+1=3

Last edited by Falcor; 11-22-2001 at 04:02 AM..
Reply With Quote
  #15  
Old 11-22-2001, 04:10 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
AND even simpler yet

setani dance,;

(for the slow ones, that means make a gani and forget about the sprites, THEY ARE OBSOLETE)
__________________

subliminal message: 1+1=3
Reply With Quote
  #16  
Old 11-22-2001, 04:16 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Quote:
Originally posted by T3CK
Oh, yes, and try putting that in a for loop to make it where when the player is in a certain area he will dance. just using a button isn't..natural. for(playerx<15;playery>10;playerx>10&&playery<5){ code here;}
um... is it natural to dance if u walk over a special area? I do not have to dance if I walk over a dancefloor only if I want to... so it's more natural to dance if u press the a-key...
__________________
No Webhost at the moment
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:32 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.