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-15-2001, 12:30 PM
ninjaterd ninjaterd is offline
Banned
Join Date: Oct 2001
Location: somewere
Posts: 247
ninjaterd is on a distinguished road
Send a message via AIM to ninjaterd
Smile Instrument scripts

Does any one know the script for a instrument of your choice....if u do plzzz tell me.....thx
Reply With Quote
  #2  
Old 11-15-2001, 10:54 PM
PresShinP2P PresShinP2P is offline
Registered User
Join Date: Oct 2001
Location: Screw it
Posts: 84
PresShinP2P is on a distinguished road
Send a message via AIM to PresShinP2P
it just works on keydown procedures
__________________
President Shinra
Reply With Quote
  #3  
Old 11-16-2001, 04:58 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~

Basically, just use a for loop, keydown, and playsound... here's one I made a bit ago (with a little not-so-subtle hint from Kaimetsu for a change in it)... it's fairly optimized...

TO CHANGE IT: just change the line "play ocarina#v"... change only the ocarina part to whatever instrument you want. Make sure the .wavs for that instrument end with a number from 1-8 though... Tada.

if (playertouchsme){
toweapons Ocarina;
destroy;
}
if (weaponfired){
this.mode=1-this.mode;
disabledefmovement;
timeout=.05;
}
if (timeout){
if (this.mode=1){
for (i=0;i<4;i++){
if (keydown(i))play ocarina#v(i+1+keydown(5)*4).wav;
}
if (keydown(6)){
this.mode=0;
enabledefmovement;
}
timeout=.05;
} else {enabledefmovement;}
}
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #4  
Old 11-16-2001, 09:05 AM
jonny12 jonny12 is offline
Registered User
Join Date: Jun 2001
Location: washingtion--USA all the way!
Posts: 100
jonny12 is on a distinguished road
Send a message via AIM to jonny12 Send a message via Yahoo to jonny12
trumpet

here


// NPC made by jonny12
if (playertouchsme) {
toweapons Trumpet;
hidelocal;
}

if (weaponfired) {setplayerprop #P2,trumpet0.png;

disabledefmovement;
setani playtrump,;
timeout=.05;
}

if (timeout) {
if (keydown(0)&&!keydown(5)) {play trumpet1.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(1)&&!keydown(5)) {play trumpet2.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(2)&&!keydown(5)) {play trumpet3.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(3)&&!keydown(5)) {play trumpet4.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(0)&&keydown(5)) {play trumpet5.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(1)&&keydown(5)) {play trumpet6.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(2)&&keydown(5)) {play trumpet7.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(3)&&keydown(5)) {play trumpet8.wav;sleep .1;setani playtrump2,;sleep .1;}

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


Bomy Gang
Reply With Quote
  #5  
Old 11-16-2001, 09:09 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~

Gods, what an ugly trumpet script...

Jonny... a few little hints

1- Don't use sleep.
2- Condense your scripting commands.
3- Learn how to optimize your NPCs.
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #6  
Old 11-16-2001, 05:30 PM
ninjaterd ninjaterd is offline
Banned
Join Date: Oct 2001
Location: somewere
Posts: 247
ninjaterd is on a distinguished road
Send a message via AIM to ninjaterd
terribly sorry

Quote:
Originally posted by entravial
~AlphaFlame~

Gods, what an ugly trumpet script...

Jonny... a few little hints

1- Don't use sleep.
2- Condense your scripting commands.
3- Learn how to optimize your NPCs.
Im terribly, teribly sorry but non of these scripts work........is there anyone here that could tell me 1 that works
Reply With Quote
  #7  
Old 11-17-2001, 06:48 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~

Mine works. Do you have the .wav files of ocarina1 through ocarina8, or whatever instrument it is?
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #8  
Old 11-17-2001, 08:35 PM
Xythar Xythar is offline
Banned
Xythar's Avatar
Join Date: Aug 2001
Location: NOT (quite) HERE
Posts: 1,241
Xythar is on a distinguished road
Send a message via AIM to Xythar Send a message via Yahoo to Xythar
I think Providence's fife works with ganis, instead of 'play.'
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 09:11 AM.


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