Scripting equivalent of "Call comon event"

Started by Karltheking4, September 09, 2010, 06:00:36 am

Previous topic - Next topic

Karltheking4

Can someone just quickly tell me the scripting equivalent of "Call common event" Please?
It's something along the line of "$game_common_event(#)"
But I can not for the life of me figure it out!
Thanks! :haha:

Blizzard

It's a little bit more complicated than that. Search the forum, it's been posted a few times already.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Karltheking4

I did, and my brain died.
But I'll search again and see if I can get a straight answer out of that damn search box!

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Karltheking4

I'm placing it in Scene_Gameover

I've gone in and deleted $scene = Scene_Title.new , which takes the player back to the title screen (though I guess you know that...)
And have just shoved that little bit in there, I get the error on line 56 when dying.

Though I'm confused about this
QuoteC_ID is the event of the common event you are calling.


You mean, replace C_ID with the number of the common event in the database???
I don't get it. o_O

Blizzard

Yes. Each common event has an ID. They start with 1, going up to 999 (or 9999, I can't remember). Just put the ID number of the common event (without the leading zeros!) where C_ID is and it will run that common event.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Karltheking4

It still doesn't work. :'(
I don't get any errors, just nothing happens o_O

    @interpreter = Interpreter.new(0, false)
    @interpreter.setup($data_common_events[25].list, 25)
    @interpreter.setup_starting_event


between
    # Execute transition
    Graphics.transition(120)
and
    # Main loop
    loop do


and

      @interpreter.update
      # Switch to map screen
      $scene = Scene_Map.new
      $game_player.moveto($data_system.start_x, $data_system.start_y)

between
    if Input.trigger?(Input::C)

and
    end
  end
end


Any ideas?

Also, the common event has no trigger, nor any swith needed to be activated, is that right?

Blizzard

Yes.

The interpreter part needs to be called only once as well as the update of the interpreter.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.