so in g develop how would you store the information of something you don’t know. so ill explain. i have 100 contestants objects. each contestants have relationship levels of each other. this is obviously stored via variables but how? cuz i dont know whos gonna interact with who i cant say contest 1 change your relationship level of contest 57 to plus 20 cuz i dont know if 1 is interacting with contestant 57 im not gonna do if then 100 times per contestant i wanna do something simple where the game somehow knows who relationship variable values to change based on who interacting. so if a and b are interreacting change a and b relationship values of each other. but i dont get how to do that.
How do I…
A clear and concise description of what you are trying to do.
What is the expected result
Explain what should happen when you run the game.
What is the actual result
Explain what is happening instead, what is going wrong.
Related screenshots
Please include a screenshot of the full related events including both conditions and actions.
And screenshots to help showing us the issue.
Project files (optional)
Insert a minimal game showing your issue in a .zip or .rar.
Make scene variable call it Relations
Now set it to array
And now add 1 child var to it
And set it to array also
Now in that last array you need to add 100 number child vars
After that you need to click on that child in 1st array you have only one
Hit copy and now paste it 99 times
just create an array (doesn’t really need to declare each value since it declares for you automatically)
and add an id object variable for the contenstant object now (i’m assuming they are objects)
if you putted in the scene manually each contestants
at the beggining of the scene, put an for-each (left click in an event, add/for-each) as sub-events, add an loopindex local variable
(left click in the for-each/ add/ add loopindex or something similar) and then change the id variable of each object to loopindex
if you want to create the objects, just create the object at x and y and after that change the id to SceneInstancesCount(Object)
this will make sure each object has its own identification automatically.
for whatever reason they need to change, just do what Zero said or an logic similar of what he have said, i’m just showin’ an more modular way of setting up.
if you prefer, you can even put everything in loca/global variables you just need to do this
an repeat event that repeats SceneInstancesCount(Object) times (can be an number if you want to), add the loopindex local variable.
and then change the variable ContestantsRelations[loopindex][SceneInstancesCount(Object) or an number]
tadaaaaaaa, automatically setted for each contestants!
i would still recommend the object.id to make easier to get, but i guess with this logic i showed you can generate how many contestants you want (and how many your hardware wants too)