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