Instances of object

This forum is currently in read-only mode.
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hello! I'm new here, and at start sorry for my english.

    I have two questions about manipulating objects. I used previously Game Maker editor, so:

    1) Can i add new type of sprite object, like bullet without putting new one to layer? When i delete all instances of bullet, this type is deleted from whole editor also. That's annoying.

    2) How can i manipulate bullets from python script? But not all, only one instance? In Game Maker i always write script like this:

    [quote:2qdqhb5t]new_object = instance_create( bullet, x, y ); //get unique id of new instance

    new_object.x = 10

    new_object.y = 40

    ...

    with ( new_object ) instance_destroy();

    //and manipulating all instance of type bullet

    bullet.x = 10

    bullet.y = 40

    Is this possible in Construct actually?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1) Try having just one bullet in the layout, and ticking "Destroy on startup" under Attributes in its properties.

    2) Python script is still in early days and I don't think it has per-instance manipulation yet; the primary way of coding games is still via events. Your code is trivially easy with a create action, set X, set Y, destroy, set X, set Y, etc. If you need any help with that, let me know...

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