event: key left pressed action: instance_create

makis2404

Member
Creates instances if only there is already an isntance in the scene. When instance goes out of room and gets instance destroy, cant create new instances.
for examble: event create: speed = 3 , event key left pressed: instance_create_layer(40,50,"Instances", obj_vehicle), event outside room: instance_destroy(); if the firs instance goes out of room and is destroyed then pressing the left arrow key does not creates an instance.
 

chamaeleon

Member
Creates instances if only there is already an isntance in the scene. When instance goes out of room and gets instance destroy, cant create new instances.
for examble: event create: speed = 3 , event key left pressed: instance_create_layer(40,50,"Instances", obj_vehicle), event outside room: instance_destroy(); if the firs instance goes out of room and is destroyed then pressing the left arrow key does not creates an instance.
How much of the manual have you read so far?
 

TsukaYuriko

šŸŒ 
Forum Staff
Moderator
If there is no instance in the room, what is going to create more instances, or even respond to key presses in the first place?
 
Create a seperate controller object that stays in the room and checks for key presses and does the instance creation code. Don't assign a sprite to it so it won't be drawn in the game.
 

makis2404

Member
Thanks mr. IndianaBones.
Manual is a good place for reference, not a good tutorial.

How much of the manual have you read so far?
Can you make something more friendly than manual?
Can you give give an answer instead of "advices" like that?
 
Last edited by a moderator:
Top