Knife vs knife issue

mersox

Active member
Hi guys, I've had this issue for a while and I haven't been able to fix it. Essentially, I can't make it so that the "knife" you throw affects the "knife" an enemy has thrown. I could change it so one of these entities is not a knife at all but I'd like to see if there's a simpler fix that I'm overlooking.

In this example, I have foot soldiers that throw boomerangs. When playing as the turtles, players can hit the boomerang with a basic attack, sending the boomerang away. This is not possible while playing as rocksteady, who shoots bullets. The bullets just pass through the boomerang as if completely ignoring its bbox.

TMNT_Fall_Remake - 0025.png

I have toyed with "candamage", changing the z depth of the attackbox, changing the "type" of the boomerang and bullet entities, etc etc. Nothing works. Maybe knifes just can't attack each other, but maybe I'm overlooking something, which is why I'm asking here.

Here are the scripts of the boomerang and the bullet. They're both set as knifes from their respective throwers, and called with "throwframe"

name boomerang
health 1
speed 5

subtype flydie
shadow 0
remove 1
nolife 1
nodieblink 2
falldie 1

subject_to_obstacle 0
subject_to_platform 0

anim idle
loop 1
delay 5
offset -14 9
attack 2 1 8 15 1 0 0 0 0 6
bbox 2 1 8 15
frame data/chars/foot/boomerang.png
frame data/chars/foot/boomerang.png



anim death
loop 0
delay 60
offset -14 9
jumpframe 0 3 -1
bbox 44 34 8 6
sound data/sounds/(tmnt2/hit01.wav
frame data/chars/foot/boomerang.png
@cmd killentity getlocalvar("self")
frame data/chars/misc/smoke/empty.png

name rocksteady_bullet_player
speed 8
shadow 0
remove 1
nolife 1
nodieblink 2
falldie 1
offscreenkill 1



anim idle
loop 1
delay 100
offset 24 36
attack 44 34 8 6 1 0 0 0 0 45
frame data/chars/rocksteady/rocksteady_bullet.png

anim death
loop 0
delay 100
offset 24 36
jumpframe 0 5 -1
sound data/sounds/(tmnt2/hit01.wav
frame data/chars/rocksteady/rocksteady_bullet.png
 
@mersox,

The engine is hard coded so that entities with the "owner" property (what it uses to know who owns a projectile) populated ignore each other.

I don't know why honestly but was afraid to disable it and didn't have time to make it optional in last release.

There are some workarounds though.

DC
 
@mersox,

The engine is hard coded so that entities with the "owner" property (what it uses to know who owns a projectile) populated ignore each other.

I don't know why honestly but was afraid to disable it and didn't have time to make it optional in last release.

There are some workarounds though.

DC

OK thanks, that clears it up. Luckily in my game I only have one instance of this (the boomerang), so I'll just change it up to be it's own entity (non-knife). Thanks again!
 
Back
Top Bottom