Object damage, Devs and Lindens Please Read!!!
|
|
Paradigm Brodsky
Hmmm, How do I set this?
Join date: 28 Apr 2004
Posts: 206
|
01-29-2005 15:29
Ok, it is my belief that SL could benefit greately by adding a simple new event called take_damage You have to create a listener for it like "listen" does. llTake_Damage(float max_damage); This sets how many hit points the object has. Then when the object run out of hit points the take_damage event is executed where people can script their objects to do whatever they want them to do after taking so much damage. This would allow for things such as easily destroyable vehicles, shields that wear down, etc. It would be a blast I think. Ideally it would plug right into the damage system for avitars, and the objects would also reginerate over time etc, and only be effected in damage zones, etc... Please consider this. It's such a waste when my genious is ignored. I know this has been asked b4 (at least once by me) but now that I suggest if you should really listen 
_____________________
I'll do anything for love, most things for money, and some things for a smile.
|
|
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
|
01-29-2005 15:42
cool idea but what about llSetHealth(float health), llGetHealth() and a health event. that makes it a lil bit more generic so you could trigger the health event for any change in health and not just subtracting. i used health since that's what it's called for avatars too (i think).
can't really call it damage since there's a llSetDamage() already and that would get confusing. that function sets the damage an object does to something's health.
|
|
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
01-30-2005 06:41
Uhhh... Why not float health = 100;? We already have collision events and listen events and any other possible way of transmitting "damage", and we have variables, and we have llDie(), llRezObject() (for those object fragments flying all over the place), and other functions that can easily be used for object damage.
I KNOW beyond a shadow of a doubt dozens of people have already made damageable vehicles. What's stopping you?
_____________________
</sarcasm>
|
|
Paradigm Brodsky
Hmmm, How do I set this?
Join date: 28 Apr 2004
Posts: 206
|
01-30-2005 09:29
Your right Mole, I'm so dumb that I never thought of that Anyways. I thought it would be nice to have built in functions that interact with the damage settings that people put in their ammo. Meaning, just because something hits me at such velocity, doesn't mean it should take as much damage as another object with a higher damage setting. I.E. A ball with 1 damage shouldn't take up the same damage as one with 100 damage. Some people like me actually use bulets that don't kill right away, or with one hit. A built in system could take advantage of this more accurately. Zuzi,  you have some good ideas and points, but a health event would be triggered everytime the object recovers a little bit of health, making predicting how the code will act harder. for instance I believe that an ave heals 2 points per second. So every second untill it gets back up to 100% the event will be triggered, and things you wanted only to execute on the way down, will execute again on the way up. And Mole will probably say, duhh then code it better or something, lol, but the point is it will be harder. But that's not neccisarily a bad thing for everyone. However it doesn't neccesarily need to heal like aves do, I just figured they could easily plug it into the existing sytem and it would behave like that. Your way Zuzi is not as pluggable, but it allows you to set your own health recovery scheme.  I like that.
_____________________
I'll do anything for love, most things for money, and some things for a smile.
|
|
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
|
01-30-2005 14:57
i thought about the healing thing triggering the health event over and over but i figured this was for objects not avis so they wouldn't really heal. the main reason i wouldn't try to do something like this with a float and collisions is that collision_start is pretty messed up right now so all you have is collision and you could end up triggering it over and over for a single collision if things got a lil bit laggy or went wrong somehow. really i barely understand where you're going with this or even if what i'm saying is helpful. i'm like a bat. i just screech something and wait for the echoes to come back and tell me what's going on. 
|
|
Lance LeFay
is a Thug
Join date: 1 May 2003
Posts: 1,488
|
01-30-2005 19:29
I made a damage system with land, air, and infantry units... not really hard.
_____________________
"Hoochie Hair is high on my list" - Andrew Linden "Adorable is 'they pay me to say you are cute'" -Barnesworth Anubis
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
01-30-2005 19:59
Have to agree with lance on this one. The trouble with this feature request is that a damage system like this is you then have no control over the weapons people bring into your game.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
|
01-30-2005 23:39
how do you avoid that? do you have to make everything in kind of a closed system and make sure people only use your stuff?
|
|
Issarlk Chatnoir
Cross L. apologist.
Join date: 3 Oct 2004
Posts: 424
|
01-31-2005 04:23
That would be cool.
I'd rather have take_damage triggered each time damage is taken. And possibility to set the health to whatever at any time to allow for unbreakable objects as not everyone will want their objects to eventualy die (think about an object that say the damage it just took, for test purpose ; no sense having it die eventually).
_____________________
Vincit omnia Chaos From: Flugelhorn McHenry Anyway, ignore me, just listen to the cow
|
|
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
01-31-2005 06:24
From: Zuzi Martinez how do you avoid that? do you have to make everything in kind of a closed system and make sure people only use your stuff? Exactly.
_____________________
</sarcasm>
|
|
Paradigm Brodsky
Hmmm, How do I set this?
Join date: 28 Apr 2004
Posts: 206
|
02-01-2005 06:52
From: Strife Onizuka Have to agree with lance on this one. The trouble with this feature request is that a damage system like this is you then have no control over the weapons people bring into your game. OK OK you are going to love this ( I do)! Please forget about llTakeDamage. Here is my amended suggestion (after some review). I NOW suggest that the damage system not effect the object’s health automatically, but simply trigger the damage event! At which point you can program your object such that if one shot caused more than a certain amount of damage, then the health is to be reset, or set to a certain level, or even set an if statment limiting the max damage. Supporting this would be : *get_damage(integer num_detected) added to event handlers *llDetetedDamage(integer num) added to the deteted library (i.e.) // Paradigms damage system which // works with the built in damage functions // that controls how much damage can be recieved // and is compatible with all weapons // and that the lindens should push to the devs // NOW (please)
integer health = 215;
default{
state_entry() {
}
get_damage(integer num_detected) { integer damage = llDetectedDamage(0);
if (damage > 20) { health = health - 20; } else { health = health - damage; }
if (health <= 0 ) { llDie; } }
}
So you actually don't have to have a closed system to control damage  . You can still program your object to die only if you are satsfied with the way it was killed. Basically this system recieves an event that damage was taken and how much. And that's why they call me Paradigm. Because i think outside the box! (and because that's my name) Yes admit it, I rock your world!
_____________________
I'll do anything for love, most things for money, and some things for a smile.
|