Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TheViewer

Pages: 1 2 3 4 [5]
61
Modification Help / Re: Proper kill message for delayed damage
« on: December 21, 2017, 02:34:51 AM »
I put a check so that in case of a bot being the killer it would use %obj.sourceObject, but the kill message still doesn't show the bot's name.

function gunASDFProjectile::onCollision(%this,%obj,%col,%fade,%pos,%norm)
{
   if(%obj.sourceObject.getClassName() $= "AiPlayer")
      %col.schedule(2000,damage,%obj.sourceObject,%col.getPosition(),100,%this.directDamageType);
   else
      %col.schedule(2000,damage,%obj.client,%col.getPosition(),100,%this.directDamageType);

   Parent::onCollision(%this,%obj,%col,%fade,%pos,%norm);
}


On further testing, it appears that kill messages are usually correct when the attacker is a player and either %obj (the projectile), %obj.sourceObject, or %obj.client is passed in to the damage method, provided that whatever is passed in still exists after 2 seconds. However, if the attacker is a bot, then neither %obj.sourceObject nor %obj.client will get a correct kill message, and only %obj works, as long as it exists.

How bad is it to be creating temporary script objects every time someone gets hit by the weapon's projectiles?

62
Suggestions & Requests / Snip3r's old SMG
« on: December 19, 2017, 08:28:26 PM »
Anyone have a download for this add-on? https://forum.blockland.us/index.php?topic=60772.0

63
Modification Help / Re: Proper kill message for delayed damage
« on: December 19, 2017, 01:23:39 PM »
Code: [Select]
%col.schedule(2000,damage,%obj.client,%col.getPosition(),100,%this.directDamageType);
I tried this, and the kill messages seem to work for players but not bots.

64
Modification Help / Re: Proper kill message for delayed damage
« on: December 19, 2017, 01:57:40 AM »
Thank you, that worked.

65
Modification Help / Proper kill message for delayed damage
« on: December 19, 2017, 01:41:27 AM »
I'm making a weapon that deals damage 2 seconds after the target is hit. Here is a snippet of code:

function gunASDFProjectile::onCollision(%this,%obj,%col,%fade,%pos,%norm)
{
   %col.schedule(2000,damage,%obj,%col.getPosition(),100,%this.directDamageType);

   Parent::onCollision(%this,%obj,%col,%fade,%pos,%norm);
}


The problem is that the person using the weapon is not credited with kills in the chat. I suspect this is because the projectile %obj no longer exists after 2000 ms. If so, what would be the optimal way to preserve the data of the projectile to pass into the damage function, and then delete it when it's no longer necessary?

67
Suggestions & Requests / Resizing the player list gui
« on: July 07, 2017, 11:35:16 PM »
It seems the F2 player list can only be resized vertically and not horizontally. Is there a client add-on out there that can scale the player list horizontally? Or, one that is able to change the width of the columns such as Score, BL_ID, etc. Namely I want to be able to see the full score of players who have 1 million or greater score.

68
Suggestions & Requests / Download for Bushido's old flamethrower
« on: March 24, 2017, 12:18:22 AM »
I'm looking for the old Weapon_BFlamethrower.zip from RTB2. I found it in an old add-ons topic but the link is dead.
https://forum.blockland.us/index.php?topic=142375.msg3714179#msg3714179
If anyone still has it could they please post it here?

69
Suggestions & Requests / Binary Save/Load
« on: January 02, 2016, 11:54:26 AM »
http://forum.blockland.us/index.php?topic=265798.0
If anyone had a working download for this, it'd be really useful. If not, maybe someone could develop this once again?

Pages: 1 2 3 4 [5]