Blockland Forums > Modification Help
Looking for a projectile
<< < (2/3) > >>
Pompmaker2:
i think he's looking for a projectile with no radius impulse but a direct impulse which can push things forward

sorry, I'm afraid you're out of luck. direct impulse can only push vehicles up, not forward. it's why I had to include a small explosion with my tanks' ap shells.
it's just how vehicle physics works. bots can be pushed forward by direct impulse though.
Conan:
you can code your own "directional impulse" tho, but that requires at least some knowledge of ts
Pompmaker2:
you can try looking at the gravity gun's alt-fire push, i think that was able to push vehicles. It was a raycast if I'm not mistaken tho
Tendon:
You've caused me to stumble upon something sad.  In a default version of Blockland, the pushbroom does have a directional impulse which pushes the ball.
But an add-on(, or multiple add-ons?) break it by improperly parenting ProjectileData::onCollision.


--- Code: (BlocklandMain/console.log) ---Entering [c4]ProjectileData::onCollision(956, 17924, 17863, 1, 0.444532 -16.938805 44.434898, 0.661617 0.723683 0.195212)
   Entering ProjectileData::onCollision(956, 17924, 17863, 1, 0.444532 -16.938805 44.434898, 0.661617 0.723683 0.195212)
      Entering getBL_IDFromObject(17924)
         Entering getBrickGroupFromObject(17924)
         Leaving getBrickGroupFromObject() - return 11235
      Leaving getBL_IDFromObject() - return 999999
      Entering miniGameCanDamage(11317, 17863)
         Entering getMiniGameFromObject(11317)
            Entering getBL_IDFromObject(11317)
               Entering getBrickGroupFromObject(11317)
               Leaving getBrickGroupFromObject() - return 11235
            Leaving getBL_IDFromObject() - return 999999
         Leaving getMiniGameFromObject() - return -1
         Entering getMiniGameFromObject(17863)
         Leaving getMiniGameFromObject() - return -1
      Leaving miniGameCanDamage() - return 1
      Entering ProjectileData::Damage(956, 17924, 17863, 1, 0.444532 -16.938805 44.434898, 0.661617 0.723683 0.195212)
      Leaving ProjectileData::Damage() - return 956
      Entering ProjectileData::impactImpulse(956, 17924, 17863, )
      Leaving ProjectileData::impactImpulse() - return 53886
   Leaving ProjectileData::onCollision() - return 53886
Leaving [c4]ProjectileData::onCollision() - return
--- End code ---

See where the c4 package cuts off some of the data at the beginning, and then when it goes to do ProjectileData::impactImpulse near the end it's missing the impulse vector.

This is what it's supposed to look like:

--- Code: (BlocklandDefault/console.log) ---Entering ProjectileData::onCollision(723, 13156, 13140, 1, 19.794445 -6.062751 2.383107, -0.945187 0.135910 0.296222, 59.016998 -14.131500 8.035010)
   Entering getBL_IDFromObject(13156)
      Entering getBrickGroupFromObject(13156)
      Leaving getBrickGroupFromObject() - return 10442
   Leaving getBL_IDFromObject() - return 999999
   Entering miniGameCanDamage(10457, 13140)
      Entering getMiniGameFromObject(10457)
         Entering getBL_IDFromObject(10457)
            Entering getBrickGroupFromObject(10457)
            Leaving getBrickGroupFromObject() - return 10442
         Leaving getBL_IDFromObject() - return 999999
      Leaving getMiniGameFromObject() - return -1
      Entering getMiniGameFromObject(13140)
      Leaving getMiniGameFromObject() - return -1
   Leaving miniGameCanDamage() - return 1
   Entering ProjectileData::Damage(723, 13156, 13140, 1, 19.794445 -6.062751 2.383107, -0.945187 0.135910 0.296222)
   Leaving ProjectileData::Damage() - return 723
   Entering ProjectileData::impactImpulse(723, 13156, 13140, 59.016998 -14.131500 8.035010)
   Leaving ProjectileData::impactImpulse() - return 68767
Leaving ProjectileData::onCollision() - return 68767
--- End code ---

Pompmaker2:
oh wow i didn't know that
Navigation
Message Index
Next page
Previous page

Go to full version