#rare start
29 messages · Page 1 of 1 (latest)
make a variable using https://manual.yoyogames.com/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/random_range.htm then have a check to see if the number matches a certain number and if it does change scene room or whatever. So like rareStart = random_range(1, 10); than if(rareStart = 10) { targetRoom = SecretRoom}
the example i gave is a 1 in 10 chance
but you can change the range to be like 1 in 100
you would have to put this code before whenever the game loads\
send it in code form pls
pls
i mean thats all theres to it!
there isnt much to code
its just a matter of where you place it!
like this
i mean if you set the range from anywhere between 1 and 1 its like youre just saying rare_start = 1
you should probably put the variate in the create section of the object
variable*
then in the begin step part of the object, place the if statement
then have the room you start in a blank room, drag this object into that blank
add an else after the if
that says
else { targetRoom = starting room}
also targetRoom is written targetRoom not target_room
oh mb!
retract that
room_goto(targetRoom);
you can set it to whatever you want
hahah
i forgot it was a few days since i wrote that
so your create code should have rare_start = random_range(1,10); and room_goto(target_room);
then your begin step code should be