2018-07-09 04:26:20

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

2018-07-11 12:10:27

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.

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988

2018-07-12 17:20:29

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.

I don’t believe in fighting unnecessarily.  But if something is worth fighting for, then its always a fight worth winning.
check me out on Twitter and on GitHub

2018-07-15 03:02:02

Hi Test Mode Insiders,

If you get in contact with me, I'd be happy to help you. smile Add me on skype, darkflier01, or email me at [email protected].

I've been going by Bryn, which is now reflected in my profile. Please do your best to respect this :) Mess ups are totally OK though, I don't mind and totally understand!
Follow on twitter! @ItsBrynify
Thanks, enjoy, thumbs up, share, like, hate, exist, do what ya do,
my website: brynify.me