Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Moosefish on August 26, 2011, 12:13:31 pm

Title: [XP] Tiny noob question [solved]
Post by: Moosefish on August 26, 2011, 12:13:31 pm
Hey all,
I just need to know what the script call is for a common event. I've googled it and found "$game_temp.common_event_id = [18]"
but when I put it in the script I get the error "Script interpreter1' line 72: nomethod error occured. Undefined method '>' for [18] Array

I was just wondering if there was another script call, or if there is a way to fix this error.

I basically want an option in the menu to go to a common event, everything works except the common event call!

I would greatly apreciate any help!
Title: Re: [XP] Tiny noob question
Post by: G_G on August 26, 2011, 12:16:01 pm
Are you trying to run the common event in the menu? Or do you plan on going to the map and letting it run?
Title: Re: [XP] Tiny noob question
Post by: Moosefish on August 26, 2011, 12:20:11 pm
I was hoping to run it straight over the menu, so if you choose "Shop" it will open a shop menu (via a common event)
Title: Re: [XP] Tiny noob question
Post by: LivingstoneIPresume on August 26, 2011, 11:27:19 pm
Might be easier to just call Scene_Shop.new
Title: Re: [XP] Tiny noob question
Post by: Twb6543 on August 27, 2011, 05:06:48 am
You made it an array it should be just an integer like so:
"$game_temp.common_event_id = 18"

That should work - It does for me.
Title: Re: [XP] Tiny noob question
Post by: Moosefish on August 27, 2011, 02:01:58 pm
thats perfect thanks mate!
i clicked the level ++ thing, i assume thats the right thing to do lol
Title: Re: [XP] Tiny noob question
Post by: Apidcloud on August 28, 2011, 06:51:14 am
Quote from: LivingstoneIPresume on August 26, 2011, 11:27:19 pm
Might be easier to just call Scene_Shop.new


Also, he's just right >:3
If you want to call the Scene_Shop by a Common event, why not using 'if Input.trigger?(Input::C) ; $scene = Scene_Shop.new ; end' ?
The conditional branch, you can perfectly make it using events. The '$scene = Scene_Shop.new", you'd just replace it with that common event call


:haha:
Title: Re: [XP] Tiny noob question [solved]
Post by: G_G on August 28, 2011, 08:55:49 am
But then theres the confusing array of $game_temp.shop_goods you have to setup your self. Its not confusing once you figure it out but its a pain in the butt if you're setting it up in a script and you have a lot of items.