0 Favourites

Instances of object

This forum is currently in read-only mode.
  • 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?

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
167 14,515
DMT2005's avatar
DMT2005
Unread hot topic
0 Favourites
[Plugin] instance bank2
85 18,373
rexrainbow's avatar
rexrainbow
Unread hot topic
123 14,874
Zebbi's avatar
Zebbi