Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / if object collision?(ngc)

Author
Message
aks74u
19
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: arizona
Posted: 25th Oct 2004 14:03
(i'm using the newest version besides 3.01 and 3.00... ithink it's 2.03 or something)


all i want to know is how to do




but i can't seem to do it in NGC thx !

Over And Out.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 25th Oct 2004 20:23
You really need to read some of the examples in the manual. NGC is more about setup than how to deal with it in-game. If you set it up correctly, you can react to anything in just a few lines of code. In many cases, you don't need to write anything other than RunCollisionPro().

Check out my codebase snippet. The objects all "avoid" each other without any in-game code, that was acheived at the setup stage. You can compare your hotzones to my waypoints. When I hit a waypoint, I run some code to find the next one.

http://www.thegamecreators.com/?m=codebase_view&i=6d99af4a5acc16df108236b718052d76

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Indie Rock 13
19
Years of Service
User Offline
Joined: 1st Sep 2004
Location:
Posted: 6th Nov 2004 17:03 Edited at: 6th Nov 2004 17:12
Something like this works:

CollCount=CountCollisionsPro(1)
if CollCount>0
Obj=CollisionHitObj(1,1)
if Obj=3
a#=0.0
jumped=0
endif
endif

That way if object 1 collides with object 3 then the integers are changed.

Hope that makes sense...

Neeeeeeeewom!
aks74u
19
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: arizona
Posted: 7th Nov 2004 07:10
hey thx dude crystal clear!

this will work.


good man...a good man...

Over And Out.

Login to post a reply

Server time is: 2024-03-29 06:15:08
Your offset time is: 2024-03-29 06:15:08