NPC1
PHP Code:
// NPC made by Chompi
//#CLIENTSIDE
if (created) {
setimg block.png;
level.timer = 0;
level.time = 0;
timeout = 0.05;
}
if (playertouchsme) {
if (level.timer == 0) {
level.timer = 1;
timeout = 0.05;
}
}
if (timeout) {
if (level.timer == 1) {
level.time += 0.05;
message Touch the other block, hurry!;
timeout = 0.05;
}else
message Touch me to start the timer!;
}
NPC2
PHP Code:
// NPC made by Chompi
//#CLIENTSIDE
if (created) {
setimg block.png;
timeout = 0.05;
}
if (timeout) {
if (level.time > 0)
message #v(level.time);
timeout = 0.05;
}
if (playertouchsme) {
if (level.timer == 1) {
level.timer = 0;
message Player touched me in #v(level.time) seconds!;
level.time = 0;
}
}
Bah, long time since I did gs1 but they should work in the editor