You're still talking about the native commands though.
I asked about sparky's dll, because I dont see whats hard about understanding it. The commands are extremely basic.
SC_setupObject: Sets up an object to be used with sparky's dll. Obviously then, you would call this command filling in the appropriate parameters. The params are very basic as well.
SC_sphereSlide ( objNum, oldx, oldy, oldz, x, y, z, radius, excludeObj ): Again, whats so hard here? All parameters are explained. This command will generate the new positions an object should be placed for sliding collision. objNum is the object you're detecting collision with, a map object for example. oldxyz is the player's old x y and z position... and x y z is the player's new x y and z position. radius is the radius of the collision sphere used, whats a collision sphere? Exactly what it says, a sphere (not a sphere object, just a mathematical sphere) positioned at the user's position that checks if any polygons from a map or whatever object you're colliding with are inside of it. So it usually makes sense to use a radius equal to the y size of your player / 2.
Alright, so far so good. You set up your map object with SC_setup, store the player's old and new positions, call the sphereslide command, and lastly;
Quote: "The final collision point, normal and slide point are in getCollisionSlide(0), or by using
no parameter getCollisionSlide() (defaults to 0). see the sliding demo for an example usage of this command. "
- from the dll help files for the sphereslide command
We use the getCollisionSlideX(), getCollisionSlideY(), and getCollisionSlideZ() commands to get the new positions for our player, and position them accordingly.
Pseudo:
load map
load player
setup map for sparky's dll, with polygonal collision, in group 0
main loop
store old positions
control user movement
store new positions
call sphere slide command
newx = getCollisionSlideX()
newy = getCollisionSlideY()
newz = getCollisionSlideZ()
position user at newx, newy, newz
sync screen
repeat main loop
I understand you're still learning programming, but when the help files explain exactly what each command does, its not rocket science. Does this help or do you need a detailed demo?