Page 1 of 1

Bobbing?

Posted: Mon Apr 18, 2005 2:36 am
by predalien
how do i make objects bob? like in water?

Posted: Mon Apr 18, 2005 11:36 am
by Grassy
The only thing I can think of is make them script_objects, give them targetnames and do it via the script.

This might work,
//call the thread like so

$object1 thread bob
$object2 thread bob

//etc etc

//-------
bob:
//-------
//each instance of this thread will make the objects
//bob up and down with small pauses with random movement distance

while(1) {

//play with these numbers for best effects
local.dist = (randomint (10)+5)
local.pause = (randomfloat 3)
local.wait = (randomint(3)+1)

self moveup local.dist
self waitmove
wait local.pause
self movedown local.dist
self waitmove
wait local.wait
}
end

Grassy

Posted: Mon Apr 18, 2005 1:38 pm
by Rookie One.pl
I think you should try messing around with func_sinkobject.

rings

Posted: Mon Apr 18, 2005 1:58 pm
by tltrude
Makes you wonder how splash rings (bullet hits) float on a moving surface. "MoveOffset" works for script_objects, but I'm not sure how you set the offset vector to start with.

moveOffset - Move the position by the offset vector.