I applied "Chase" to a special move and have a question.

DD Tokki

Well-known member
1791748334017.png

I’ve applied a "chase" mechanic to the special move; while it tracks airborne enemies, it doesn't move upwards toward them. I want to implement a way to make it ascend.
 
I think I had the same issue back when I was workin on UDD, and what I did was giving the projectile a jumpframe on its very 1st frame so it becomes airbone, and then it would track an airbone enemy. I could be wrong about it or there could be better methods, but at least this worked for me.

Of course it needs subject_to_gravity 0 in its header.
 
I think I had the same issue back when I was workin on UDD, and what I did was giving the projectile a jumpframe on its very 1st frame so it becomes airbone, and then it would track an airbone enemy. I could be wrong about it or there could be better methods, but at least this worked for me.

Of course it needs subject_to_gravity 0 in its header.
I followed the advice you just give, and it attacks upwards now. That works well, but I’d also like to account for cases where there are no enemies in the air.
 
Chaser projectiles are only chasing in xz plane by default. For xyz zone, you'd need to use other method, either:
1. Give projectile vertical attack in which projectile flies upwards when it is directly below target.
2. Script movement script for projectile which moves it in all 3 axes.

There's third method but aside of harder to code, it might cause some issues.
I have made example of #1 before but couldn't find it anywhere.
 
[couple hours later]

I've found that example of #1.
Code:
name        ChaseRo
health        100
speed        30
lifespan    5
type        npc
aimove        chase
stealth        350
nopain        1
nodrop        2
shadow        1
aggression    50
hostile        enemy
candamage    enemy obstacle


anim    idle
    loop    1
    delay    10
    offset    19 14
    attack    9 6 19 8 10 1 0
    frame    data/chars/ironman/za6.png
    frame    data/chars/ironman/za7.png
    frame    data/chars/ironman/za6.png
    attack    0
    frame    data/chars/ironman/za7.png

anim    attack1
    range    -10 10
    rangez    -10 10
    rangea    50 4000
    loop    1 2 4
    delay    10
    offset    10 23
    jumpframe 0 6 0 0
    landframe 7
    attack    6 6 8 19 10 1 0
    frame    data/chars/ironman/za8.png
    frame    data/chars/ironman/za9.png
    frame    data/chars/ironman/za8.png
    frame    data/chars/ironman/za9.png
    frame    data/chars/ironman/za8.png
    frame    data/chars/ironman/za9.png
    frame    data/chars/ironman/za8.png
    attack    0
    frame    data/chars/ironman/za9.png
 
[couple hours later]

I've found that example of #1.
Code:
name        ChaseRo
health        100
speed        30
lifespan    5
type        npc
aimove        chase
stealth        350
nopain        1
nodrop        2
shadow        1
aggression    50
hostile        enemy
candamage    enemy obstacle


anim    idle
    loop    1
    delay    10
    offset    19 14
    attack    9 6 19 8 10 1 0
    frame    data/chars/ironman/za6.png
    frame    data/chars/ironman/za7.png
    frame    data/chars/ironman/za6.png
    attack    0
    frame    data/chars/ironman/za7.png

anim    attack1
    range    -10 10
    rangez    -10 10
    rangea    50 4000
    loop    1 2 4
    delay    10
    offset    10 23
    jumpframe 0 6 0 0
    landframe 7
    attack    6 6 8 19 10 1 0
    frame    data/chars/ironman/za8.png
    frame    data/chars/ironman/za9.png
    frame    data/chars/ironman/za8.png
    frame    data/chars/ironman/za9.png
    frame    data/chars/ironman/za8.png
    frame    data/chars/ironman/za9.png
    frame    data/chars/ironman/za8.png
    attack    0
    frame    data/chars/ironman/za9.png

C:
name         ChibiMoon-EF-C2
type             npc
aimove            chase
aggression        200
stealth            350
health            100   
speed            30
remove            0
lifespan        2
nopain            1
nodrop            2
offscreenkill    -1
candamage          enemy obstacle
hostile         enemy

anim    idle
    loop    1 0 4
    forcedirection    -1
    delay     3
    offset    11 11
    attack    -4 -4 16 30 18 1 0 0 40 22
    hitflash    flash-chibimoon
    hitfx    data/sounds/flash-normal.wav
    dropv    2.2 3 0   
    frame    data/sprites/chars/chibimoon/chibimoon-ef-a1.gif
    frame    data/sprites/chars/chibimoon/chibimoon-ef-a2.gif
    frame    data/sprites/chars/chibimoon/chibimoon-ef-a3.gif
    frame    data/sprites/chars/chibimoon/chibimoon-ef-a2.gif
    frame    none

anim    attack1
    range    -400 400
    rangez    -300 300
    rangea    0 4000
    loop    1 0 4
    forcedirection    -1
    delay     3
    jumpframe 0 6 0 0
    landframe 4   
    offset    11 11
    attack    -4 -4 16 30 18 1 0 0 40 22
    hitflash    flash-chibimoon
    hitfx    data/sounds/flash-normal.wav
    dropv    2.2 3 0   
    frame    data/sprites/chars/chibimoon/chibimoon-ef-a1.gif
    frame    data/sprites/chars/chibimoon/chibimoon-ef-a2.gif
    frame    data/sprites/chars/chibimoon/chibimoon-ef-a3.gif
    frame    data/sprites/chars/chibimoon/chibimoon-ef-a2.gif
    frame    none

I applied the example, and while the NPC-type projectile is supposed to detect and track enemies, in my case, it isn't tracking them and just flies in a straight line. It seems I’ve missed something.
 
Back
Top Bottom