The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Rathalos888 on May 20, 2007, 04:25:21 PM

Title: [RESOLVED] Need help with something
Post by: Rathalos888 on May 20, 2007, 04:25:21 PM
Alright, so I'm using this difficulty script-

http://rmrk.net/index.php/topic,14202.msg180623.html#msg180623 (http://rmrk.net/index.php/topic,14202.msg180623.html#msg180623)

And I was wandering, how could I make it so that if you elec one of the harder difficultys, an event will occur
EX: (player starts on hardest difficulty)
Game starts -LEVEL+5-
Learned skill- Fira

Yeah... sorry if this is vague and whatnot.

Also, sorry if this is the wrong board for this =P. ???

Also, if you cannot find the script, scroll down, it's near the bottom.
Title: Re: Need help with something (involves script, but not neccessarly a script prob
Post by: Falcon on May 20, 2007, 04:30:24 PM
It's a script issue. Post this in scripts.

Use this in a contional branch:
game_system.difficulty == "Difficulty Name"

That should work.
Title: Re: Need help with something (involves script, but not neccessarly a script problem)
Post by: Rathalos888 on May 20, 2007, 05:18:06 PM
Sorry about putting this in te wrong place =P. Anywho, I get a name error that looks like this

????????? Name Error ????????????

undefined local variable or method 'game_system' for #<Interpreter:0x4670b38


O_O yeaahhhh... Also, this is what the event says

Conditional Branch: Script: game_system.difficulty == "Aeion Legend"
Change skills
Change lvl
blah
blah

Please help ^_^
Title: Re: Need help with something (involves script, but not neccessarly a script prob
Post by: Zeriab on May 20, 2007, 05:35:57 PM
*moves*

I haven't look at it or anything, but it looks like you are trying to use a global variable. Remember the $ in front of the variable name when dealing with global variables ^_^

$game_system.difficulty == "Aeion Legend"

Title: Re: Need help with something (involves script, but not neccessarly a script prob
Post by: Falcon on May 20, 2007, 05:51:59 PM
My bad, forgot to throw in the global variable sign :P

Zeriab's way should work.
Title: Re: Need help with something (involves script, but not neccessarly a script problem)
Post by: Rathalos888 on May 20, 2007, 08:15:50 PM
Eh, it still doesn't work, except now I don't get an error, it just sorta overlooks it, and delets the event, so to speak.

Example:
Starts on Aeion Legend
event
>Conditional branch: script: $game.difficulty == "Aeion Legend" (or something like that, whatever zeriab said, lol)
>Change level- Zan Vossmore +4
>Change skills Add Cure
>Else Handler
>
Title: Re: Need help with something (involves script, but not neccessarly a script prob
Post by: Zeriab on May 20, 2007, 10:12:36 PM
It's $game_system.difficulty not $game.difficulty

If it still doesn't work try putting this in a call script:
p $game_system.difficulty
You should get a message. Please take a screen shot of it and post here.
Title: Re: Need help with something (involves script, but not neccessarly a script problem)
Post by: Rathalos888 on May 21, 2007, 01:02:42 AM
O_O well this was an unespected result...

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg517.imageshack.us%2Fmy.php%3Fimage%3Dsauceyhn7.jpg&hash=444416bbb2425f88b3d897b5fd177e614e6fdabe)

also, sorry for being such an annoyance lately >_>.


Also, if you can't see the image, here.
http://img517.imageshack.us/my.php?image=sauceyhn7.jpg (http://img517.imageshack.us/my.php?image=sauceyhn7.jpg)
Title: Re: Need help with something (involves script, but not neccessarly a script prob
Post by: Zeriab on May 21, 2007, 08:27:42 AM
So it was a number...

Am I correct in say that you have 6 difficulty levels?

Either way. The solution is to use the number instead:
$game_system.difficulty == 6
Title: Re: Need help with something (involves script, but not neccessarly a script problem)
Post by: Rathalos888 on May 21, 2007, 11:38:24 AM
w00t! It worked! Thanks for all the help Zeriab^_^.