Data Realms Fan Forums http://45.55.195.193/ |
|
Actor healing factor http://45.55.195.193/viewtopic.php?f=73&t=17779 |
Page 1 of 1 |
Author: | salt_1219 [ Tue Feb 09, 2010 5:56 am ] |
Post subject: | Actor healing factor |
Forgive me if there's already a page on this I did a search for heal, heals, and regen how can I make a emitter that heals my character back to 100 ever time I get hit? I know this wont keep me from dieing due to the gib wound limit. |
Author: | 411570N3 [ Tue Feb 09, 2010 7:08 am ] |
Post subject: | Re: Actor healing factor |
You just remove the bits about the emission damage on the wound emitter. |
Author: | Lizardheim [ Tue Feb 09, 2010 8:02 am ] |
Post subject: | Re: Actor healing factor |
OR: Have some wounds that give positive damage and some that gives negative damage. |
Author: | Mind [ Tue Feb 09, 2010 7:16 pm ] |
Post subject: | Re: Actor healing factor |
Ok well, there are many ways to do it, but I would just say do a simple healing script. Something like Code: function Create(self) local curdist = 200; for actor in MovableMan.Actors do local avgx = actor.Pos.X - self.Pos.X; local avgy = actor.Pos.Y - self.Pos.Y; local dist = math.sqrt(avgx ^ 2 + avgy ^ 2); if dist < curdist then curdist = dist; self.parent = actor; end end end function Update(self) if self.parent.Health < 100 then self.parent.Health = 100; end end That's if the person fires the aemitter. It searches for the nearest actor, and keeps his health at 100 without the "regen effect". I would need a bit more clarification on where the aemitter is to actually write a script I know will work. :3 But that's me. Also, is the aemitter attached to the guy? |
Author: | salt_1219 [ Tue Feb 09, 2010 8:29 pm ] |
Post subject: | Re: Actor healing factor |
Mind wrote: That's if the person fires the aemitter. It searches for the nearest actor, and keeps his health at 100 without the "regen effect". I would need a bit more clarification on where the aemitter is to actually write a script I know will work. :3 But that's me. Also, is the aemitter attached to the guy? I did the emission damage trick and that worked. As for your lua script I think it would work better due to the emission damage can raise your health beyond 100 and I think it shouldn't go past it. The aemitter would be on the actor and always going much like the coalition medic unit, but only affecting its self. - Thank you guys for helping |
Author: | Grif [ Wed Feb 10, 2010 1:24 am ] |
Post subject: | Re: Actor healing factor |
if you correctly balance burstdamage and the actual emissiondamage (and take advantage of emissioncountlimit) there's no need to use lua; .ini code will do it just fine |
Author: | Azukki [ Wed Feb 10, 2010 5:57 am ] |
Post subject: | Re: Actor healing factor |
Yeah but then you can't heal at a constant rate if you set emission damage to heal the burst damage. If you had ten simultaneously inflicted wounds, they would all heal back up just as quickly as one wound. Also you can't heal impulse damage that way. |
Author: | salt_1219 [ Wed Feb 10, 2010 6:14 am ] |
Post subject: | Re: Actor healing factor |
Azukki wrote: Yeah but then you can't heal at a constant rate if you set emission damage to heal the burst damage. If you had ten simultaneously inflicted wounds, they would all heal back up just as quickly as one wound. Also you can't heal impulse damage that way. Hence the need for a lua script instead Right now the negative damage wounds work but just not exactly like I want them to. Btw is there a solution for making a sprite animation only cycle once? its for the same project. |
Author: | Grif [ Wed Feb 10, 2010 6:28 am ] |
Post subject: | Re: Actor healing factor |
look at the definitions of spriteanimmode it's mentioned in (paradoxically) the lua docs on the wiki, but it's an .ini setting (that can be changed with lua) also, mind's script is just as useless (more so, likely) than doing this with .ini code I really don't see exactly why your undoubtedly shitty and terribly sprited mod needs even the slightest amount of lua Be nice to the newbie, we all started somewhere. Lua is all the rage after all. -Duh |
Author: | salt_1219 [ Wed Feb 10, 2010 7:06 am ] |
Post subject: | Re: Actor healing factor |
Quote: SpriteAnimMode * 0 = NOANIM * 1 = ALWAYSLOOP * 2 = ALWAYSRANDOM * 3 = ALWAYSPINGPONG * 4 = LOOPWHENMOVING * 5 = LOOPWHENOPENCLOSE * 6 = PINGPONGOPENCLOSE SetNextFrame Hard-sets the frame this sprite is supposed to show, to the consecutive one after the current one. If currently the last fame is this will set it to the be the first, looping the animation. This seems to be what I need here, the setnextframe, the modes I already figured out. This way I can pick the frame I want it to be on. |
Author: | Mind [ Wed Feb 10, 2010 11:10 pm ] |
Post subject: | Re: Actor healing factor |
Aw man Grif nice one. [Mod edit] That wasn't really necessary. Neither is have the stuff people say on these forums. :3 |
Author: | Chlapecek96 [ Sun Feb 21, 2010 6:50 pm ] |
Post subject: | Re: Actor healing factor |
Sorry guyz, but how to attach the script to weapon? Everytime a try scriptpath = blah blah blah blah it show error |
Author: | Lizardheim [ Sun Feb 21, 2010 7:37 pm ] |
Post subject: | Re: Actor healing factor |
Maybe make a topic with the apropriate title yourself? |
Author: | 411570N3 [ Mon Feb 22, 2010 6:51 am ] |
Post subject: | Re: Actor healing factor |
You put it on the bullet. Not the gun. Way to follow instructions. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |