PDA

View Full Version : Instruments script?


Komieko
07-04-2001, 05:44 AM
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:

setani ganiname,soundfile;

so you could do:

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

or something along those lines

Marco2002
07-04-2001, 05:08 PM
would that work?

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:

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
None of those work

grim_squeaker_x
07-05-2001, 03:24 PM
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
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 =/