 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
Onlyoneinall Bug finder
Joined: 16 Jul 2005 Posts: 746
|
Posted: Wed Apr 12, 2006 12:20 pm Post subject: Costume change for every character |
|
|
I'm planning on having a little quirk in the game, where equipping any sort of sunglasses on any character causes their battle graphics to change to them wearing sunglasses. However, the sunglasses would be equipable by everyone, so I think that would result in any character looking like one picture if any of them equips the sunglasses...
In other words, how would I get the sunglasses to alter each character's appearance individually? _________________ http://www.castleparadox.com/gamelist-display.php?game=750 Bloodlust Demo 1.00
 |
|
Back to top |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Wed Apr 12, 2006 2:59 pm Post subject: |
|
|
Ok, here's how I'd do it.
In an instead-of-battle script, put the standard boiler plate:
Code: | script, instead of battle, formation, begin
fight formation (formation)
end |
Now, put something like this:
Code: | script, instead of battle, formation, begin
if(check equipment(find hero(hero:guy),slot:head) == item:sunglass) then, begin
set hero picture(find hero(hero:guy), _____, inside battle)
end, else, begin
set hero picture(find hero(hero:guy), _____, inside battle)
end
fight formation (formation)
end |
Replace the "item:sunglass" with the actual constant (or number if you're not using your HSI for some reason), the first _____ with the number of the sunglasses'd picture for hero, and the second _____ with the regular picture. Oh, and "hero:guy" with the real hero (or number).
Then, copy that if-block for each hero who might possibly have access to the sunglasses.
If you already have instead-of-battle scripts, then add a call to this script in the existing one (but, get rid of one of the "fight formation()"s, or the hero will have to fight the enemy party twice!
Unfortunately, this won't change the picture used on the save screen (I don't think... maybe it will...) _________________ I stand corrected. No rivers ran blood today. At least, none that were caused by us.
Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Wed Apr 12, 2006 5:45 pm Post subject: |
|
|
Mike Caron wrote: | Unfortunately, this won't change the picture used on the save screen (I don't think... maybe it will...) |
It will if this script is run (a battle is fought) before the player saves. Another place to put this check would be after the menu (using an onkeypress script checking for alt and escape). The only problem is, you have to remember to put the check on all maps where the player might have sunglasses. Sometimes this might interfer with other scripts, and be a pain. Actually... what about an after-menu script trigger? However, this still isn't going to solve the problem of people changing equipment and saving, all from the same menu. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
|
Back to top |
|
 |
Onlyoneinall Bug finder
Joined: 16 Jul 2005 Posts: 746
|
Posted: Thu Apr 13, 2006 12:53 pm Post subject: |
|
|
Thanks guys. I'm going to go put in the script right now.
EDIT: Umm, I'm not sure what I'm doing wrong, but hspeak doesn't seem to want to implement the script, and the little warning message it has when it tries to compile flashes too fast (because the box automatically closes after the warning).
My item is Shades, there are six heroes: Kevin, Daniel, Tyler, Laura, Alice, and Katie.
This is what I did for Kevin but the script won't compile. What do I do?
script, instead of battle, formation, begin
if(check equipment(find hero(hero:Kevin),slot:accessory) == item:shades) then, begin
set hero picture(find hero(hero:Kevin), 7, inside battle)
end, else, begin
set hero picture(find hero(hero:Kevin), 1, inside battle)
end
fight formation (formation)
end _________________ http://www.castleparadox.com/gamelist-display.php?game=750 Bloodlust Demo 1.00
 |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Thu Apr 13, 2006 10:46 pm Post subject: |
|
|
Onlyoneinall wrote: |
EDIT: Umm, I'm not sure what I'm doing wrong, but hspeak doesn't seem to want to implement the script, and the little warning message it has when it tries to compile flashes too fast (because the box automatically closes after the warning).
|
try the latest nightly of Hspeak from http://hamsterrepublic.com/ohrrpgce/archive/hspeak-win-nightly.zip
It waits for a keypress before closing now. |
|
Back to top |
|
 |
Ysoft_Entertainment VB Programmer

Joined: 23 Sep 2003 Posts: 810 Location: Wherever There is a good game.
|
Posted: Fri Apr 14, 2006 8:19 am Post subject: |
|
|
Did you export names from your rpg file?
and did you include it in the main script
You should have something like this on the top of your script.
Code: |
include, plotscr.hsd
include, yourgamename.hsi
|
If not then there is no way a compiler would know who the kevin dude is. _________________ Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals. |
|
Back to top |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Fri Apr 14, 2006 8:38 am Post subject: |
|
|
And, make sure you have this line in there somewhere, preferably above the script:
Code: | declare script(XYZ,instead of battle, 1, 0) |
Replace XYZ with a free script number (not autonumber!)
(When I post scripts, I usually don't see the need to post the declare, since it should be obvious to the plotscripter that one is needed...) _________________ I stand corrected. No rivers ran blood today. At least, none that were caused by us.
Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ |
|
Back to top |
|
 |
Onlyoneinall Bug finder
Joined: 16 Jul 2005 Posts: 746
|
|
Back to top |
|
 |
Ysoft_Entertainment VB Programmer

Joined: 23 Sep 2003 Posts: 810 Location: Wherever There is a good game.
|
Posted: Fri Apr 14, 2006 1:26 pm Post subject: |
|
|
Looks like my hunch was wrong, oh well, I tried.
Glad to know you aint that much of NuB _________________ Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals. |
|
Back to top |
|
 |
|
|
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
|