AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity StepSize (https://forums.alliedmods.net/showthread.php?t=89763)

shine771 04-10-2009 07:57

Entity StepSize
 
My problem:
[IMG]http://img26.**************/img26/2641/problemt.jpg[/IMG]
My entities stop where slopes collide with flat ground. They are just blocked. I tried to move them few units up in touch. Traced a line from the bottom of the entity to slope. If it collides in Entitysize / 2 + 1.0 then move it up 5units. But that failed too. Can anyone give me an example how to fix this glitch?

Thanks :).

shine771 04-24-2009 05:42

Re: Entity StepSize
 
This probably is a bump.

Hunter-Digital 04-24-2009 05:49

Re: Entity StepSize
 
You could look into HLSDK and see how the player is scripted into doing steps for going up stairs and stuff :}

One 04-24-2009 06:01

Re: Entity StepSize
 
hmmm..... idk maybe can this help?
PHP Code:

 for(new x=0;x<1;x++)
                
moveVeloc[id][x] *= -1.0;
                
            
g_move[id]++;
            
domove[id] = true


shine771 04-24-2009 06:04

Re: Entity StepSize
 
One, i don't really understand how could your code help...

lol, didn't though about HLSDK. I'll take a look.

One 04-24-2009 06:20

Re: Entity StepSize
 
ahh 4get it. i thinked just about anything else. but this is wrong what i wont to do. sry

shine771 04-26-2009 08:34

Re: Entity StepSize
 
I'm a bad searcher. Didn't find anything in HLSDK. Maybe someone can point where exactly it is or give a code example.

Anyway. I've got an entity with a model. Entity's angles are set according to surface. It adjusts the angles to ground. Probably moving the entity one unit up, when it touches the end of the slope would fix it.

Hunter-Digital 04-29-2009 11:40

Re: Entity StepSize
 
Hmm... have you or anyone else tried this:
Code:

#define MOVETYPE_WALK // Player only - moving on the ground
#define MOVETYPE_STEP 4 // Gravity, special edge handling -- monsters use this

?

stupok 04-29-2009 15:28

Re: Entity StepSize
 
In pm_shared.c in the HLSDK, the function "void PM_WalkMove ()" moves a player along the ground.

If I interpreted the code correctly, the way players move is like this:

1. Lift the player up a few units (stepsize).
2. Try to move the player forward.
3. If it worked, now try to move the player back down a few units (stepsize).
4. Go to step 1.

When you're sliding a box along the ground, it's not moving up over steps like players do. I'm not sure how to solve your problem, but I hope this gives you some insight into the problem.


All times are GMT -4. The time now is 02:16.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.