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

Party Position Lock

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




Joined: 24 Mar 2010
Posts: 3
Location: NC

PostPosted: Wed Mar 24, 2010 5:55 am    Post subject: Party Position Lock Reply with quote

I know you can lock heroes to prevent the player from swapping them in and out of the party, but I think it would be swell if you could lock a hero into a certain position in the party.

For example, let's say I want my main character unable to be swapped out of the leader position.

Is there already some plotscript to do this? If not, I think that would be a useful thing to add. Cool
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
G-Wreck
OHRRPGCE Game Designer




Joined: 28 Feb 2010
Posts: 32
Location: Oklahoma

PostPosted: Wed Mar 24, 2010 10:02 am    Post subject: Reply with quote

Back-up your game and script files before you try this, because I'm not sure if it will work or not, but you might try running this script as your 'each step' script for the maps you are using:

Code:
plotscript,main_hero_always_leader,begin

variable (my hero)

my hero := (the "hero is leader" tag of the hero you want to always be leading)

   while ( check tag (my hero) == false )
      
      do (    swap by position (0,1)
         swap by position (0,2)
         swap by position (0,3)
      )

end


This technically will not lock the hero into the first position, but the idea is to fake it by swapping other heroes in your party with the leader until your desired leader's 'hero is leading' tag turns back on.

Again, be sure to back-up your files before you try it, because I can easily see this freezing your game.
Back to top
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Wed Mar 24, 2010 12:41 pm    Post subject: Reply with quote

People have been asking for this for a logn time. We really need this a s a built in feature. Anyway, here is how I would implement it with plotscripting.

Code:

plotscript, order menu wrapper, begin
  order menu
  while(enforce party order) do(
    order menu
  )
end

script, enforce party order, begin
  if(hero by rank(0) <> hero:Bob) then(
    swap by position(0, find hero(hero:Bob))
    show text box(57) # A box that says Bob must be the leader
    wait for text box
    exit returning(true)
  )
end



Edit your main menu, and replace the "Order" (or "Team") menu option with the first script. It displays the order menu, then checks to make sure the correct hero is in the lead. If they are not, it moves them back to the lead and re-opens the order menu. The player will not be able to get out of the order menu unless they leave the hero in the lead, but they will still be able to freely rearrange the other heroes.

For this method to work, you need to allow scripts to run while your main menu is open.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
teejaynumber13




Joined: 24 Mar 2010
Posts: 3
Location: NC

PostPosted: Wed Mar 24, 2010 2:02 pm    Post subject: Thanks Reply with quote

I already do have some plotscripting to put the main character in the lead position, but thanks for the suggestions. I was just wondering if anyone had already suggested the feature or if it was already implemented. Thanks again. My demo should be coming soon. Cool
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
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