G
GDP234
Guest
For my game, I have a controller object. In that controller objects create event I have defined some DS grids and assigned values to those grids. I also am planning to have multiple enemies and to anticipate this I have made an enemy parent object. In the enemy parent objects create event I want to define the enemies health and other variables based on the information defined in the ds grid from the controller object. For example, I have a ds grid which contains the enemies in the game and all their stats (health, damage, armour, etc.) I want to take the value stored in the ds grid for the enemy's health and assign it to the enemyHealth variable in the enemy parent object.
However, it appears like the parent objects create event is running before the controller objects create event because I get an error saying that the ds grid is not set before reading it. (These variables are all global and I have tried with multiple variables from the create event.) So I think I need to make sure the controller object runs its create event first but I am not sure if there is a way to do so?
P.s. This is my first time posting on here so sorry if I didn't explain well.
However, it appears like the parent objects create event is running before the controller objects create event because I get an error saying that the ds grid is not set before reading it. (These variables are all global and I have tried with multiple variables from the create event.) So I think I need to make sure the controller object runs its create event first but I am not sure if there is a way to do so?
P.s. This is my first time posting on here so sorry if I didn't explain well.