Cho Aniki?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
//Outside of functions in the room's script.
enum WhaleState {
WS_IDLE = 0;
WS_WILLATTACK,
WS_ATTACKING
};
WhaleState cur_ws = WS_IDLE;
//Put the following in wherever the attack command is to be registered.
if (!cur_ws&&(whatever condition to trigger the attack)) cur_ws = WS_WILLATTACK;
//Put the following in repeadedly_execute_always() of the room.
if (cur_ws == WS_WILLATTACK&&cWhale.Frame == 5){ //Replace the 5 to the correct last frame number of the loop.
cur_ws = WS_ATTACKING;
cWhale.LockView(whale_attack_view);
cWhale.Animate(0, 0, eOnce, eNoBlock, eForwards);
} else if (cur_ws == WS_ATTACKING&&!cWhale.Animating){
cur_ws = WS_IDLE;
cWhale.LockView(whale_swim_view);
cWhale.Animate(0, 0, eRepeat, eNoBlock, eForwards);
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 1.849 seconds with 15 queries.