Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Instruments script? (https://forums.graalonline.com/forums/showthread.php?t=6468)

Komieko 07-04-2001 05:44 AM

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

kyle0654 07-04-2001 10:59 AM

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

Marco2002 07-04-2001 05:08 PM

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;
}
}


Marco2002 07-04-2001 05:17 PM

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;
}
}

Poogle 07-05-2001 04:31 AM

LOL
 
None of those work

grim_squeaker_x 07-05-2001 03:24 PM

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.

Birdbird_0 07-05-2001 03:33 PM

>.< you didnt ask Stefan or I for permiton *crys* I feal so violated.

Huggles 07-06-2001 08:58 AM

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 =/


All times are GMT +2. The time now is 02:47 AM.

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