 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
RedMaverickZero Three pointed, red disaster! Halloween 2006 Creativity Winner


Joined: 12 Jul 2003 Posts: 1459
|
Posted: Sun Sep 23, 2007 9:31 am Post subject: After battle effects |
|
|
In my project, the player can wear a certain thing and it'll boost his expeirience at the end of every battle. Okay, easy enough? Well I thought so til I found out it wasn't working the right way!
if(checkequipment(findhero(hero:Mark),5==79))
then (give experience(hero:Mark,random(5,10)))
if (herolevelled(find hero(hero:Mark)))
then(
show text box (640)
wait for text box
)
I wanted the script to check the players equipment after every battle, and if they were wearing a certain thing, in this case, item 79, then it would give them experience. Then, I decided, what if the player doesn't know their character leveled up??? So I set it up so on a level up it would show a text box.
What's my problem? Well, this takes place after EVERY battle for all characters when they don't have the item equipped.
If someone could help me fix this real quickly, that would be awesome! I don't have a clue why it's not working right, I have other items in the game that work perfectally, but those go after each level up, not after every battle.
HELP? _________________ ---------------Projects----
Mr.Triangle's Maze: 70%
Takoyaki Surprise: 70% |
|
Back to top |
|
 |
msw188
Joined: 02 Jul 2003 Posts: 1041
|
Posted: Sun Sep 23, 2007 10:14 am Post subject: |
|
|
Simple parenthesis misplacement. The line
if(checkequipment(findhero(hero:Mark),5==79))
should be
if(checkequipment(findhero(hero:Mark),5)==79)
Do you see the difference? Right now you are essentially asking game if 5 equals 79, and then passing the answer as the second argument to check equipment. _________________ 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 |
|
 |
RedMaverickZero Three pointed, red disaster! Halloween 2006 Creativity Winner


Joined: 12 Jul 2003 Posts: 1459
|
Posted: Sun Sep 23, 2007 10:26 am Post subject: |
|
|
Dude, thanks soooo much. I had been staring at those lines for like 30 minutes or more... And I copied it based off my other stat boosters and I was rackin my brain trying to find out what was different between the two. *phew*
Thanks a ton. _________________ ---------------Projects----
Mr.Triangle's Maze: 70%
Takoyaki Surprise: 70% |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sun Sep 23, 2007 10:47 am Post subject: |
|
|
msw188 wrote: | Right now you are essentially asking game if 5 equals 79 |
Maybe I'm just way too tired today, but that mental image is cracking me up.
"Hey... 5 is the same as 79, right?" _________________
|
|
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
|