#rare start

29 messages · Page 1 of 1 (latest)

winter viper
#

how do i make it so that when the game boots up theres a (number)% chance of it happening?

sacred moon
#

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\

winter viper
#

send it in code form pls

sacred moon
#

i mean thats all theres to it!

#

there isnt much to code

#

its just a matter of where you place it!

winter viper
#

like this

sacred moon
#

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