create event

  1. Necromedes

    Instance Activation Advice (Parent Child?)

    I'm trying to set up a text system for my game which allows the player to be within range of an instance, click on them and then the text box pops up. I have that working but I need some advice/info on the parent/child subject. I understand that a child object inherits all data from the parent...
  2. S

    Legacy GM Global Variable Not Set Before Reading It

    I have a controller object (obj_controller), in which I initialize my global variables. In the Create event of the controller object, I have this line to initialize the global variable of global.player_color: global.player_color = "purple"; I also have a player object (obj_player) that has...
  3. R

    Legacy GM Can't set direction on create

    Hello! I have an object, wich have a parent. At the create event i used the event_inerited() method, and inser the extra code. At the game, an object create instances of the previous object, and i try to set the direction - unseccesfulli. What I done: parent object: Create Event: ...xy code...
  4. fawf

    Windows Broken objects / create_event activated multiple times

    This is an strange issue I couldn't find mentioned anywhere and thought I should bring it up in case anyone else encounters it. Somehow one of the objects I was working on became faulty. When creating an instance of this particular object, the create event would run for ALL instances of that...
  5. K

    GML Creating New Variables Outside the Create Event?

    Hey everyone, I think I know the answer to this, and I think that answer is no :p but is there a way to create a new variable within an object outside of its create event? I'm trying to make my code as easy as possible, and basically what I'm doing is creating an object (called oTile) which in...
  6. G

    Create event messing up my spawning objects? [SOLVED]

    So I'm having an issue and maybe somebody here can help out... I have a platform with a parent to object solid which all my collision code is on. The obj solid has chance to spawn chest on create above it. I have auto-tile draw code setup on the actual platform to draw edges when another solid...
  7. U

    Error in function exp()

    Hello everyone. I am running a script called sigma within the object obj Create Event. This script is as simple as this: return 1/(1+exp(-argument0)) which is returning the output of the logistic function. I don't see anything wrong with the code. However, sometimes I'd say like 1/5 of the...
  8. K

    Legacy GM Generate Instance at Specific Tile Script

    So I have been making my game when I realise how tiresome it is to place my "wall" objects, then I thought, is it possible to create a script to run when the room is generated that it will check the index of the tileset (like the walls are [0,0] and floors are [0,1]) and have it create obj_wall...
  9. S

    Steps before Create?

    My step events seem to run before my create events. Because what happens is I get an error on my enemies creation. The error says that state is not defined. All the code on my create event: var state = asset_get_index(scr_guard1static) //Variables guardhp = 100; guardSpeed = 3.8; aggroRange...
  10. A Random Creator

    Legacy GM Execution Error - Variable Index [0,7] out of range [1,7] [Solved]

    Hello everyone! I'm having trouble with my achievement system that I can't seem to fix. I've tried a lot of different things but nothing seems to work. so I'm just going to show you my code and hopefully you can help. If your not sure what some of the code means, ask me and I will explain it :)...
Top