Random Z coords with ColAndreas
#1

hello

im trying to generate 200+ random objects/items on the map and i cant do that by randomizing Z coords or by getting all the coords manually
i tried to randomize XYZ coords then i saw some items spawn midair(due to the random Z coords)
How do I generate random Z coords on the ground with ColAndreas?

thanks
Reply
#2

Either

PHP Code:
CA_FindZ_For2DCoord(Float:xFloat:y, &Float:z
or make up a more elaborate function with ray casting.
https://github.com/Pottus/ColAndreas/wiki/Functions

Can't really provide an example as I haven't tried it but it should work, I believe.
Reply
#3

Thanks. I'm gonna try that out
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)