ID:273784
 
Okay so i want to know how to make pokemon randomly come out of the turfs i have if anyone knows please let me know.
Real Noobz Sit On Streetz wrote:
Okay so i want to know how to make pokemon randomly come out of the turfs i have if anyone knows please let me know.


turf
random_pok
Entered(mob/M)
if(prob(50))
M << "POKEMON"
//new/obj/pikachu(src.loc) or w/e


I'm still a rookie programmer D:





-Hayate-
In response to TheProductions
This just gave me errors lol
What kind of errors? I tested and it worked, without the pokemon objects though
In response to TheProductions
turf
Tall_Grass
Entered(mob/M)
if(M.client)
if(prob(21))
var/randpok=pick("Pikachu","Meganium"," Mightyena"," Hippowdon","Scraggy","Rattatta","Chandelure")
if(randpok=="Pikachu")
new/mob/Pikachu(src.loc)
if(randpok=="Meganium")
new/mob/Meganium(src.loc)
if(randpok=="Mightyena")
new/mob/Mightyena(src.loc)
if(randpok=="Hippowdon")
new/mob/Mightyena(src.loc)
if(randpok=="Scraggy")
new/mob/Scraggy(src.loc)
if(randpok=="Rattatta")
new/mob/Rattatta(src.loc)
if(randpok=="Chandelure")
new/mob/Chandelure(src.loc)


And that's a tall grass code for you. There's a chance that one of the pokemon in the list pop out of it. Of course, you can change the list if needed. The typepaths for the Pokemons spawned also needs to be changed.

If you get any more errors it may be because the indentation is different in your project than in the code above - in that case, just change it.