I’m a newbie to Games Maker (GM8 Pro) and this is my first post, so please be gentle...;-)
I have, what is probably a very simple, problem which I was hoping someone might be able to help me with....
I am trying to modify the ‘Wingman Sam’ game (from the original ‘Game Maker’s Apprentice’ book), in order to make it an educational game.
I’d like to display some text (i.e. a sum or answer) above both the player’s plane and the Enemy planes.
I’ve managed to do this with the player’s plane by adding a Draw event/Draw Text action (via the Drag N Drop GUI) to the player’s plane object (obj_plane1) (the word ‘TEST’ in the screenshot below).

However, the problem comes trying to reproduce this for the Enemy planes....
The enemy planes are not actually placed (as objects) in the room/playing area; rather five instances/planes are created by (D & D) ‘Create Instance’ actions in a Time Line (as per the book's instructions).
When I modify the actual ‘obj_enemy_basic’ object, only the first plane (in the wave of 5) displays the text, the rest do not (i.e. only the first plane displays the text ‘Answer’, as shown in the pic above).
I am thinking maybe it has something to do with the planes being dynamically created, so I thought I would replace the ‘Create Instance’ actions with some script (below), however this does not work and there is no text displayed above the enemy planes at all!
{
// Create a ‘Wave’ of planes, with text above them
var plane1, plane2, plane3, plane4, plane5;
plane1 = instance_create(80,-40,obj_enemy_basic);
plane2 = instance_create(200,-40,obj_enemy_basic);
plane3 = instance_create(320,-40,obj_enemy_basic);
plane4 = instance_create(440,-40,obj_enemy_basic);
plane5 = instance_create(560,-40,obj_enemy_basic);
draw_set_font(fnt_panel);
draw_set_color(c_red);
draw_sprite(spr_enemy_basic,-1,plane2.x-50,plane2.x-25);
draw_text(plane1.x-25,plane1.y-50,'Answer');
draw_text(plane2.x-25,plane2.y-50,'Answer');
draw_text(plane3.x-25,plane3.y-50,'Answer');
draw_text(plane4.x-25,plane4.y-50,'Answer');
draw_text(plane5.x-25,plane5.y-50,'Answer');
}
It’s probably something incredibly stupid on my part, but does anyone know what I am doing wrong?
Thanks in advance
Roy











