Event_setInvincible & Event_setCantDamage

Author Topic: Event_setInvincible & Event_setCantDamage  (Read 4189 times)

I made two events.

onwhatever > Player > setInvincible [  ]

and

onwhatever > Player > setCantDamage [  ]

Both of these are admin only.

http://www.mediafire.com/download/r4qygd82drnls4k/Event_setInvincible.zip
http://www.mediafire.com/download/vfdxbdgas113l0q/Event_setCantDamage.zip


onwhatever > Player > setCantDamage [  ]


SetCantDamage??

Why not just setCanDamage?


Why not just setCanDamage?
You start out being able to damage others.  My modification is to make it so you can not.

Just so yah know, I made this for a City RPG.  So the host can add safe zones(bank, police department, etc).

You start out being able to damage others.  My modification is to make it so you can not.

Just so yah know, I made this for a City RPG.  So the host can add safe zones(bank, police department, etc).

SetCanDamage sounds less odd and fits with other names better. Just negate the boolean.

With a li'l check box.

SetCanDamage sounds less odd and fits with other names better. Just negate the boolean.
After careful consideration I feel setCantDamage is a better option.  If anyone want's to make it setCanDamage, feel free to release it as such.  Everything on BL is open source anyway.

Thanks for the poke though.  I had a few typos in the description and server.cs I needed to fix. link updated
« Last Edit: March 26, 2014, 08:30:48 AM by Dglider »

What? Can you not see how awkward that sounds? Booleans are generally a 'can' to avoid double negatives; ex. SetCantDamage -> true is like saying 'Yes, you can't damage the person.' SetCantDamage -> false = 'no, you can't not damage the person'
???
« Last Edit: March 26, 2014, 01:59:02 PM by Evar678 »


I made an inverted version that works just the same if anyone wants it.

Event_SetCanDamage

Isn't there a disable damage event already.

Isn't there a disable damage event already.
Yeah I remember using one, but it set it so that you couldn't do damage and couldn't take damage, these are 2 separate events.

Oh, I don't think that matters.
Adhering to good coding conventions helps keep the game's modding scene from being a loving mess. Do you want the game's modding scene to be a loving mess? I don't think you would want the game's modding scene to be a loving mess. Look around and try to find another function or method with "Cant" in the name of it. Nobody loving does that. You shouldn't either.

Adhering to good coding conventions helps keep the game's modding scene from being a loving mess. Do you want the game's modding scene to be a loving mess? I don't think you would want the game's modding scene to be a loving mess. Look around and try to find another function or method with "Cant" in the name of it. Nobody loving does that. You shouldn't either.

This.
Can you not see how dumb you're being? I mean seriously.
You're obviously just being lazy and stubborn. You insist that it doesn't matter even though NO ONE uses a "Cant" boolean and everyone is telling you to change it.

It's bad practice. Fix it.