I'm trying to make a game with some simple AI behavior for the Magical Girl Jam. But I'm running into two big problems.
Firstly, I have an NPC sprite that I'm trying to give some basic AI to. The NPC should move a bit left or right and then pause before moving again. The NPC has four instance variables:
FSMState (integer; tracks what state the NPC AI is in)
PauseTime (integer; how many more ticks the NPC should stay still for)
MoveDirection (integer; -1 if the NPC hasn't decided on a direction to go yet, 1 if the NPC is going left and 0 if the NPC is going right)
MoveDistance (integer; how many more ticks the NPC should move for)
When I start up the Store layout, the NPC does not move and just faces right. My event logic for controlling her is in GeneralEvents. If I use debugger mode I can see the variables changing properly, but she never moves.
Am I doing something wrong? Is there a better supported way to be doing AI stuff? Is this a bug? I don't know! Please tell me.
My second problem with this project can be best seen in the Test Layout. In it, I have two sprites that have been given the Platforming behavior. One sprite uses my NPC's graphic and the other sprite uses my monster graphic. Below them is a jump through platform sprite. When you start the layout, the two sprites fall towards the platform and then stop on it. However, the monster sprite stops lower than the NPC sprite. This happens no matter what browser I use or what their origins are. The TestGirl and TestMonster objects are exactly the same except for their graphics, so I'm not sure why they're doing this? Perhaps this is a bug?
Here is a link to a .capx that demonstrates both these problems: dl.dropboxusercontent.com/u/8404998/CantGetAIToWork.capx
I'm using r146 64-bit version from Steam if that makes a difference.
Thank you in advance for advice.
Edit: Oh. Looks like half my post got eaten when I tried to post initially. Welp... I've fixed it now.