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 07-04-2001, 05:44 AM
Komieko Komieko is offline
Registered User
Join Date: Mar 2001
Posts: 494
Komieko is on a distinguished road
Instruments script?

Well I'm alittle confused..could anyoen post an example such as the saxaphone on new main..I'm wondering how todoa script like it
Reply With Quote
  #2  
Old 07-04-2001, 10:59 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
Well, it's not much of a script in fact....there's just a gani with a couple frames, and at one point in the gani it does:
PLAYSOUND PARAM1 x y
you'll have to check out some of the ganis in your ganis folder to understand what I mean, but when you call the gani, you go:
NPC Code:

setani ganiname,soundfile;


so you could do:
NPC Code:

setani sax,saxsound#v(this.var).wav;


or something along those lines
Reply With Quote
  #3  
Old 07-04-2001, 05:08 PM
Marco2002 Marco2002 is offline
Registered User
Join Date: Jun 2001
Location: Germany
Posts: 77
Marco2002 is on a distinguished road
Send a message via ICQ to Marco2002
would that work?
NPC Code:

if (weaponfired&&!playing) {set playing;}
if (weaponfired&&playing) {unset playing;}
for (this.i=0;this.i<4;this.i++) {
if (keydown(this.i)&&playing) {
setani sax,saxsound#k.wav;
}
}

__________________
Reply With Quote
  #4  
Old 07-04-2001, 05:17 PM
Marco2002 Marco2002 is offline
Registered User
Join Date: Jun 2001
Location: Germany
Posts: 77
Marco2002 is on a distinguished road
Send a message via ICQ to Marco2002
This one uses the Saxophone sounds/GFX:
Quote:
if (weaponfired&&!playing) {set playing;setani playsax,sax0.png;}
if (weaponfired&&playing) {unset playing;}
for (this.i=0;this.i<4;this.i++) {
if (keydown(this.i)&&!keydown(5)&&playing) {
setani sax,sax(#k+1).wav;
}
if (keydown(this.i)&&keydown(5)&&playing) {
setani playsax2,sax(#k+5).wav;
}
}
__________________
Reply With Quote
  #5  
Old 07-05-2001, 04:31 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
LOL

None of those work
Reply With Quote
  #6  
Old 07-05-2001, 03:24 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
NPC Code:
if (weaponfired) this.playing=1-this.playing;
if ((created||timeout)&&isweapon) {
if (this.playing==1) {
setarray this.keydown,10;
for (this.k=0;this.k<10;this.k++) this.keydown[this.k]=(keydown(this.k));
if (true in this.keydown) {
if (this.keydown[4]==true) this.arg=4;
else this.arg=0;
for (this.k=0;this.k<4;this.k++) if (this.keydown[this.k]==true) setani sax,sax#v(this.k+this.arg).wav;
}
}
timeout=0.05;
}


I'm just not sure if those are the correct sounds and gani's.
__________________

Reply With Quote
  #7  
Old 07-05-2001, 03:33 PM
Birdbird_0 Birdbird_0 is offline
am yum
Birdbird_0's Avatar
Join Date: Mar 2001
Location: California
Posts: 4,436
Birdbird_0 is on a distinguished road
Send a message via AIM to Birdbird_0
>.< you didnt ask Stefan or I for permiton *crys* I feal so violated.
Reply With Quote
  #8  
Old 07-06-2001, 08:58 AM
Huggles Huggles is offline
Should I care anymore?
Huggles's Avatar
Join Date: Apr 2001
Location: Arizona
Posts: 2,127
Huggles is on a distinguished road
Send a message via AIM to Huggles Send a message via Yahoo to Huggles
Quote:
Originally posted by Birdbird_0
>.< you didnt ask Stefan or I for permiton *crys* I feal so violated.
We dont have to because we arent taking your script

Instruments arent Graal2001 only idea.... if we can move the sounds and graphics then we could make a script for it =/
__________________
Captain USA, Or Captin USA

Plain and simple.
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:15 AM.


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