Bob the Hamster OHRRPGCE Developer
 
 
  
  Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
  | 
		
			
				 Posted: Tue Jan 08, 2013 7:21 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				You cannot force removal of the hero in the way you describe without plotscripting.
 
 
Here is how to script it.
 
 
 	  | Quote: | 	 		  | a) when it dies (preferably) | 	  
 
 
This can be done with an after-battle script
 
 
 	  | Code: | 	 		  
 
plotscript, after battle example, begin
 
  variable(slot)
 
  slot := find hero(hero:shadow hero)
 
  if(slot >= 0) then(
 
    if(get hero stat(slot, stat:HP) == 0) then(
 
      delete hero(hero:shadow hero)
 
    )
 
  )
 
end
 
 | 	  
 
 
 	  | Quote: | 	 		  | b) when you leave a map | 	  
 
 
You can do this with a map-autorun script.
 
 
 	  | Code: | 	 		  
 
plotscript, map autorun example, begin
 
  delete hero(hero:shadow hero)
 
end
 
 | 	  
 
 
 	  | Quote: | 	 		  | c) after "x" number of fights.  | 	  
 
 
This can be done with an after-battle script and a global variable.
 
 
 	  | Code: | 	 		  
 
plotscript, after battle example, begin
 
  variable(slot)
 
  slot := find hero(hero:shadow hero)
 
  if(slot >= 0) then(
 
    # Shadow hero is in the party
 
    shadow hero battle count += 1
 
    if(shadow hero battle count >= 10) then(
 
      delete hero(hero:shadow hero)
 
      shadow hero battle count := 0
 
    )
 
  )
 
end
 
 | 	 
  | 
			 
		  |