Blockland Forums > Modification Help

Weapon doesn't do any radius damage

Pages: << < (4/4)

Brixmon:


--- Quote from: Conan on November 02, 2017, 09:10:56 PM ---depends on the function its in, cause the parameters may be different.

sourceClient:
if %obj is a player object, then its %obj.client
if %obj is a projectile, then its %obj.sourceClient
if %obj is a client, then its %obj (duh)

sourceObject:
if %obj is a player object, then its %obj (duh)
if %obj is a projectile, then its %obj.sourceObject
if %obj is a client, then its %obj.player

we need the relevant oncollision code to comment on this better

--- End quote ---
Hm, okay. It occurs to me, though, that the Frag Grenade's shrapnel function involves a lot of stuff specific to that weapon- plus, it calls onExplode.
I don't really know how to write functions, nor how to make it just spawn a projectile at the impact point/explosion center. How would I call a function for bounce explosions? onBounce? onBounceExplode? onCollision?

The function itself would start with
--- Code: ---function DemonFireballWandProjectile::onWhatever
--- End code ---
, by the way.

Rally:


--- Quote from: Brixmon on November 02, 2017, 07:14:05 PM ---That still won't fix it.
Can bounce explosions even deal radius damage? The projectile is meant to last a while, bouncing around and doing radius damage whenever it bounces, but it's not working.

--- End quote ---

Does it do radius damage after 4 second and a half seconds? Try setting ArmingDelay to 0 and see if it does radius damage. You might have to write additional functions for onCollision (or onBounce or something) if this is the functionality you want

Kyuande:

I did PM him and we chat back and forth. I told him the args for function onCollision, and examples of exploding new projectiles. Problem is fixed as far as I know.

Goth77:

onCollision Generally works like this

ProjectileName::onCollision(%this, %obj, %col, %fade, %pos, %normal, %velocity)

Don't forget to parent your functions if need be - that could also be the issue

Kyuande:


--- Quote from: Goth77 on November 04, 2017, 03:22:52 AM ---onCollision Generally works like this

ProjectileName::onCollision(%this, %obj, %col, %fade, %pos, %normal, %velocity)

Don't forget to parent your functions if need be - that could also be the issue

--- End quote ---
Yep! I did mention this to him as well.

Pages: << < (4/4)

Go to full version