Transform object

  • How to transform one object into another. (Example: object1 becomes the object2)

    PS: Please do not send examples made within the C2, I really want is a tutorial text, thank you!

    Ps²: Google Translate.

  • If you want to change the picture of your sprite, just add the second picture you want in the sprite animation.

  • No, I do not only want the sprite, I want the whole object and properties!

  • Just have it make object two where object one is and destroy object one?

  • What choice do it? If you're talking about creating another object, is not it, when you want to touch the object, he changed to another (as if sprite, but it is not only the sprite, that's all, properties, all of the object, switch to another object )

  • Can you give us details of property you want for the two objects? Behavior? Different variables?

  • Create 2 objects with the same properties. If some propertie is changed during the game change in the two and when you want it to change just make object1 spawn object2 and object1 destroy.

    For example:

    Object1 is solid and have a instance variable with value equal to 3

    object2 is solid and have a instance variable with value equal to 3

    during the game:

    object1 on colision with coin: set object1 instance variable value to 4

    set object2 instance variable value to 4

    time to change:

    object1 on colision with tree: object1 spawn object2

    object1 destroy

  • Basically what I said :p just more words. Or object 1 hit skill level 5 (variable) spawn object 1 at object 2. On object 2 created destroy object 1.

  • Works also with 1 sprite with 2 anim :p but this is not what he wants

  • I think both ways work honestly. Depending on what he wants. I was taking it as a separate object. So if object 1 has speed and hp of 10 and object 2 has a speed and hp of 20. Destroy and remake a different object.

    But as it is there is usually more than one option. I haven't played around with having a separate image but if you did that when object 1 becomes object 2 you just change the sprite and change the default speed/hp.

    One is more efficient at removing unneeded variables the other is better at saving time, memory, and condensing.

  • I would try to do that, but I thought I would be late, and / or bug, thank you I will try!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not work :/

  • capx example?

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