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 / I need help with my NG collisions.

Author
Message
The Nerd
19
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 1st Feb 2005 23:35 Edited at: 1st Feb 2005 23:36
Hi

Im making an FPS game in dbpro.
I use NG to my collisions.

You can walk around and switch between 2 weopens.

Now i made my test map in Cshop 4.01.
I exported it as an x file.

Now when i try to use NG collision in my fps game it won`t work. It still just walking through the walls.
I try to use my 2 weopens as PLAYER objects.

Here is the complete code i use:




What is wrong?

Please help.

Thanks


Regards

The Nerd


looking for Royalty free 3D objects?
then Check PanzerGames at this link : http://www.freewebs.com/panzergames
The Nerd
19
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 2nd Feb 2005 03:00
Please help


looking for Royalty free 3D objects?
then Check PanzerGames at this link : http://www.freewebs.com/panzergames
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 2nd Feb 2005 04:47 Edited at: 2nd Feb 2005 04:50
#Constant Type_Player=9
#constant type_player=2

DBP sees those as the same. You need to make them different
Like
#Constant Type_Player1=9
#constant type_player2=2

Put these immediately after loading the objects and before any scaling.
`set the objects to a collision type
CollisionTypePRO( 2,Type_Player)
CollisionTypePRO( 9,Type_Player)
CollisionTypePRO( 1,Type_Wall)

Don't use the scale object command. Use the NGC replacement command instead. Scale the object with the replacement command right after the CollisionTypePRO for that object.

Quote: "SetObjRadiusPRO(1,object size x(2)/2,object size y(2)/2,object size z(2)/2)"

You are setting the radius to object 1 (the wall) instead of 2 (the player.

May be some more stuff I'll check back when I get home.
[edit] You will need to update the camera position in relation to the new gun position after the runcollisionpro command is called.

The Nerd
19
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 2nd Feb 2005 21:41 Edited at: 2nd Feb 2005 21:42
Umm since that im not that good at using NGC in big codes like this could you please put the changed code in my current code?
You would help me much doing that. Then it is easyer for me to see and understand what you have done.


Thanks


The Nerd


looking for Royalty free 3D objects?
then Check PanzerGames at this link : http://www.freewebs.com/panzergames

Login to post a reply

Server time is: 2024-04-16 21:33:04
Your offset time is: 2024-04-16 21:33:04