Create Object and Return UID

Discuss game development design and post your game ideas

Post » Tue Jun 03, 2014 6:58 am

Hi,
An action which seems to me very interesting is that which makes it possible to create an object and to have in return the UID of the object created.
This exists can be already but i did not find it.
To take this demand for consideration thank you in advance.
Best regards. A.Pardaillan
B
2
Posts: 1
Reputation: 152

Post » Tue Jun 03, 2014 1:12 pm

When you create a new instance of an object in an event,this new instance become the default pick for that object within the same event, so you can just access the UID of the new instance like this:

On mouse click >> Create object of type Cube
>> Browser alert(Cube.UID) // will alert the UID of the cube you juste created
B
12
S
5
G
2
Posts: 132
Reputation: 2,627


Return to Game Development, Design & Ideas

Who is online

Users browsing this forum: No registered users and 1 guest