Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Hi, I have a problem in my project, I don't understand why the lines are not running, can you please help me, see in my project to understand, where there is a comment.
The problem comes from line 14 or I say:
-> System: Create the Dictionary object on layer 0 to (0, 0)
I think the program cannot select the dictionary with IDU 3
because the new dictionary has taken over.
I think it's a bug, to be confirmed.
I think you are confusing IID and UID - they are different! Run the game in Debug Mode, find your dictionary object in the list and check them yourself.
Also, it's a bad practice to use fixed values for UID in the code, (like in your condition Dictionary.UID=3), because when you change the project, add/remove objects, these values can change. It's recommended to use instance variables instead.
That's what I've already done, I don't think I'm confusing, look for yourself:
Thank you for your advice, can you show me how to do it, please?
Develop games in your browser. Powerful, performant & highly capable.
dayvid86, a quick hack is to replace your "Dictionary - Pick instance with UID 3": change it to "System - Pick 'Dictionnaire' instance 0". That always picks the first Dictionary, which seems to work with your current events.
But it may be better to add an instance variable to your Dictionary and use that to identify the different instances.
No, it's not working, please let me see.
You need to add "Pick all" into event 15. Because in the parent event you created a new dictionary instance, you can't pick any other instance in sub-events, unless you use "Pick all".
Also, the IID in event 15 will now refer to the instance with UID=3. If you need IID of the newly created instance, save it to a local variable, or use (Dictionnaire.Count-1) instead.
Thank you, it works, what would I do without your help ? :)