Transform object

Get help using Construct 2

Post » Sat Jul 04, 2015 12:00 am

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. :D
B
3
Posts: 6
Reputation: 197

Post » Sat Jul 04, 2015 12:03 am

If you want to change the picture of your sprite, just add the second picture you want in the sprite animation.
Image Image
B
23
S
13
G
135
Posts: 871
Reputation: 70,345

Post » Sat Jul 04, 2015 1:39 pm

No, I do not only want the sprite, I want the whole object and properties!
B
3
Posts: 6
Reputation: 197

Post » Sat Jul 04, 2015 2:24 pm

Just have it make object two where object one is and destroy object one?
B
8
Posts: 23
Reputation: 360

Post » Sat Jul 04, 2015 9:02 pm

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 )
B
3
Posts: 6
Reputation: 197

Post » Sat Jul 04, 2015 9:05 pm

Can you give us details of property you want for the two objects? Behavior? Different variables?
Image Image
B
23
S
13
G
135
Posts: 871
Reputation: 70,345

Post » Sat Jul 04, 2015 9:26 pm

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
You know nothing, Jon Snow
B
10
S
2
G
1
Posts: 53
Reputation: 766

Post » Sat Jul 04, 2015 11:48 pm

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.
B
8
Posts: 23
Reputation: 360

Post » Sun Jul 05, 2015 12:04 am

Works also with 1 sprite with 2 anim :p but this is not what he wants
Image Image
B
23
S
13
G
135
Posts: 871
Reputation: 70,345

Post » Sun Jul 05, 2015 4:24 am

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.
B
8
Posts: 23
Reputation: 360

Next

Return to How do I....?

Who is online

Users browsing this forum: David181, yiuyiu6666 and 27 guests