[XP] Tiny noob question [solved]

Started by Moosefish, August 26, 2011, 12:13:31 pm

Previous topic - Next topic

Moosefish

August 26, 2011, 12:13:31 pm Last Edit: August 27, 2011, 02:03:00 pm by Moosefish
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!
Join the Zombie Survival Society, a forum for true Survivors
www.zombiesurvivalsociety.com

G_G

Are you trying to run the common event in the menu? Or do you plan on going to the map and letting it run?

Moosefish

August 26, 2011, 12:20:11 pm #2 Last Edit: August 26, 2011, 12:26:04 pm by Moosefish
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)
Join the Zombie Survival Society, a forum for true Survivors
www.zombiesurvivalsociety.com

LivingstoneIPresume

Might be easier to just call Scene_Shop.new

Twb6543

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.
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

Moosefish

thats perfect thanks mate!
i clicked the level ++ thing, i assume thats the right thing to do lol
Join the Zombie Survival Society, a forum for true Survivors
www.zombiesurvivalsociety.com

Apidcloud

August 28, 2011, 06:51:14 am #6 Last Edit: August 28, 2011, 06:53:43 am by Apidcloud
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:
Instead of wanting to be somebody else, rather become somebody else



"I will treasure the knowledge like a squirrel treasures acorns."


Gibbo Glast 2D Engine - The sky is no longer a limit

G_G

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.