| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		Laven Atries Starmaster
 
 
 
  Joined: 21 Mar 2003 Posts: 11
 
  | 
		
			
				 Posted: Mon Apr 28, 2003 5:50 am    Post subject: How do you make an NPC hurt you | 
				     | 
			 
			
				
  | 
			 
			
				Basically, the topic says it all.  I want to know if there is a script command, or series of them that I can use to make an NPC deal 4 damage to a hero every time he activates it.  Basically I'm trying to make a walking, talking harm tile.  Any help would be appreciated!
 
 
-Laven Atries _________________ Oro? | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Setu_Firestorm Music Composer
 
 
  
  Joined: 26 Mar 2003 Posts: 2566 Location: Holiday. FL
  | 
		
			
				 Posted: Mon Apr 28, 2003 9:52 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				I'm not entirely sure if this'll work, but I think it just may.
 
 
 	  | Code: | 	 		  script, MeanNPC, begin   #Script for the mean guy who punches you
 
 
tweak palette (20,0,0)
 
update palette                #all of these commands will make the screen
 
wait (2)                         #flash red
 
set hero stat (hero:You,stat:HP,current stat -- "Damage")  #this calculates wait (2)                                                                         #damage
 
reset palette
 
update palette
 
end | 	  
 
 
After that, just tell the NPC to run that "MeanNPC" script. Hope that helps. _________________
  
 
 
Facebook: http://www.facebook.com/georgerpowell
 
Newgrounds: http://setu-firestorm.newgrounds.com | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Guest
 
 
 
 
 
 
 
  | 
		
			
				 Posted: Tue Apr 29, 2003 3:26 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				thanks.  I got the script working.  Appreciate the help!
 
 
-Laven Atries | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		 |