K
krugen
Guest
Having work with GMS2 for a month now, I notice a little something.
You have two objects, obj_a and obj_b
obj_a created obj_b
obj_b can be created and destroyed anytime obj_a wishes so
The process to create obj_b occurs in obj_a's step code
Whatever happens to ob_b will not impact the decision of obj_a to destroy obj_b
Here is my question:
To destroy obj_b, which approach would you take?
a) Destroy obj_b directly using its id directly from obj_a
b) Set the value of a check variable in obj_b such that when obj_b read the condition during its step time, it will destroy itself
c) Have obj_b checks the status of a variable in obj_a using the id of obj_a, depending on its status, obj_b will destroy itself. This is the same as (b) except instead of setting obj_b's variable, you are setting your own variable.
You have two objects, obj_a and obj_b
obj_a created obj_b
obj_b can be created and destroyed anytime obj_a wishes so
The process to create obj_b occurs in obj_a's step code
Whatever happens to ob_b will not impact the decision of obj_a to destroy obj_b
Here is my question:
To destroy obj_b, which approach would you take?
a) Destroy obj_b directly using its id directly from obj_a
b) Set the value of a check variable in obj_b such that when obj_b read the condition during its step time, it will destroy itself
c) Have obj_b checks the status of a variable in obj_a using the id of obj_a, depending on its status, obj_b will destroy itself. This is the same as (b) except instead of setting obj_b's variable, you are setting your own variable.