shrouk
shrouk

Reputation: 43

When i change instance into an object that has sub images, the animation doesn't work in game maker

When i change an instance into another one which contains sub images, the animation doesn't work and also the events in that new instance doesn't work.

with(obj_matchbox){
instance_change(obj_match,true);}

Upvotes: 0

Views: 193

Answers (1)

Kake_Fisk
Kake_Fisk

Reputation: 1165

There is nothing wrong with the code you posted. The animation should play automatically and it should fire events. The problem must lie somewhere else.

Make sure you do not have something in the draw event of obj_match, it will prevent Game Maker from handling the sprite animation for you.

For why your events do not fire, I have no idea. You have perf set to true in instance_change, so it should not be a problem.

Upvotes: 2

Related Questions