I thought it would be nice to add a "Jump" action for the monster's AI actions (my son wanted it for one of its monters)...
So I choose a very easy way to acheive that (just copyied the script of the player jump):
1) Make a new script "MonsterJump.asm" in the '\Routines\UserScripts\PlatformGame_Base\AiScripts" folder, with this:
2) In the "Project settings > Script Settings", assign the "MonsterJump.asm" script to a unused AI Action (for example the "AI Action 10").
3) In the "Project settings > Project Labels", for the monster's "Action Types", rename the "AI_Behavior 10" to "10 - Monster Jump".
4) Now, you can use the action "Monster jump" for your monsters, in their Action Steps.
(I'd recommand to use a timer value greater than 1 to give enough time for the jump)
So I choose a very easy way to acheive that (just copyied the script of the player jump):
1) Make a new script "MonsterJump.asm" in the '\Routines\UserScripts\PlatformGame_Base\AiScripts" folder, with this:
Code:
LDA #$00
SEC
SBC #$04 ;; <-- jump value
STA Object_v_speed_hi,x
LDA Object_status,x
AND #%11111011
STA Object_status,x
2) In the "Project settings > Script Settings", assign the "MonsterJump.asm" script to a unused AI Action (for example the "AI Action 10").
![2018-12-06-15-58-45-Project-Settings.png](https://i.ibb.co/wN5q46d/2018-12-06-15-58-45-Project-Settings.png)
3) In the "Project settings > Project Labels", for the monster's "Action Types", rename the "AI_Behavior 10" to "10 - Monster Jump".
![2018-12-06-15-59-24-Project-Settings.png](https://i.ibb.co/xDGK2Fj/2018-12-06-15-59-24-Project-Settings.png)
4) Now, you can use the action "Monster jump" for your monsters, in their Action Steps.
![2018-12-06-15-59-58-Monster-Animation-Info.png](https://i.ibb.co/5GMvb32/2018-12-06-15-59-58-Monster-Animation-Info.png)
(I'd recommand to use a timer value greater than 1 to give enough time for the jump)