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

Why don't you change?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
TwinHamster
♫ Furious souls, burn eternally! ♫




Joined: 07 Mar 2004
Posts: 1352

PostPosted: Tue Mar 22, 2005 12:39 pm    Post subject: Why don't you change? Reply with quote

In my up coming game...
I'll release the name with the game.

But, I'm using a equipment-combination-script thingy.

Basically, you equip weapons, and your hero and walkabout pictures change.

I've got this working for every combination but one.

Code:
#Dish with Fork
if (
check tag (20)==on
)
then(
set hero picture (me,49, outside battle)

set hero picture (me, 0, inside battle)
set hero palette (me,0, inside battle)
)


For some reason, instead of changing the hero picture to "0", it changes to "2" or "3" (they look about the same.)

And, I don't think this part of the script interferes with any other part of the script.

Help please.
Back to top
View user's profile Send private message Send e-mail AIM Address
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Tue Mar 22, 2005 12:52 pm    Post subject: Re: Why don't you change? Reply with quote

we will need to see the whole script to be able to help, but I can start by saying that you almost certainly never want to use "me" as the first argument to "set hero picture"

Me is always zero, which is appropriate for commands like "walk hero" that apply to the leader fo rthe walkabout caterpillar party, but "set hero picture" expects the hero's position in the battle party, not its position in the walkabout party (it does not matter if you are changing the inside-of-battle picture or the outside of battle picture, still use battle party positions)

If the hero has been moved to a different slot "me" will do the wrong thing. You probably want to use "find hero"

Anyway, let's see more of the script.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TwinHamster
♫ Furious souls, burn eternally! ♫




Joined: 07 Mar 2004
Posts: 1352

PostPosted: Tue Mar 22, 2005 1:54 pm    Post subject: Reply with quote

Well, the game only has one hero, so I just use "me".


And, here's the rest of the script:

Code:

script, equipment sprites, begin


#Dish with Fork
if (
check tag (20)==on
)
then(
set hero picture (me,49, outside battle)

set hero picture (me, 0, inside battle)
set hero palette (me,0, inside battle)
)


#Dish but has a fork
if(
check tag (28)==on
and
check tag (8)==on
)
then(
set hero picture (me, 3, inside battle)
set hero palette (me, 0, inside battle)
set hero picture (me, 49, outside battle)
)

#Only dish
if (
check tag (8)==on
and
check tag (16)==on
)
then(
set hero picture (me, 53, outside battle)
set hero picture (me, 2, inside battle)
set hero palette (me, 0, inside battle)
set hero palette (me, 0, outside battle)
)

#Only sword
if(
check tag (8)==off
and
check tag (15)==on
)
then(
set hero picture (me, 0, outside battle)
set herop icture (me, 5, inside battle)
set hero palette (me, 0, inside battle)
)

#Fist only
if(
check tag (16)==on
and
check tag (15)==off
and
check tag (8)==off
)
then(
set herop icture (me, 0, outside battle)
set hero picture (me, 1, inside battle)
set hero palette (me, 19, inside battle)
)

#Only Fist is equipped, but has sword
if(
check tag (16)==on
and
check tag (28)==on
and
check tag (8)==off
)
then(
set hero picture (me, 0, outside battle)
set hero picture (me, 4, inside battle)
set hero palette (me, 19, inside battle)
)

end
Back to top
View user's profile Send private message Send e-mail AIM Address
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Wed Mar 23, 2005 4:25 pm    Post subject: Reply with quote

TwinHamster wrote:
Well, the game only has one hero, so I just use "me".


but you cannot assume that that one hero will alwaus be in the very first hero slot. The player could move them to another slot. You could do something like this:

Code:

variable(hero)
hero := find hero(hero by rank(me))


and then use "hero" in place of "me" for the rest of the script.

Anyway, other than that, the script looks simple and correct. Maybe the problem lies in the way you are triggering the script. How is this script being run?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TwinHamster
♫ Furious souls, burn eternally! ♫




Joined: 07 Mar 2004
Posts: 1352

PostPosted: Thu Mar 24, 2005 5:16 pm    Post subject: Reply with quote

Thanks for the variable tip, but I don't really move the hero around...

And as far as my way of activating the script, it is an "each step script".

I've also tried to replace the picture which it is suppose to change the hero to.
-I've tried to change the palette to see if there is any change, and this has only resulted in the changing of the "outside battle" picture.
-It's like the first "set hero picture (inside battle)" command is completely ignored.
Back to top
View user's profile Send private message Send e-mail AIM Address
Ysoft_Entertainment
VB Programmer




Joined: 23 Sep 2003
Posts: 810
Location: Wherever There is a good game.

PostPosted: Thu Mar 24, 2005 7:50 pm    Post subject: Reply with quote

looks to me like your tag doesn't work. go into your item, and check if it gets set. to me it looks like dish gets tag 28 not 20 try replacing that and see if it works.

try something like this
I assumed that tag 28 is for dish, otherwise the script should work.

Code:

if(check tag(28)==on
and
checktag(8)==off
)
then
.....

_________________
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
View user's profile Send private message Send e-mail Visit poster's website
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Thu Mar 24, 2005 11:52 pm    Post subject: F4 Reply with quote

If you have debugging keys enabled, you can press F4 to check your tags and make sure they are really getting turned on my your equipment.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TwinHamster
♫ Furious souls, burn eternally! ♫




Joined: 07 Mar 2004
Posts: 1352

PostPosted: Sun Mar 27, 2005 3:00 pm    Post subject: Reply with quote

Actually, tag 20 is turned on when both the fork and dish are equipped, and that is on when both are equipped.

Tag 28 is the tag for the fork, and the dish actually has tag 8.

As I've said before, the problem isn't the activation of that part of the script, but the fact that the "inside battle picture" just won't change to 0.

It's like that one command is completely ignored...
Back to top
View user's profile Send private message Send e-mail AIM Address
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Sun Mar 27, 2005 6:45 pm    Post subject: Reply with quote

Maybe you should add a debugging text box into the script, that says something like "You have equipped the fork and spoon! Now changing the picture...". Then, in game, equip the fork and spoon, and try it out.

If the textbox shows up, but the picture doesn't change, maybe you have the picture index wrong. A way to test that would be to equip another combo that DOES work, and then switch back.
_________________
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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
TwinHamster
♫ Furious souls, burn eternally! ♫




Joined: 07 Mar 2004
Posts: 1352

PostPosted: Mon Mar 28, 2005 4:39 am    Post subject: Reply with quote

pkmnfrk wrote:
Maybe you should add a debugging text box into the script, that says something like "You have equipped the fork and spoon! Now changing the picture...". Then, in game, equip the fork and spoon, and try it out.

If the textbox shows up, but the picture doesn't change, maybe you have the picture index wrong. A way to test that would be to equip another combo that DOES work, and then switch back.


1) With the text box thing, I have tried something similar. Basically, my version consisted of an npc popping up right in front of you if the script worked. But, the npc worked, picture didn't.

2)I've tried every possible combo, they all work except this one picture, then I tried a copy of the hero set as a new set, this didn't work either...

Maybe I used the wrong command or something?
Back to top
View user's profile Send private message Send e-mail AIM Address
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Mon Mar 28, 2005 8:49 am    Post subject: Reply with quote

The problem is most likely that you're using "me." Check the PSdict and make sure you shouldn't be using something like findhero instead.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
TwinHamster
♫ Furious souls, burn eternally! ♫




Joined: 07 Mar 2004
Posts: 1352

PostPosted: Wed Mar 30, 2005 6:13 pm    Post subject: Reply with quote

Me isn't the problem, it was actually the fact that "tag (20)" and "tags (8) and (28) " were the same, and in the script I had a:

Code:

if(
check tag (8)==on
and
checktag (28)==on
then(
etc...


Since I wanted tag (20) on, it also had to have tags 8 and 28 on, so it triggered that part of the script instead of the first part.

But it's fixed now, thanks to everyone for the help.
Back to top
View user's profile Send private message Send e-mail AIM Address
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