Script Calls

Started by fjurio, November 24, 2010, 12:50:30 pm

Previous topic - Next topic

fjurio

December 08, 2010, 01:56:20 pm #20 Last Edit: December 08, 2010, 02:04:04 pm by fjurio
Quote from: ForeverZer0 on December 08, 2010, 12:07:08 pm
The @event variable is in the interpreter where the script call is evaluated, so it will not throw a NoMethod error. This way will only work for the event that the script call is in.


That´s exactly what i want. Thanks.  :)

Edit: But it doesn´t work. Maybe i missunderstood you. This way only works for the event that is using this script call. Right?

ForeverZer0

I may be wrong about @event. Look in the Interpreter (part 1), and look for an instance variable in the intialize or setup method that defines either "@event" or "@event_id". I can't remember off the top of my head which one it is. If it is "@event_id", use this script call to reference the event:

$game_map.events[@event_id]


or if is "@event", try:

$game_map.events[@event.id]


I can't see why that wouldn't work, unless it is something to do with BABS that I'm unaware of.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

fjurio

The first one works. It works as well with the BABS.
Thanks.  :)

fjurio

Oh dear, i need another call script or something similar.

How can i disable the arrow buttons?

stripe103

In the blizz-abs settings there are an option called like "Disable RMXP Controls" or "Disable default controls. Set that to true.

fjurio

Sorry, by arrow buttons i mean the direction buttons. I wish to make it impossible to move for the player like the command in the combo settings "freeze input" it do.