Graal Forums  

Go Back   Graal Forums > PlayerWorlds > Bomy Island Main Forum
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #17  
Old 03-06-2002, 06:43 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
I am making a dancing thing...you will do something like this (terribly unfinished)

put that in a blank level and play (say "start" to start the dance)

NPC Code:

// NPC made by Supersonic
if (playerenters) {
toweapons -craftsys;
timeout=.05;
setarray this.craft,6;
randomize();
}
if (isweapon) {
if (playerchats) {
if (strequals(#c,Stop)) unset crafting;
if (strequals(#c,Start)) set crafting;
}
if (timeout) {
if (crafting) craft();
else no();
timeout=.05;
}
if (actionStartCraft) {
set crafting;
}
if (actionStopCraft) {
unset crafting;
}
function randomize() {
for (i=0; i<6; i++) {
this.craft[i]=int(random(0,4));
}
}
}
function craft() {
freezeplayer .05;
key=-1;
for (i=0; i<4; i++) {
if (keydown(i)) key=i;
}
if (key>-1) keys++;
else keys=0;
if (this.craft[this.num]=key && keys=1 && this.craft<6) this.num++;
if (this.num=6) new();
images();
}
function no() {
for (i=0; i<6; i++) {
hideimg i+200;
}
}
function images() {
tokenize @^ @< @V @>;
for (i=0; i<6; i++) {
showimg i+200,#t(this.craft[i]),(screenwidth/2)-240+(80*i),(screenheight/4)*3;
if (this.num>i) changeimgcolors i+200,1,0,0,1;
else changeimgcolors i+200,1,1,1,1;
changeimgvis i+200,4;
}
}
function new() {
randomize();
this.num=0;
}

Reply With Quote
 


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 02:51 PM.


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