Random method without repeating
#8

The code I gave at last will spawn them all - same time - each one in its own coords - no repetition.
If you want them to spawn one by one during a timer with random function, use something this way :
new EasterEggs[][]=
{
{Float:X, Float:Y, Float:Z, bool:SpawnedAlready},
{Float:X, Float:Y, Float:Z, bool:SpawnedAlready},
{Float:X, Float:Y, Float:Z, bool:SpawnedAlready},
//etc..
};
run a random function, if the array has SpawnedAlready==false then spawn it in that position and set it true, if it has just do a while function until you find some array with false:SpawnedAlready, I hope you understood what I meant
Reply


Messages In This Thread
Random method without repeating - by Detoria - 06.03.2015, 23:14
Re : Random method without repeating - by Golimad - 06.03.2015, 23:25
Re: Re : Random method without repeating - by Detoria - 06.03.2015, 23:27
Re : Random method without repeating - by Golimad - 06.03.2015, 23:30
Re: Re : Random method without repeating - by Detoria - 06.03.2015, 23:32
Re : Random method without repeating - by Golimad - 06.03.2015, 23:38
Re: Random method without repeating - by Detoria - 06.03.2015, 23:45
Re : Random method without repeating - by Golimad - 06.03.2015, 23:52
Re: Random method without repeating - by Detoria - 07.03.2015, 00:18
AW: Re : Random method without repeating - by Nero_3D - 07.03.2015, 00:21

Forum Jump:


Users browsing this thread: 1 Guest(s)