Hi. I have a 3d map, but I cannot insert jump code into it. I have only been working with maps mainly with a bit of item and enemy code here. and there, but not much. It would be helpful if someone could write the jumping and falling code for me, or at least give me some pointers, as I don't want everyone to do everything for me, but if it's a basic function like jumping and falling if you did code it for me that would be fine with me. I can send it to anyone interested or if you just want to paste some jump code you know of and I can test it that works too. Thanks
I'm not providing any code. What you need to do is implementing a timer for going up and down, implement an integer, bool or what ever way you prefer to indicate if the player is going upwards(ascending) or coming downwards(descending). Also don't forget to implement an indicator that if the player is in process of jumping or not. Implementing this helps you to make player move faster while jumping for instance.
Other parts are clear. You need to move the player based on the indicator that indicates if the player is ascending or descending as soon as the key is pressed, check the possible solid objects benieff it, and as soon as it reached the object stop the jumping and play a landing sound if you like.
Or follow me on twitter @kianoosh shakeri
Depending on your level of programming skill, I would probably implement some sort of state machine or finite state machine like is talke about here.
Hi Test Mode Insiders,
If you get in contact with me, I'd be happy to help you. Add me on skype, darkflier01, or email me at [email protected]
Thanks, enjoy, thumbs up, share, like, hate, exist, do what ya do,
my website: masonasons.me
If this post is of any use, why not thumb it up?