/*
* up.prg by MikeDX
* (c) 2016 DX Games
*/
PROGRAM up;
GLOBAL
value2;
BEGIN
//Write your code here, make something amazing!
write_int(0,0,0,0,&value2);
doup();
loop
frame;
end
END
process doup()
private
oldup;
BEGIN
LOOP
// check up pressed
if(key(_up))
value2=1;
if(oldup>0) // if we pressed up twice within 10 frames
value2=2;
end
oldup=10; // 10 frames to press up again
end
while(key(_up)) // wait for up to be released
if(oldup>0)
oldup--;
end
frame;
end
oldup--;
frame;
value2=0;
end // end loop
end // end process
|