Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: Karltheking4 on September 09, 2010, 06:00:36 am

Title: Scripting equivalent of "Call comon event"
Post by: Karltheking4 on September 09, 2010, 06:00:36 am
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:
Title: Re: Scripting equivalent of "Call comon event"
Post by: Blizzard on September 09, 2010, 06:10:50 am
It's a little bit more complicated than that. Search the forum, it's been posted a few times already.
Title: Re: Scripting equivalent of "Call comon event"
Post by: Karltheking4 on September 09, 2010, 06:40:44 am
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!
Title: Re: Scripting equivalent of "Call comon event"
Post by: Blizzard on September 09, 2010, 07:08:24 am
When searching for "common event script call", second page:

http://forum.chaos-project.com/index.php/topic,1982.0.html
Title: Re: Scripting equivalent of "Call comon event"
Post by: Karltheking4 on September 11, 2010, 07:03:33 am
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
Title: Re: Scripting equivalent of "Call comon event"
Post by: Blizzard on September 11, 2010, 07:45:43 am
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.
Title: Re: Scripting equivalent of "Call comon event"
Post by: Karltheking4 on September 11, 2010, 08:29:33 pm
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?
Title: Re: Scripting equivalent of "Call comon event"
Post by: Blizzard on September 12, 2010, 04:02:53 am
Yes.

The interpreter part needs to be called only once as well as the update of the interpreter.