How put a object, without expression after it, in variable ?

0 favourites
  • 5 posts
From the Asset Store
It's here!
$4.95 USD
Creepy and nasty horror track. It's terrifying from the beginning till the end. Goosebumps guaranteed
  • Hello everyone,

    During the last 2 weeks I search how put a object without expression after it, so just the object, in variable, dictionary or array ?

    For example

    variable "Firstobject" = SpritePlayer

    after "Firstobject" = SpriteWall

    and I can use the object after, "firstobject".X = 110

    Please help me because my game is late. Thanks

  • It's not possible to store objects in the aforementioned data structures. You'll have to find some other way to do what you want.

  • You add the IID (not UID) after it.

    Firstobject(0).x

    Edit: sorry i probably misunderstood your first post. I don't know if the above was what you wanted.

  • You add the IID (not UID) after it.

    Firstobject(0).x

    Edit: sorry i probably misunderstood your first post. I don't know if the above was what you wanted.[/quote > > i tried on my game, but I don't understand what is this 0 on Firstobject(0).x

    Thanks and I have another solution, can I choose a object in family with his ID ? please

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can give each object an instance variable called 'name' with its name. Then you can add the name by 'object.name' to any variable, dictionary or array.

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