Game Development Community

location change

by Alexander Porter · in Technical Issues · 12/24/2002 (7:34 pm) · 2 replies

ok i need to be able to change a location. ok i am trying to my rain idea i posted recently, but the rain spawns at the ceter of the spawnsphere only. yet it works as it repeats, and causes no fps problems. i want to take the location of the spawnsphere.

%RainSpawnPoint

and display is as the value. but i'd like to display it as
"X Y Z Angle X2 Y2 Z2";
and then store the actual values in those variables
X = Xlocation
Y = Ylocation
Z = Zlocation
Angle = AngleValue
X2 = XRotation
Y2 = YRotation
Z2 = ZRotation

then since the rain spawns in one spot i would like to move the location around.
X = X + (getRandom(1, 10));
Y = Y + (getRandom(1, 10));
etc...

then trow the value back up to the function that creates the rain.

anyone know how to split up the location?

otherwise i'd like to manage to get the spawnspheres to pick a random location within the radius to spawn rain or other objects. Ideas?

#1
12/25/2002 (12:27 am)
You're looking for the getWord(%str,%word); function.

IE:

echo(getWord("This is a test",1));

will echo:

is
#2
12/25/2002 (12:29 am)
GREAT THX MAN.