David Richard
Member
I know it's a brief title but it's pretty much the problem I have. I read this article which says about nothing about how it works bisides the fact that it's a good idea: https://docs.yoyogames.com/source/dadiospice/001_advanced use/more about objects/parents.html
https://docs.yoyogames.com/source/dadiospice/001_advanced%20use/more%20about%20objects/parents.html
So, being convinced in the doc that parenting is a nice practice and usefull, I tried to use it. But nope... Nothing happens on my side. I won;t be posting the project as it will be release on the marketplace but here is a detailed explanation on the situation.
• First object - call it "obj_coin", has a creation script, a destroy script and a step event script.
• Second object - call it "obj_life" has absolutely nothing in it because it shares all the scripts of obj_coin SO instead of copying the code AGAIN from obj_coin, well, I decided to say that it's parent is obj_coin.
I hope you are following for now because I'm almost done...
When running the game, obj_life does not run anything. Why? Did I miss something? I mean, I have absolutely nothing different in obj_life and obj_coin besides how the player interacts with them, the rest is identical.
I tried to do a step by step runnin with the extremely long "F11" procedures of GMS debugging. I added a script call in obj_coin's create event for example scr_do_something("some text"). In the scr_do_something script, there is one single line: var some_text = argument0;
I put in the room ONLY one obj_life and put a break point on the 1 line on the script. Results ---- The game never pauses because it never runs the script. Did I not understand how parenting works, I may have missed something?
https://docs.yoyogames.com/source/dadiospice/001_advanced%20use/more%20about%20objects/parents.html
So, being convinced in the doc that parenting is a nice practice and usefull, I tried to use it. But nope... Nothing happens on my side. I won;t be posting the project as it will be release on the marketplace but here is a detailed explanation on the situation.
• First object - call it "obj_coin", has a creation script, a destroy script and a step event script.
• Second object - call it "obj_life" has absolutely nothing in it because it shares all the scripts of obj_coin SO instead of copying the code AGAIN from obj_coin, well, I decided to say that it's parent is obj_coin.
I hope you are following for now because I'm almost done...
When running the game, obj_life does not run anything. Why? Did I miss something? I mean, I have absolutely nothing different in obj_life and obj_coin besides how the player interacts with them, the rest is identical.
I tried to do a step by step runnin with the extremely long "F11" procedures of GMS debugging. I added a script call in obj_coin's create event for example scr_do_something("some text"). In the scr_do_something script, there is one single line: var some_text = argument0;
I put in the room ONLY one obj_life and put a break point on the 1 line on the script. Results ---- The game never pauses because it never runs the script. Did I not understand how parenting works, I may have missed something?