So..
I am trying to draw_sprite() by inserting the sprite id instead of sprite name like spr_apple.
But I discovered, sprite id isnt exactly what I want, because
doesnt work.
Sprite id looks like 100028 or 100020.
What I want is a sprite order in sprite list.
Lets pretend, that spr_apple is third in list, so the list looks like:
1. spr_player
2. spr_enemy
3. spr_apple
4. spr_gun
5. spr_obstacle
Sprites orders in list are:
1. spr_player...............0......\
2. spr_enemy..............1........\
3. spr_apple................2.........> I WANT TO GET THESE NUMBERS
4. spr_gun...................3......./
5. spr_obstacle............4...../
Inserting order in list of sprite in draw_sprite() works.
Then, the code will draw me an apple.
Isnt there any function or something, to get these numbers, something like sprite_get_order ?
I am trying to draw_sprite() by inserting the sprite id instead of sprite name like spr_apple.
But I discovered, sprite id isnt exactly what I want, because
Code:
item = spr_apple.id
draw_sprite(item,image_index,x,y);
Sprite id looks like 100028 or 100020.
What I want is a sprite order in sprite list.
Lets pretend, that spr_apple is third in list, so the list looks like:
1. spr_player
2. spr_enemy
3. spr_apple
4. spr_gun
5. spr_obstacle
Sprites orders in list are:
1. spr_player...............0......\
2. spr_enemy..............1........\
3. spr_apple................2.........> I WANT TO GET THESE NUMBERS
4. spr_gun...................3......./
5. spr_obstacle............4...../
Inserting order in list of sprite in draw_sprite() works.
Code:
item = 2
draw_sprite(item,image_index,x,y);
Isnt there any function or something, to get these numbers, something like sprite_get_order ?