Possible to set created object instance properties

0 favourites
  • 3 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hi,

    It is possible to immediatly set created object instance properties ?

    Like i want to create an object and then set some instances properties to that object immediatly after ?

    That would be nice to have something like LastCreatedUID or whatever to pick that object in a subevent or something.

    Thanks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can do that in the same event as the created object :P Just have the instance variables and make sure to put the "Set variables" events AFTER the "Create" event.

    -On mouse click

    +Create "Sprite" (0,0)

    +Set Sprite "HP" to 155

    +Set Sprite "Name" to "Bob"

    Edit: AS FOR sub-events, I'm pretty sure it automatically selects the object you created in the main event (though I may be wrong).

  • Alright it work now.. ! Thanks sorry for being a n00b.. haha at first i was pretty sure we could do this otherwise it would have been bothersome!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)