i have a game and im trying now to create unique ID for every player spawned and save its position ,
but the host can only receive 1 set of x and y co-ordinates for that object and i cat find a way to make a new object each time or change object name
please shine some light on this
You are working on a network game on native platform ?
To create unique ID, using object variable “ID”, just create a variable object so called, and let the value to 0 by default.
Then create an object counter global variable, for exemple “playerCounter” and set it to 0 to.
In “scene startup” condition, you’ll create your player object instance,
in a “for each object ‘player’”, action : player.Variable(ID) = GlobalVariable(playerCounter)+1 then
then increment the counter : GlobalVariable(playerCounter) = player.Variable(ID)
This way all object “player” will have a unique “ID” value in variables, that you can use for all other condition.
Hope this will help, i’m not sure about the purpose if you are using network extension, idk how does it work, and probably client game can’t share “local” variable…
This does help and i have a unique id generator now for objects,
the only issue is the TXT part in certain commands, is there any way to change them to a variable
because i want to be able to send objects information say X and Y but that means everybody will recieve the same information and not there individual charicter X and Y
What do you mean by txt ? Xml ?
If it’s this you have manage xml node, generate it using concatenation with id… But maybe it’s not the point with this extension.
i mean for example
that txt box / string is there any way i can change what goes in this box due to the fact it reads what you add to this section as a string(text) and does not look for it.
example : in that box if i wanted it to fuse a variable i cant