Create object instance from string

Get help using Construct 2

Post » Wed Dec 04, 2013 1:43 am

I would like to create an instance of an object when a user drags the object's icon to the scene (strategy game placing units at the game start). I've achieved this so far by specifying the objects. Now i would like to do it in a general way so that the instance name is set in a variable in the icon and when icon is dragged, an object instance is created from this variable. Here is the current code i have working with comments on what i would want to achieve:

Any ideas on how to do that or suggestions on alternative methods?

Posts: 2
Reputation: 179

Return to How do I....?

Who is online

Users browsing this forum: majagames and 11 guests