| Blockland Forums > Modification Help |
| Weapon doesn't do any radius damage |
| << < (3/4) > >> |
| Kyuande:
--- Quote from: Masterlegodude on November 02, 2017, 07:45:41 AM ---Why are you referencing the Admin Wand's explosion if you already have most of the explosion data variables anyway? The Admin Wand does no damage, so maybe that's the problem? --- End quote --- No. You can refer to another object as long as you overwrite the variable. Here's how inheritance works: NewData : CopyData The NewData will have the same exact data as CopyData - anything inside NewData will overwrite CopyData's variables that were copied onto NewData (note: CopyData will not be modified by this) Change DamageRadius from 3 to 10 to see if it actually works. You did mention that this projectile bounce - if you want the projectile to explode every bounce impact you have to package the projectile's onCollision function |
| Brixmon:
--- Quote from: Kyuande on November 02, 2017, 08:33:35 PM ---No. You can refer to another object as long as you overwrite the variable. Here's how inheritance works: NewData : CopyData The NewData will have the same exact data as CopyData - anything inside NewData will overwrite CopyData's variables that were copied onto NewData. Change DamageRadius from 3 to 10 to see if it actually works. --- End quote --- Haaa... I, um, I already tried that after I posted my last reply. There's absolutely no radius damage. I also tried setting the radius damage to 100 so it would oneshot hole bots. It doesn't, and the hit markers mod only showed one damage number, so the bounce explosions simply refuse to deal radius damage. Is this a known thing? You'd think if this was a problem with Blockland itself that the inability of bounce explosions to deal radius damage would be known, right, considering it's been around for over a decade... Edit: If this is a thing, surely it's possible to get the bounce explosion to instead spawn a projectile that instantly dies, thus spawning a damaging explosion. I have very little coding experience- this mod is pretty much the culmination of all my TorqueScript ability I have at this time. If that's possible to do, could someone show me? It would also be incredibly useful for making projectiles that split, which would be awesome. Edit 2: Ah, I thought there was already something like this. The old Frag Grenade spawns shrapnel on explosion instead of normal radius damage, and it has a function here that could very well be appropriated for other purposes. I imagine I could use this for my purpose, but that's only needed here if the bounce explosion functionality GENUINELY cannot deal radius damage. |
| Conan:
if you're spawning a projectile using code you need to make sure it has the sourceobject and sourceclient parameters defined as those are used in the minigameCanDamage damage check code |
| Brixmon:
--- Quote from: Conan on November 02, 2017, 08:45:50 PM ---if you're spawning a projectile using code you need to make sure it has the sourceobject and sourceclient parameters defined as those are used in the minigameCanDamage damage check code --- End quote --- I'm not doing that yet. This has so far all been done using default code and functions. Bounce explosions, judging from these problems I've had, seem to be totally incapable of dealing radius damage in any way. Edit: Oh, but how would I format sourceClient? Would it be: --- Code: ---sourceClient = %obj.client.player; --- End code --- Or: --- Code: ---sourceClient = %obj.client.getplayername; --- End code --- Or: --- Code: ---sourceClient = %obj.client.player.getID; --- End code --- |
| Conan:
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 |
| Navigation |
| Message Index |
| Next page |
| Previous page |