123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|706|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> AI and Sounds

Thu, 22 Nov 2007, 00:23
Toaster
Okay I am working on some nice AI and right now i am working on the sound part here's my code:



As you can see I use a simple sphere to make the sounds.. its actually really easy the only thing is when the sound sphere collides with the box nothing happens.

-Toaster
Thu, 22 Nov 2007, 21:50
Toaster
So apparently you cant scale an entity once you've started collisions even updating the collisions every loop doesnt work as well. Anyone have any ideas on how I can do this? I dont want to use entity distance since I wouldnt be able to see the sound waves..
Fri, 23 Nov 2007, 12:12
Paul
Don't really know what you want to do, but maybe EntityBox or EntityRadius would help?
Fri, 23 Nov 2007, 14:58
Scherererer
Yeah if you scale an entity you will also have to change entitybox or entityradius.

-=-=-
YouTube Twitter
Computer Science Series: Logic (pt1) (part 2) (part 3) 2's Complement Mathematics: Basic Differential Calculus
Mon, 26 Nov 2007, 08:34
Toaster
hmm I tired entity radius doesn't help I am looking at a DLL for collisions its suppose to do dynamic collision with out any problems.
Mon, 26 Nov 2007, 08:53
Forklift_Fred
Still not 100% sure what you're trying to do but I just started to look over your code again and you haven't given type_sounds a value so no collisions are being detected!

I set it to 5 and when the sphere hit the box everything stopped. I'm guessing that's better than nothing happening at all...

-=-=-
Come rain or shine...
Mon, 26 Nov 2007, 09:15
Forklift_Fred
I see it's the WaitKey() in updatefootstep() that is stopping everything.

I replaced it with a global variable increment to count the 'hits' rather than stopping everything and it seems to be going up by 6 or 7 each time and doesn't coincide with the sphere hitting the box at all??? |edit| This is because not all sounds have spheres, only every 60th does |edit|

I also noticed that the spheres aren't being generated from your actual position but along one straight line (presumable along either the x or z axis but I see no reason for this!)

-=-=-
Come rain or shine...
Tue, 27 Nov 2007, 04:07
Toaster
hmm well the spheres are suppose to be created with the user but if its all because I forgot to put a value for the type_sounds I'll be mad. I always forget little things like that..

-Toaster
Tue, 27 Nov 2007, 12:37
Forklift_Fred
You're not alone, I make annoyingly stupid spelling mistakes and spend ages trying to work out why something suddenly stops working. The other classic for me is forgetting to set a variable as global. That had me going for well over an hour this week

-=-=-
Come rain or shine...