3d running and jumping code almost finished
Blitz3D Forums/Blitz3D Beginners Area/3d running and jumping code almost finished
| ||
I managed to put together a pretty good walking jump, then I got it to work in 8 directions, then I got it to have a fixed path so you can't move unrealistically in midair. But now I'm stuck on getting all that to work on both walking and running jumps. Crazy stuff happens when you try to do that! I really tried this time to do as much of the work as I could before posting, but now I don't know what to do. Please help if you can. I thought I'd never get around to this part of my engine, and now it's almost done! |
| ||
Hey I'll try to help you with this. I have to change the code that I have so it's all one file but hey, RossC helped me with jump code, so I'll help you. The jumping code I have came from RossC and it's pretty simple. Just wait a lil bit and I'll smack it up on here soon. Hehe it's gettin me all gitty tryin to figure out which project I should extract the jumping code from. Edit: Ok here it is, it didn't take long. I tried making a sort of FPS engine which didn't go very far, but I have jumping! Just look at the UpdatePlayers function and try to understand how the status is set up, copy it all if you want to. Oh by the way I saw this error in your code Function JumpControl() If runstate="off" WalkingJump() If runstate="om" RunningJump() End Function Shouldn't it be "on" not "om"? |
| ||
Shouldn't it be "on" not "om"? Its always the dumb stuff in programming that gets you. If I ever have a serious problem, I look VERY carefully over all sections of code that are causing the error to make sure that I didn't misspell a variable. About 50% of the time I did :D |
| ||
I often make really retarded mistakes too. BUT I don't look for them like you do. Depending on the situation, I see what's going on with the variable or what ever is causing the problem and then backtrack sort of. Sometimes I use DebugLog to find certain problems, it's really helpful. |
| ||
Fixing the om should help, thanks Werdna. Gia, looking forward to trying what you did as always. |
| ||
Oh, Gia noticed the om. Anyway, Gia, do you think you could work your magic on my actual code? I tried the one you put up and that's not really what I want. Mine's like one step away anyway, I just don't know what that step is. I fixed the om, but as you can see... yeah, not exactly desirable results on the running jump. I'm not looking for flight. I will of course continue to try to fix this myself, but I thought I'd ask you since there are quite a few places in my engine now that say ;gias code |
| ||
I might try at some point, but not at the moment. |