| Blockland Forums > Help |
| How i Make a Script of weapon that kills a bot? |
| << < (4/4) |
| Pacnet2012³:
--- Quote from: Acerblock on October 14, 2012, 10:20:34 PM ---Guys, he means a script that insta-kills a bot when fired regardless of the gun. --- End quote --- Set the projectile damage to 100 |
| The Corporation:
--- Quote from: Pacnet2012³ on October 15, 2012, 03:07:16 PM ---Set the projectile damage to 100 --- End quote --- The weapon instakills only bots. |
| Axolotl2:
--- Quote from: The Corporation on October 15, 2012, 04:51:52 PM ---The weapon instakills only bots. --- End quote --- test this for me --- Code: ---package InstaKillsOnlyBots { function YourWeaponProjectileData::damage(%this,%obj,%col,%fade,%pos,%normal) { if(%this.directDamage <= 0) return; %damageType = $DamageType::Direct; if(%this.DirectDamageType) %damageType = %this.DirectDamageType; %scale = getWord(%obj.getScale(), 2); if(%col.getClassName() $= "AIPlayer") %directDamage = %col.getDatablock().maxHealth; //is this the armor datablock attribute for the max health? else %directDamage = mClampF(%this.directDamage, -100, 100) * %scale; if(%col.getType() & $TypeMasks::PlayerObjectType) %col.damage(%obj, %pos, %directDamage, %damageType); else %col.damage(%obj, %pos, %directDamage, %damageType); } }; activatepackage(InstaKillsOnlyBots); --- End code --- |
| Navigation |
| Message Index |
| Previous page |