Hi. I am at a juncture in this game I am working on for class. I am trying to make a variable to change the text when as the character picks up items. I feel I am close but maybe I am somehow using the wrong variable, or wording? Please help.
What I would do is have a scene variable called “text” that changes when doing something with the block “change “text” to [whatever you want to change it to.]”
I can’t read your code, it’s too small, but this should work
That doesn’t do it, it’s still not being added to the variable. When I run the game and pick up items it stays at zero. Here is a better shot.
Let’s take a look,
- At the beginning of the scene (and just there) the text variable obj_text_holding is set to the string “holding” plus the textual representation of the group_collected variable value (so, if group_collected is 1 at the beginning of the scene, then obj_text_holding is “holding1” at the beginning of the scene, but it not updates in any other part of the events), and the text variable obj_text_at_nest is set to the string “at_nest” plus the textual representation of the group_collected variable value (so, if group_collected is 1 at the beginning of the scene, then obj_text_at_nest is “at_nest1” at the beginning of the scene, but it not updates in any other part of the events).
- Everytime the duck is in collision with an object of the pickup group, that object is moved to the [0,0] position and inmediately deleted (it’s not necessary to move it to [0,0] before delete it), then the numerical variable group_collected is increased by 1.
That’s what I can see in your events regarding those variables and items.
Yes. That did it. Thank you so much… I think this is the second time you’ve saved me.