Like the title says, is there a way to access (i.e. run) an instance's room editor creation code? If I want to reset an object, I can do event_perform(ev_create, 0), but this does not take into account any code written in the room editor.
Thanks!
It seems a little strange, but let's say I don't want to initialize a variable in the create event and just use the Draw event, is there any way to make that variable change without being started?
I managed to do something like this:
if !variable_instance_exists(object_index, "variable") var...
got the error while executing my code for my card game
code error:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object obj_deck:
Push :: Execution...
I know how creation/execution order works in GMS, at least I think so ;)
I’m looking for how to create my own solutions to sorting - the problem is with creation code of instances placed in the room and dependent on each other variables - for example obj_tree need to setup in its create event...
Okay nevermind. I have just relies your own gml Scripting interface can still add onto your own gml Step Event coding part.
As if you by accidentally have done your own Step Event coding part without your own gml Scripting interface coding part, you could of have done the way too much...
So very simple issue thats more of a coding pet peve than anything. Basically the parent of an object has creation code that is semi long and nothing needs to be changed except for a few variables. So when the child has a create event with "event inherited" even when the code after sets the...
Hi Everyone!
I was planning out some objects in a project --and planning some parental hierarchies--and stumbled across a query I have never got to the bottom of: When it comes to parents, children, and inhereted code/events, do parents or children 'overwrite' certain blocks of code or events...
Hi Everyone, I recently updated to v 2.2.2.413 (Desktop edition) from version 2.1.5.322 (Ultimate Edition) and I am getting this error whenever I compile my project:
_________________________________________...
i want a script to make all vars of a single object return to what they were in the create event, but with some exceptions like HP, if there is a way to do that without making all variables go to their original state one by one pls tell me
Sooooo I have a weird bug in Game Maker 8.1 where my create event gets initiated twice (I checked, there was only one instance of said object in the room) Anyone would have any idea as to how or why would it occur? I can give additional details about this problem if needed!
(TL;DR version - I'm having trouble with the codes shown in the image. The game acts like the "view_w_half" and "view_h_half" variables don't exist on the step event page, and only uses the data they stand for if I put the data itself into that place)...
I'm working on a drawing program.
If I create a surface in create event then I get an error about "surface not found" when I resize the window. If I create the surface in draw event, when I resize the window the surface is automatically aligned to that size and I am not getting an error, but the...
Greetings,
In specific circumstances, I've been using alarms as alternative create events.
The circumstances being that I require object A to create object B and object B must do some calculations in the create event with variables specified by object A. However, the create event for object B...
I have an object that works like this:
Object Name: obj_Floor
Create:
color = 0;
Collision With obj_SomethingElse:
color = 0;
Collision With obj_Player:
if (!global.some_global_var && color == 0) {
/* do some stuff */'
}
My room is just a bunch of these obj_Floor objects arranged in a...
When I put something like this into the Create event of an object:
{
var j;
var toughnesshp = 5.00;
var toughnessiteration = 0.00;
for (j = 0; j < playerToughness; j ++) {
toughnessiteration = toughnessiteration + toughnesshp;
if playerToughness >= 20 {
if...
hey,
I have noticed that in one of my object the data is constantly being reset after some bug testing(very long and painful) and even re-writing my whole code again, I found out that the create event is run multiple times. I have no idea how this can be. I tested the other objects in my game...
As the title suggests, I am using a script to create an instance in my game world, and that instance places a few more instances during its 'create' event.
I am now puzzled by the order of execution, and here's why.
After the initial script creates the instance (obj_Pattern), it continues by...
As the title said, How to pass arguments when create instance.
I realize that by changing the argument after object-creating, and trigger the intial method in first step.
But I want to realize this much more gracefully.... Is there any way to gotcha?
Thanks a lot!
I don't think the room_restart function will trigger a room start event. How can I get this event to trigger properly? I have a persistent object that has a Room Start event.
So seems like I'm getting an odd error:
FATAL ERROR in
Action number 1
Of Create event
For object Obj_Repoth1:
Push :: Execution Error - Variable Get(100000, -214783648) at gml_Obj_Repoth1_CreateEvent_1 (line 1) - Weapon = Hands
Please tell me what's wrong