Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

deleting Heros

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
gagekilmer
Guest






PostPosted: Mon Jan 07, 2013 9:09 pm    Post subject: deleting Heros Reply with quote

I want to have an inn that lety you hire a shadow clone that either leaves
a) when it dies (preferably)
b) when you leave a map
c) after "x" number of fights.
ive made the inn and the way to hire, i Just dont know how to force removal without plotscripting
Back to top
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Tue Jan 08, 2013 7:21 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group