Problem with projectiles...

afhc2x17

Active member
Hi again, sorry for lurking here and there, but I recently got back here and I need help with the new projectile system: I was trying to get my character to throw a "knife" projectile, but after launch, the projectile stays in the air until some enemy rushes and gets hit by it. Here's the code:

Code:
//Projectile entity
name     spark
type     projectile
health     1
remove     0

anim idle
    loop    1
    delay    8
        followanim 1
        followcond 1
    offset    21 11

    attack.damage.force 25
    attack.position.x 0
    attack.position.y 0
    attack.size.x 48
    attack.size.y 16
    attack.reaction.reposition.direction -1

    frame    data/chars/moon/Shot/spark0.gif
    frame    data/chars/moon/Shot/spark1.gif

anim follow1
    delay    8
    offset    -17 12
    frame    data/chars/moon/Shot/spark2.gif
    offset    -21 20
    frame    data/chars/moon/Shot/spark3.gif
    offset    -23 31
    frame    data/chars/moon/Shot/spark4.gif
    frame    data/chars/misc/empty.gif

And here's the freespecial:
Code:
//Freespecial

anim freespecial

    custknife spark
    throwframe 4

       delay   20
    offset  101 141
    energycost 100 1

    frame   data/chars/moon/freespecial01_01.png
    delay    20
    frame   data/chars/moon/freespecial01_02.png
    delay    10
      frame   data/chars/moon/freespecial01_03.png
        frame   data/chars/moon/freespecial01_04.png
      delay    20
    @cmd    mana 0
      frame   data/chars/moon/freespecial01_05.png

And the result is the screenshot (sorry if someone gets offended, it's an upskirt so I had to censor it). Someone can help me with this problem? I really want to keep updating this to the new entry. Thanks in advance.
 

Attachments

  • moonproj.png
    moonproj.png
    20.5 KB · Views: 6
I'm not very sure if type projectile is part of the entity type for the character header.

type {type}

  • {type}:
    • player: The entity is a human-controlled player.
    • enemy: The entity is a CPU controlled enemy or enemy projectile.
    • npc: The entity is a CPU controlled ally that will seek out and attack
    • enemies. The entity is otherwise functionally identical to enemy entities with the chase subtype. You can change the NPC allegiance via hostile setting. Npc types do not count toward groups.
    • item: The entity is a stationary item which can be picked up. Items can only give one bonus per item. In other words, you can't make one item that both gives 2000 points AND gives a 1-up.
    • none: The entity is a useless decoration.
    • steamer: The entity constantly spews the object called Steam upwards with alpha transparency. Default offscreenkill value is 80.
    • obstacle: The entity is a stationary blockade which can (normally) be destroyed.
    • text: The entity is a message object. When spawned, it will freeze all objects in play and show it's *IDLE* animation, then dissapear. It can be sped up by pressing attack or jump. Can be used for level intros, mid-level cutscenes, etc.
    • trap: The entity is an obstacle which cannot be attacked. It can be made to attack, though, and will hit both players and enemies. If a trap is not set up to knock the entity down, the trap will only damage the entity one time. To hit them again, the target entity must take damage from another entity.
    • endlevel: The entity is an item which, when touched by a player, will end the stage. It can be given a score value to be awarded for level completion.
    • pshot: The type is outdated and does nothing. You can still use it, but it's ignored.
    • panel:The entity will scroll together with level. If the entity's speed is 10, entity will stay with panel. If the speed is 5, it will stay with background (for direction left,right and both). This type is used to make multiple layers.

The funny thing is that I'm using pshot with OpenBOR v3 6391 build, and it works fine like wine. Despite being depreciated or "outdated", it's active in speed.

Code:
anim freespecial #POWER WAVE
    offset 140 188
    delay 6
    bbox 114 89 51 98
    load powave
    subentity powave
    spawnframe 6 51 0 0 0
    sound data/sounds/heroes/terry/06_terry_00010.wav
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_0.png
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_1.png
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_2.png
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_3.png
    delay 3
    bbox 114 107 51 81
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_4.png
    bbox 116 120 64 71
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_4.png
    delay 6
    bbox 131 120 53 71
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_5.png
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_6.png
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_7.png
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_8.png
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_9.png
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_10.png
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_11.png
    bbox 123 124 54 64
    frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/148_12.png

Code:
name powave #Power Wave
health 0
type pshot
remove 1
#nolife 1
speed 20
gfxshadow 1
#candamage enemy

anim idle

    offset 122 195
    delay 6
    loop 1
    attack 116 157 44 39 12 0 0 0 0 0
    followanim 1
    followcond 2
    #jumpframe 0 0 3 0
    frame data/chars/heroes/kof_2k3_terry_sprite.7z/effects/902_0.png
    frame data/chars/heroes/kof_2k3_terry_sprite.7z/effects/902_1.png
    frame data/chars/heroes/kof_2k3_terry_sprite.7z/effects/902_2.png
    frame data/chars/heroes/kof_2k3_terry_sprite.7z/effects/902_3.png
    frame data/chars/heroes/kof_2k3_terry_sprite.7z/effects/902_4.png
    frame data/chars/heroes/kof_2k3_terry_sprite.7z/effects/902_5.png
anim follow
    frame data/chars/misc/empty.gif

Code:
name        ryo
type        player
health        100
mp        100
mprate          1
chargerate      4
speed        9
running        25 3 3 1 0
jumpheight    4
noquake        1
nodieblink    2
makeinv        3
riseinv        2
gfxshadow    1
holdblock     1
dust            dust
candamage    enemy obstacle
weapons        Ryobike Ryo
diesound        data/sounds/ryode.wav
combostyle      1
atchain         1 1 2 3 4 0 5 6 7
icon        data/chars/1ryo/icon.gif
parrow          data/chars/0misc1/player1.gif  -36 -145
parrow2         data/chars/0misc1/player2.gif  -36 -145
parrow3         data/chars/0misc1/player3.gif  -36 -145

#-------shots
load    kohkn
load    haskk

Code:
anim freespecial5
    energycost 25
    mponly  1
    loop    0
    delay   5
    offset  121 201
    bbox    102 100 39 97
    custknife kohkn
    throwframe 7
    sound   data/sounds/ryosp3.wav
    frame    data/chars/1ryo/a301.gif
    frame    data/chars/1ryo/hado01.gif
    frame    data/chars/1ryo/hado02.gif
    frame    data/chars/1ryo/hado03.gif
    sound   data/sounds/super2.wav
    frame    data/chars/1ryo/hado04.gif
    frame    data/chars/1ryo/hado05.gif
    frame    data/chars/1ryo/hado06.gif
    frame    data/chars/1ryo/hado07.gif
    delay   30
    frame    data/chars/1ryo/hado08.gif
    delay   10
    frame    data/chars/1ryo/a306.gif

Code:
name     kohkn
health   0
speed    20
type     pshot
counter  9999
shootnum 9999
nolife   1
remove   1
candamage enemy obstacle
gfxshadow    1
alpha    1

anim idle
    loop    1
    delay    3
    offset    -10 41
    attack  26 19 39 33 15 1 0 0 13
    frame    data/chars/0misc1/hado01.gif
    frame    data/chars/0misc1/hado02.gif
    frame    data/chars/0misc1/hado03.gif
    frame    data/chars/0misc1/hado04.gif
    frame    data/chars/0misc1/hado05.gif
 
@afhc2x17 : I've never heard projectile type before and for projectiles type none is enough. Try this:
Code:
//Projectile entity
name     spark
type     none
health     1
remove     0

BTW which openbor are you using?
 
@afhc2x17 : I've never heard projectile type before and for projectiles type none is enough. Try this:
Code:
//Projectile entity
name     spark
type     none
health     1
remove     0

BTW which openbor are you using?
The most recent release: v4 7556 (Sep 2023). I'm currently migrating the mod to the new engine (can't post it here, NSFW). Thanks for the answer!
 
Well, in the Resources section the Engine is on that version.

Now, it seems that the problem was resolved by going back to pshot and adjusting speed. Thanks anyway!
 
Back
Top Bottom