S
SioNisti
Guest
id want to spawn an object from 7 different ones on random on a specific spot
Thanks for the help
Thanks for the help
instance_create(
irandom_range(0, room_width),
irandom_range(0, room_height),
choose(enemy1, enemy2, enemy3)
);
instance_create is shown in blue and gives me error when i try to run the gamechoose(object1, object2, ... , object16) chooses randomly one of up to 16 objects
irandom_range(10, 100) chooses a random number between 10 and 100
so
Spawns one of three enemies on a random location anywhere within the room.Code:instance_create( irandom_range(0, room_width), irandom_range(0, room_height), choose(enemy1, enemy2, enemy3) );
screenshot?instance_create is shown in blue and gives me error when i try to run the game
im new at this sorry...Can you not figure out that instance_create needs to be instance_create_layer? Look in the manual instead of coming to the forums for things like that. My guess would be that Vikom is used to GMS1.4's coding conventions while you are using GMS2.
instance_create_layer(x_position,y_position,"Instances",choose(object_1,object_2,object_3,object_4,object_5,object_6,object_7));