Moogleking
Member
Hi, I'm using SephirothSpawn's Event Spawner script (version 2) from his testbed v3 (i've tried it in v4, and it's also the same exact behavior), and I have a couple questions, which are probably syntax related.
So, I got the sample code to run, as long as I don't use any parameters.
correctly creates an event using that method based on the default parameters of: x=0,y=0,save=true.
Now, when I try to send some coordinates to the method, for example:
Then I get an error: SyntaxError occurred while running script.
This call is inside a normal action button event on a single map in a clean project with just the SDK and Event Spawner scripts added.
For reference, here is the method header that I am trying to call:
Now, just to make it more interesting. If I copy the code that is in that function into my action button event's script call, as follows:
Then the event is indeed created at that location (3,3), but the graphic doesn't show up!
I am at a loss as to what is wrong here.
Am I calling the method wrong? Why doesn't it show the graphic when I just copy the code into my event?
Any advice is appreciated. Thank you for your time.
So, I got the sample code to run, as long as I don't use any parameters.
Code:
Event_Spawner::Presets.sample_event_a
Now, when I try to send some coordinates to the method, for example:
Code:
Event_Spawner::Presets.sample_event_a(3,3,true)
This call is inside a normal action button event on a single map in a clean project with just the SDK and Event Spawner scripts added.
For reference, here is the method header that I am trying to call:
Code:
def self.sample_event_a(x = 0, y = 0, save = true)
Now, just to make it more interesting. If I copy the code that is in that function into my action button event's script call, as follows:
Code:
Event_Spawner.create_event(3, 3,
'Sample Event A')
Event_Spawner.set_page_graphic
({'c_name' => '002-Fighter02'})
Event_Spawner.add_event_command(101,
['I am a spawned event'])
Event_Spawner.end_event(true)
I am at a loss as to what is wrong here.
Am I calling the method wrong? Why doesn't it show the graphic when I just copy the code into my event?
Any advice is appreciated. Thank you for your time.