• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Discussion Do I need create event?

YoKoNo

Member
I've seen a lot of tutorials with the create event for Objects. But in some circumstances do I not need the create event. Are instances of objects in a room already created and therefore can just follow a step event.

Paul
 

FrostyCat

Redemption Seeker
You are free go without a Create event if there's nothing to set up for new instances of that object (aside from the initial x-y coordinate and the layer/depth), but you need to be absolutely certain that there is really nothing needing to be set up.
 
Memory will be allocated for any undeclared variables being assigned in any of the object events. Though you're best allocating the memory first in ether a create, room start or game start event because memory allocation takes time and if you're allocating a large amount of memory say for an array it will cause a slow down. Also if you intend to do arithmetic against the variable such as bullet += 1 you will need to have first declared the variable.
 
D

Dan B

Guest
A 'Create Event' could be redundant. As long as each 'variable' or 'static' you set is defined BEFORE you use it, those can be declared in any event.

*Note* A 'Create Event' is always good for an organizational approach, though not a necessity in some cases. Also, this is a an interestingly 'broad' approach if your understanding is lacking as mine once was. Feel it out~
 
Top