4.5.9 arcade platformer projectile shoots up and falls

Shyartist

New member
How can I make a projectile shoot upwards and fall back down? I'm trying to do it in the arcade platformer module with the jump script and its not budging.
 

smilehero65

Active member
can you tell me what you did?
1. So, first you make an AI behavior for the monster to MoveUp - this can't be achieved by default in modules with gravity, so I recommend to first move:
Vertical movement AI for enemies in metroidvania project

Your AI behavior code could be this:
Code:
TXA
STA tempA
LDA #FACE_UP
TAY
LDA DirectionTableOrdered,y
STA tempB
LDA FacingTableOrdered,y
STA tempC
StartMoving tempA, tempB, #$00
ChangeFacingDirection tempA, tempC

Alternative: if what you want your object to make a sort of a jump, you may actually try using a Monster Jump
How to add a "Monster Jump" AI script [NESMaker 4.0.X - Module Platformer]

If this is what you want, then you don't need to follow the next step.


2. Assign that behavior to Action Step 0 of your projectile. You will put your AI behavior here, put a timer of X seconds, check the Ignore Gravity flag and set your EndAction to Advance.
 

smilehero65

Active member
With this, your projectile will go straight up and after X seconds, it will respond to gravity and fall.
 
Top Bottom