Author Topic: Looking for a projectile  (Read 2101 times)

Are there any projectiles that can push the default Vehicle_Ball?

Rocket launcher, I believe. (rocketLauncherProjectile?)

I need something that wont explode

The pushbroomprojectile works, but only pushes it up. I need it to push forward.

I need something that wont explode
All projectiles explode, even the pushbroom.

Can you explain more on why you need this?

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.

you can code your own "directional impulse" tho, but that requires at least some knowledge of ts

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

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) [Select]
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

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) [Select]
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


oh wow i didn't know that

This is exactly why you do trace with functions before packaging them.

Nowdays you can simply ask someone for the function source if applicable

This is exactly why you do trace with functions before packaging them.

Nowdays you can simply ask someone for the function source if applicable
Not quite, I suspect that if you have found a previous Add-on that packages ProjectileData::onCollision or even found a resource on the forum, you would simply copy the required parameters as you would think the parameters would be trivial knowledge by now. I respect that it was an error on my part (though I believe failure to not use trace was not the root of the error), an update has been made to correct the packaging error and will be available on Glass at some point.

Download: https://www.dropbox.com/s/v7d77rytztoyf8m/Weapon_C4Explosive.zip?dl=1

Event_lastProjectile also breaks this functionality for future reference.

Code: (ProjectileData::onCollision) [Select]
function ProjectileData::onCollision(%this,%obj,%col,%fade,%pos,%norm,%impulseVector)
{
Parent::onCollision(%this,%obj,%col,%fade,%pos,%norm,%impulseVector);
}
« Last Edit: January 23, 2018, 02:25:17 AM by Plornt »

I am saying that some people have a decompiler to read the source functions and give people how certain functions are called by. There are a decent amount of people who can do this too. Very useful.
« Last Edit: January 23, 2018, 03:11:25 PM by Kyuande »

Event_lastProjectile also breaks this functionality for future reference.
It doesn't look like Lilboarder has been active for at least a year.

What should our policy for this sort of thing be?
If someone hasn't logged in for a long time, I'm tempted to just fix the add-on and push an update through glass.

If you have 0 contact with the person/have not responded to your request in a month I feel like that is the time when you can fix someone's stuff since they cannot