| View previous topic :: View next topic |
| Author |
Message |
Uncommon His legend will never die

Joined: 10 Mar 2003 Posts: 2503
|
Posted: Wed May 16, 2007 11:19 pm Post subject: |
|
|
Every single post in this thread has said this. You need to change the lines where it says
| Code: | set hero picture (hero: minako chan,19,inside battle)
set hero palette (hero: minako chan,1,inside battle) |
to
| Code: | set hero picture (banana,19,inside battle)
set hero palette (banana,1,inside battle) |
And remember to do the same for every hero!
Moogle1's "banana variable" example was just to show you that no matter what the variable's name is, the problem is the same. Be it "banana", "hero", or "salty snickers", that variable needs to be in the set commands instead of "hero: whatever her name is" or you'll keep getting that error.
The thing is, you're putting the information into the variable with the "find hero" command, but you're not putting the variable where you need it and it isn't getting used. The error's popping up to warn you of this.
Using the script exactly as James posted it should fix this. |
|
| Back to top |
|
 |
Camdog
Joined: 08 Aug 2003 Posts: 606
|
Posted: Thu May 17, 2007 5:44 am Post subject: |
|
|
| The use of variables is a very important aspect of plotscripting, and you should take the time to understand exactly how they work. Here is a good explanation of how they are used in HamsterSpeak. Read through it carefully, and feel free to post any questions about it. |
|
| Back to top |
|
 |
bis_senchi

Joined: 08 Jun 2004 Posts: 460 Location: Reims, France
|
Posted: Fri May 18, 2007 4:11 am Post subject: Problem solved! |
|
|
Here it is! My problem is solved! Makoto chan gets her battle grafics back like every other senshi.
Camdog wrote:
| Quote: |
you should take the time to understand exactly how they work. Here is a good explanation of how they are used in HamsterSpeak |
The article seems very interesting. I will post message here if I have some questions about it.
Once more thanks to everybody for the help! _________________ It's time to make games! |
|
| Back to top |
|
 |
bis_senchi

Joined: 08 Jun 2004 Posts: 460 Location: Reims, France
|
Posted: Mon May 28, 2007 8:48 pm Post subject: I've read the article and... |
|
|
I've noticed that you could add constants by using a variable and +
In what situation could we need to make increase the values defined in constant?
Thanks for the help! _________________ It's time to make games! |
|
| Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Tue May 29, 2007 8:48 am Post subject: Re: I've read the article and... |
|
|
| bis_senchi wrote: | I've noticed that you could add constants by using a variable and +
In what situation could we need to make increase the values defined in constant? |
No, you cannot change a constant. Sometimes you see code like:
| Code: | | show value(some constant + 1) |
The + is not changing the value of the constant, it is just adding the constant and the number (or variable) together, and retuning the result.
Think of it this way. If you write:
you get "8", but that does not mean you changed the meaning of "7" |
|
| Back to top |
|
 |
bis_senchi

Joined: 08 Jun 2004 Posts: 460 Location: Reims, France
|
Posted: Tue May 29, 2007 8:32 pm Post subject: I understand better now |
|
|
Ok! I understand better now. Could somoene tell me in what kind of situation we need to add and constant and the number (or variable) ?
| Code: |
show value(some constant + 1)
|
I guess it depends on the constant that you may need to manipulate...
Once more, thanks in advance for your help and for answering so quickly. _________________ It's time to make games! |
|
| Back to top |
|
 |
msw188
Joined: 02 Jul 2003 Posts: 1041
|
Posted: Wed May 30, 2007 7:33 am Post subject: |
|
|
There are actually more instances where this is helpful than you might at first think. The first one that came to mind for me was editing the wallmap. When you set a tile's passability using plotscripting, there is a constant defined for each side of the tile (northwall, southwall, eastwall and westwall are all constants). If you want a tile to be unpassable to the north and the south (a single tile hallway running east to west, for example) you can add the constants together:
write pass block (x,y,northwall+southwall)
It is true that you could accomplish the exact same thing with:
write pass block (x,y,5)
but this is harder to understand when it comes time to debug a bad script. _________________ My first completed OHR game, Tales of the New World:
http://castleparadox.com/gamelist-display.php?game=161
This website link is for my funk/rock band, Euphonic Brew:
www.euphonicbrew.com |
|
| Back to top |
|
 |
|