ChangeView only animates frame 1

Started by NuDawnII, Fri 15/05/2015 02:24:46

Previous topic - Next topic

NuDawnII

I have looked through related posts, but have not seen one in which the response solves my issue.  I have a beach scene where I have set a region in the water.  When the player is standing on the region of water, I am changing the view from the from the walking view to a splashing view.  Code is as follows:

function region2_Standing()
{
    cEgo.ChangeView(VEGOSPLASH);
    cEgo.
}
function region2_WalksOff()
{
    cEgo.ChangeView(1);
}

The view changes appropriately and when standing in the water, the player standing frame (0) of the splash view is shown.  However, when the player walks in the water, the view moves to frame 1, but does not animate the other 5 to 7 frames of the loop.  Therefore, the player just floats across the screen with the same image.  Ultimately, when the player exit the water and the view is changed back to the walking view 1, animation is correct.

Gilbert

Use the Player walks onto region event instead of While player stands on region as the latter one will trigger the code repeatedly every game loop, so the ChangeView() call is done repeatedly, resetting the character to be at his first frame.

NuDawnII

I changed this and it did the trick.  Thanks for the tip.

SMF spam blocked by CleanTalk