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 / Nuclear Glory Program Problems

Author
Message
Guyon
21
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 14th Mar 2005 11:55
Please let me know where I am going wrong
This code will not run, but uses all my NG commands. My 2 objects pass each other with out hitting.


rem ***Nuclear Glory Collision Constants***

#Constant NCULL_COUNTER_CLOCK 1
#Constant NCULL_CLOCK 2
#Constant NCULL_NONE 3

#Constant TYPE_NGC_ELLIP=1
#Constant TYPE_NGC_MESH=2

#Constant ELLIP_2_ELLIP=1
#Constant ELLIP_2_POLY=2

#Constant RESP_STICK=1
#Constant RESP_SLIDE=2
#Constant RESP_SLIDE_NO_SLOPES=3
#Constant RESP_SLIDE_NO_GRAV=4
#Constant RESP_SLIDE_NO_ACCEL=5
#Constant RESP_NONE=6

#Constant DYN_NO_RESP=1
#Constant DYN_RESP=2
#Constant DYN_RESP_NOTURN=3
rem ***Nuclear Glory Collision Constants***



#include include/NGCollision.dba


load object "Graphics/GreenRocket6.x",1
Position Object 1,0,50,0
Show Object 1

load object "Graphics/GreenRocket6B.x",2
Position Object 2,155,50,0
Show Object 2
Rotate object 2, 270,0,0

StartCollisionPRO(000000000,000000000,000000000)
StartCollisionDebugPRO()

SetCollisionsPRO(1,2,ELLIP_2_ELLIP,RESP_SLIDE,DYN_NO_RESP, 0 )



Do

REM Make object 1 and 2 collide with a move command.


RunCollisionPro()
sync
Loop
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 14th Mar 2005 15:20
LOad the objects after the SetCollisionsPRO(1,2,ELLIP_2_ELLIP,RESP_SLIDE,DYN_NO_RESP, 0 )

Use CollisionTypePro() after you load them and before you call any other object releated NGC commands.

And when using ellip collision you will need to set the object radius on each object used as ellip. both in this case.

Guyon
21
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 14th Mar 2005 22:08
OK I change my code to this and still get no collision:


I don't see that you "need" to set the object radius by looking at NG's examples. These objects move right over top one another.

Any assistance would be appreciated.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 14th Mar 2005 22:38 Edited at: 14th Mar 2005 22:39
If you don't set it. it defaults to a radius of 2 which is very small.

[edit] Also just noticed you are using v3 .... Good luck getting that to work right

Guyon
21
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 14th Mar 2005 23:15
I am using the current demo. Try before I buy. I may go back to DB collision and not buy.

Going to make a separate program with just my two .x objects and give it once more chance. Be back soon.....
Guyon
21
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 14th Mar 2005 23:58
I am starting a new thread with a simple test that fails
Guyon
21
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 15th Mar 2005 00:59
OK I got it to work really well. Take a look at this thread.
http://forum.thegamecreators.com/?m=forum_view&t=50425&b=18

Login to post a reply

Server time is: 2024-11-23 22:11:55
Your offset time is: 2024-11-23 22:11:55