| Author | Message | 
        
			| salt_1219 
					Joined: Tue Jan 12, 2010 8:25 pm
 Posts: 400
 Location: mukilteo, wa
   |   Actor healing factorForgive 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.
 
 
 | 
		
			| Tue Feb 09, 2010 5:56 am | 
					
					   | 
	
	
		|  | 
	
			| 411570N3 
					Joined: Wed Jan 07, 2009 10:26 am
 Posts: 4074
 Location: That quaint little British colony down south
   |   Re: Actor healing factorYou just remove the bits about the emission damage on the wound emitter. 
 
 | 
		
			| Tue Feb 09, 2010 7:08 am | 
					
					     | 
	
	
		|  | 
	
			| Lizardheim DRL Developer 
					Joined: Fri May 15, 2009 10:29 am
 Posts: 4107
 Location: Russia
   |   Re: Actor healing factorOR:
 Have some wounds that give positive damage and some that gives negative damage.
 
 
 | 
		
			| Tue Feb 09, 2010 8:02 am | 
					
					   | 
	
	
		|  | 
	
			| Mind 
					Joined: Thu Mar 06, 2008 10:54 pm
 Posts: 1360
 Location: USA
   |   Re: Actor healing factorOk 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?
 
 | 
		
			| Tue Feb 09, 2010 7:16 pm | 
					
					   | 
	
	
		|  | 
	
			| salt_1219 
					Joined: Tue Jan 12, 2010 8:25 pm
 Posts: 400
 Location: mukilteo, wa
   |   Re: Actor healing factorMind 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   
 
 | 
		
			| Tue Feb 09, 2010 8:29 pm | 
					
					   | 
	
	
		|  | 
	
			| Grif REAL AMERICAN HERO 
					Joined: Sat Jan 27, 2007 10:25 pm
 Posts: 5655
   |   Re: Actor healing factorif 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 
 
 | 
		
			| Wed Feb 10, 2010 1:24 am | 
					
					   | 
	
	
		|  | 
	
			| Azukki 
					Joined: Sat Nov 03, 2007 9:44 pm
 Posts: 1916
 Location: Flint Hills
   |   Re: Actor healing factorYeah 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.
 
 
 | 
		
			| Wed Feb 10, 2010 5:57 am | 
					
					   | 
	
	
		|  | 
	
			| salt_1219 
					Joined: Tue Jan 12, 2010 8:25 pm
 Posts: 400
 Location: mukilteo, wa
   |   Re: Actor healing factorAzukki 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.
 
 | 
		
			| Wed Feb 10, 2010 6:14 am | 
					
					   | 
	
	
		|  | 
	
			| Grif REAL AMERICAN HERO 
					Joined: Sat Jan 27, 2007 10:25 pm
 Posts: 5655
   |   Re: Actor healing factorlook 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
 
 
 | 
		
			| Wed Feb 10, 2010 6:28 am | 
					
					   | 
	
	
		|  | 
	
			| salt_1219 
					Joined: Tue Jan 12, 2010 8:25 pm
 Posts: 400
 Location: mukilteo, wa
   |   Re: Actor healing factorQuote: 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.
 
 | 
		
			| Wed Feb 10, 2010 7:06 am | 
					
					   | 
	
	
		|  | 
	
			| Mind 
					Joined: Thu Mar 06, 2008 10:54 pm
 Posts: 1360
 Location: USA
   |   Re: Actor healing factorAw man Grif nice one.[Mod edit] That wasn't really necessary.
 Neither is have the stuff people say on these forums. :3
 
 
 
    							Last edited by Mind on Sun Feb 21, 2010 7:41 pm, edited 2 times in total. 
 
 | 
		
			| Wed Feb 10, 2010 11:10 pm | 
					
					   | 
	
	
		|  | 
	
			| Chlapecek96 
					Joined: Thu Mar 26, 2009 6:20 pm
 Posts: 10
   |   Re: Actor healing factorSorry guyz,  but how to attach the script to weapon? Everytime a try scriptpath = blah blah blah blah it show error 
 
 | 
		
			| Sun Feb 21, 2010 6:50 pm | 
					
					   | 
	
	
		|  | 
	
			| Lizardheim DRL Developer 
					Joined: Fri May 15, 2009 10:29 am
 Posts: 4107
 Location: Russia
   |   Re: Actor healing factorMaybe make a topic with the apropriate title yourself? 
 
 | 
		
			| Sun Feb 21, 2010 7:37 pm | 
					
					   | 
	
	
		|  | 
	
			| 411570N3 
					Joined: Wed Jan 07, 2009 10:26 am
 Posts: 4074
 Location: That quaint little British colony down south
   |   Re: Actor healing factorYou put it on the bullet. Not the gun. Way to follow instructions. 
 
 | 
		
			| Mon Feb 22, 2010 6:51 am | 
					
					     | 
	
	
		|  | 
	
	
		|  |