I know this is easy, and I've done it before, but I can't seem to find information on the manuals or forum.
I am trying to animate a character in room_AfterFadeIn(). This should work, but it doesn't.
function room_AfterFadeIn(){
cObies.Animate(0, 5, eRepeat, eNoBlock);
}
Does your room have the Events correctly set?
(https://i.ibb.co/X7q5bfH/Screenshot-2023-03-14-at-12-38-14.png)
Ahhh, yes I always forget to set it in the Events properties panel as well. Thank you!
We have similar case noted in a FAQ (https://adventuregamestudio.github.io/ags-manual/FAQ.html) in the manual, but apparently people still miss it. Probably because they focus on idea that particular command does not work correctly.
There's a common advice: if you just wrote a new function and commands inside do not seem to work, then the first thing to try is to place a breakpoint, or a Display command near and see if it executes. If not, that usually means that the whole function does not run, and that is a problem you need to solve.
This is such a common mistake that I still think something like this (https://www.adventuregamestudio.co.uk/forums/editor-development/feature-suggestion-auto-link-event-handlers/msg636620324/#msg636620324) would be a good idea. (Perhaps the best version would be a compiler warning whenever you have a function that matches a default event handler signature, but isn't linked to an event.)
Mostly unrelated, but remember that you should usually use the LockView command before animating.