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 08-15-2004, 03:16 AM
sparkers sparkers is offline
Yojumisto Online
sparkers's Avatar
Join Date: Jun 2004
Location: Why does anyone care about that?
Posts: 111
sparkers is on a distinguished road
Send a message via AIM to sparkers
Disabledefmovement

Ok Ive tried using Disabledefmovement in an ocarina wep but it wont work.
And if I do freezeplayer it wont let you play the same note twice.
What shuld I do?
Reply With Quote
  #2  
Old 08-15-2004, 04:23 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Everytime the loop begins, set the player's gani to something else. I suspect you are using a gani to play the sound.
Reply With Quote
  #3  
Old 08-15-2004, 06:11 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Try posting a part of the code, things can be solved easily.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #4  
Old 08-15-2004, 04:41 PM
sparkers sparkers is offline
Yojumisto Online
sparkers's Avatar
Join Date: Jun 2004
Location: Why does anyone care about that?
Posts: 111
sparkers is on a distinguished road
Send a message via AIM to sparkers
NPC Code:

//#CLIENTSIDE


if (weaponfired) {
disabledefmovement
setani ocarina1,;
timeout=.05;
}

if (timeout) {disabledefmovement;
if (keydown(0)&&!keydown(5)) {setani ocarina-play1,;sleep .1;}
if (keydown(1)&&!keydown(5)) {setani ocarina-play2,;sleep .1;}
if (keydown(2)&&!keydown(5)) {setani ocarina-play3,;sleep .1;}
if (keydown(3)&&!keydown(5)) {setani ocarina-play4,;sleep .1;}
if (keydown(0)&&keydown(5)) {setani ocarina-play5,;sleep .1;}
if (keydown(1)&&keydown(5)) {setani ocarina-play6,;sleep .1;}
if (keydown(2)&&keydown(5)) {setani ocarina-play7,;sleep .1;}
if (keydown(3)&&keydown(5)) {setani ocarina-play8,;sleep .1;}

if (keydown(6)) {enabledefmovement;setani idle,;timeout=0}
if (!keydown(6)) {timeout=.05;}
}

Reply With Quote
  #5  
Old 08-15-2004, 06:25 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
It would totally help if you put a semicolon after disabledefmovement whenever you are using it. Beyond that, freezeplayer while it is playing the note is just fine.

Next, you need to work on your code structure. Do you notice that you are checking if S is down several times? Nest your flag checks, man, and use else when appropriate.

Finally, the board's code tags are pretty useless if you don't even style your code.

As a suggestion: why not use a while loop to ensure that a is held down instead of a timeout loop?
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 11:01 PM.


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