Legacy GM Spawning randomly within 640x480

C

Cmi

Guest
So I want to spawn some in a game that is 640x480. This is the code I have so far for my spawning
Code:
instance_create(irandom_range(448,608),irandom_range(0,0
I want to make an object spawn or be created randomly anywhere in that room, what do I need to change? (I know it's most likey my x and y's but I don't know how to set them so they do what I described.
 
D

DyingSilence

Guest
instance_create(irandom(608),irandom(448), Obj_name);
 
D

DyingSilence

Guest
Explanation:

Creates an object at random x from 0 to 608 and random y from 0 to 448.
 
D

DyingSilence

Guest
The code you pasted isn't even a complete line, it couldn't work, and if it did, it would do it wrong.
 
C

Cmi

Guest
The code you pasted isn't even a complete line, it couldn't work, and if it did, it would do it wrong.
I have it in a game and it makes them just spawn in a straight line across which is what it was meant to do. But I guess it doesn't work when trying to spawn things in the room randomly.
 
Top