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 / using NGC to see whether you hit a ladder

Author
Message
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 5th Jun 2005 09:51 Edited at: 5th Jun 2005 10:19
to see if i hit a ladder, i have my map as a .x model, and then a bunch of invisible blocks at the same shapes/locations of the ladders in the map in a seperate .x file. i use NGC for collision on the main map and want to use it also to see if i collide with TYPE_LADDERS but I cannot figure out how to get collision information from only a specific type

this is how i'd find out if i am at an X wall, but I need to do it for only one type (not both TYPE_WORLD and TYPE_LADDERS)


p.s. i think i found the solution. perhaps the best way would be to make more than one camera object... one for world, one for ladders, one for water
p.p.s... that's a large hit to FPS
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 5th Jun 2005 15:17
Look into the CollisionTypePRO command and use it with the CollisionHitObj to get what you need.

qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 6th Jun 2005 06:04 Edited at: 6th Jun 2005 10:38


neither collisionhittype nor collisionhitobj will work. when i run the line is highlighted yellow on BlueIDE and it exits right after the program starts. is it because i'm using v. 2.01? the command is in the 2.01 help documentation though

edit...the documentation is wrong. i looked at the NGC Include file and it is collisionobjhit not collisionhitobj

edit... NGC wasnt acting nciely when i told the camera object to collide with both the level and the ladders. and even though i told it not to have any collision response with the ladders, it kept colliding (without sliding collision) with teh ladders. so i am just using intersectobject so if you are facing (or facing directly away from) the ladder, and you are going into it, you go up if facing up, down of facing down. if you arent pressing into it, you just stay there, so you can hang out on the ladder. unfortunately if you turn to your side you start to fall, i only made intersect object rays frontwards and backwards

here is the code



the fall# variable is used for other things like jumping, accelerated falling, etc. being on the ladder overrides those since it uses the fall# variable after the other things use it
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 6th Jun 2005 11:51
Yeah v2.03 has a few nice features to make it easier to use. You can save all of your ladder obj nums to an array and check to see if it hit a ladder using collisionobjhit. I did not know you had v2.01.

qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 6th Jun 2005 13:59
2.03 costs money heh

Login to post a reply

Server time is: 2024-11-21 14:23:31
Your offset time is: 2024-11-21 14:23:31