Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

gat1024

2
Posts
1
Following
A member registered Oct 24, 2017

Recent community posts

(2 edits)

I agree with Spencer. If crouch is set in your update function, it will be called repeatedly. You need a state variable to guard against repeatedly calling crouch, like:

if (action that causes crouch) {

   if (!this.crouching) { this.actor.spriteRenderer.setAnimation("Crouch", false); this.crouching = true; }

}


(I don't know how to do quote code yet...)

It seems inheritance works fine as long as the base class occurs before the derived classes. I guess during compilation, user scripts are collected and fed to the compiler in some order. The base class has to appear earlier in that order. It's easier to insure an ordering if all the scripts are under the same group.