• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

[SOLVED] Starting sprite based on 'type'

L

Latch

Guest
I create an item and set its type by:
Code:
with (instance_create(x,y,obj_item) {type = 1;}
Simple enough and works, however what I can't seem to fix is the very brief but obvious sprite change when it is created.

Simply put it will use the sprite I have given the object and then immediately switch to the correct sprite I defined above, how can I bypass this?

I tried changing the items create event into event user 0 and calling the item like:
Code:
with (instance_create(x,y,obj_item) {event_user(0); type = 1;}
But nothing changed.
 

TheBroman90

Member
Code:
with (instance_create(x,y,obj_item)
{
    type = 1;
    sprite_index = spr_my_sprite;
}
Have you tried to change the sprite where you change the type?
 
Top