Hi all, sorry to bother, but I'm trying to have a patrol bot float or hover in one place up and down slowly. I know I wrote a code for it about 5 years ago, modified it from a aum lesson, I think. but I can't find the aum or figure out how I did it. searched for it here on the forum too, but still no answers.
Can someone help me? thanks a bunch!
a8 commercial
Re: trying to float an orb...
[Re: seneca]
#440296 04/23/1406:2004/23/1406:20
#define target_height skill80
...
my.target_height = XYZ; // either some value or for example c_trace and then target.z (when trace_hit != 0) + let's say 128
my.skill81 += 8*time_step; // may be a little too fast
my.skill81 %= 360;
my.skill82 = my.target_height+32*sinv(my.skill81)*time_step; // cover a vertical distance of 2*32 = 64 quants
c_move(me,nullvector,vector(0,0,my.skill82-my.z),IGNORE_PASSABLE);
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual