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

Head Hurts

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




Joined: 05 Oct 2009
Posts: 243

PostPosted: Thu Dec 23, 2010 5:11 pm    Post subject: Head Hurts Reply with quote

I haven't been using OHR for so long it seems i've forgotten how to do anything...

Can somebody give me a simple script for the following?

Outline:
1. If character is wearing leather armor, change sprites to leather armor
2. If a character is wearing steel armor, change sprites to steel armor
3. if a character is wearing cloth armor, change sprites to cloth armor
4. if the character removes armor, reset sprite (or change sprite to naked)

*Armors are generic and all of them can wear the same armors, only each character has different battle animations as well as walk a by graphics... It looks so easy, I CAN'T MAKE IT WORK! Help...
_________________
So many ideas, so little focus. Monk spirit please lend me your power!

Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Dec 26, 2010 2:54 pm    Post subject: Reply with quote

Heh, welcome back.

First, wanted to remind you that the best place to call such a script is in a wrapper script with which you've replaced the Equip menu option in the main menu:

Code:
plotscript, show equip menu, begin
  equip menu (0)   # OR  equip menu (pick hero)
  update equip graphics
end


Then fill in the numbers, hero names, item names and so on in this script, and make as many copies of the outer and inner 'if' blocks as you need for all heroes and armors.

Code:
script, update equip graphics, begin
  variable (who)

  who := find hero (hero: bob)
  if (who <> -1) then (  # hero is in party

    if (check equipment (who, slot:armor) == -1) then (
      #nothing equipped
      reset hero picture (who, inside battle)
      reset hero palette (who, inside battle)
      reset hero picture (who, outside battle)
      reset hero palette (who, outside battle)
    )
    if (check equipment (who, slot:armor) == item:leather armor) then (
      set hero picture (who, 2, inside battle)
      set hero palette (who, 3, inside battle)
      set hero picture (who, 4, outside battle)
      set hero palette (who, 5, outside battle)
    )
    if (check equipment (who, slot:armor) == item:steel armor) then (
      #...
    )
    #....
  )

  who := find hero (hero: james)
  if (who <> -1) then (  # hero is in party
    #...
  )
end

_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
BlastedEarth




Joined: 05 Oct 2009
Posts: 243

PostPosted: Tue Dec 28, 2010 12:55 am    Post subject: Reply with quote

Thanks, I love you!
_________________
So many ideas, so little focus. Monk spirit please lend me your power!

Back to top
View user's profile Send private message
BlastedEarth




Joined: 05 Oct 2009
Posts: 243

PostPosted: Wed Jan 05, 2011 4:59 am    Post subject: Reply with quote

Hmm, just some issue: All the items can be equipped wherever in the character, like the gloves or the chestplate can be worn as a weapon and so on, when chestplates are supposed to be set to be only equipable as a body armor... What could be wrong?

edit:
nevermind, i installed the latest nightly and it 's all fixed
_________________
So many ideas, so little focus. Monk spirit please lend me your power!

Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Wed Jan 05, 2011 8:35 am    Post subject: Reply with quote

Really? There have been changes to heroes and to the equip menu, but I haven't seen that. When did it start happening?
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Blacklight_Studios
Expert of the third person...




Joined: 15 Dec 2010
Posts: 29

PostPosted: Thu Jan 06, 2011 10:25 am    Post subject: Reply with quote

BlastedEarth wrote:
Hmm, just some issue: All the items can be equipped wherever in the character, like the gloves or the chestplate can be worn as a weapon and so on, when chestplates are supposed to be set to be only equipable as a body armor... What could be wrong?


you can make all of those changes to equipability in the item's bitsets and such.

EDIT: Sorry, I didn't catch the edit on that post.
_________________
Current project progress:

Lost in the Dark(Primary Project): 1%

Kingdom Hearts Collaborative Project: 0.05%
--
Back to top
View user's profile Send private message
Guest







PostPosted: Sat Jan 08, 2011 5:36 am    Post subject: Reply with quote

The Mad Cacti wrote:
Really? There have been changes to heroes and to the equip menu, but I haven't seen that. When did it start happening?


I'm not sure, the last version of OHR that i was using was last year ago, one of the october nightlies i think, now I have the new version and everything is perfect.
Back to top
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