I am going to start into making a 3rd Person Rpg and I have some questions I would appreciate if someone could help me with.
Thank you ahead of time.
Please do not feel you must answer all of them just as many as can if you would please. I wanted to not spam the blog with multiple posts.
How would you approuch zones, for example using multple scenes for 1 world how would you keep everything consistant while changing scenes, money, health, finished and earned rewards and position in story,inc…
How would you control the player, I want to have him wield a sword able to look up and down and based on were he swings at deal dmg in that way. if person on a hill next to him he has to look up with arms and sword and swing at him. Im not sure how I would make him only move arms to look up and then use seperate swing animations.
3)How do you start making items systems, and make hit box type of system (hit head, or legs incc…)
4)How to make a crouching system so can actually crawl along walls, and possibly a hanging from edge system.
A- PlayerPrefs : Which can be used to store game data ( numeric and strings ) see here
B- DontDestroyOnLoad : if you use this one on a gameObject " DontDestroyOnLoad(HudHpBar) " it will remain untouched when a new scene loads. see here
2- Its all about Animations, unity’s animation system is powerful enough to accomplish what you want, that I know, but sadly I cant help you much because I haven’t worked with animations that much .
3- Item system :
Well there is no system persay, you gotta use logic to find out if a player got an item (bought it, looted it, etc…) and create a way the player can use the item , what comes to mind is a GUIButton. Subjects you might want to read about :
A- GUI
B- OnTriggerEnter ( for physically picking the item up for example )
C- Some programming Logic that link the getting of the items, to the GUIButtons, and link CLICKING on those GUIButtons to the Players stats or hp or whatnot.
3- Hit Box System : Unity does that already using Colliders (Sphere, Box, Mesh, etc…) So what you want is to attach a Box or Sphere collider ( use sphere if you can, its cheaper on the resources ) to an enemy and make it a trigger , and have something like this on your character.
var heroCanAttack : bool = false;
4- A crouching system is easy, when the player hits the crouching button you make the code do two things :
a- Switch the player’s animation from “run” to “crouch”
b- change the size of the player’s gameObject’s Collider : You can change the x,y,z of a box collider, or the radius of a sphere collider as you wish.
c- (optional) change the characters movement speed.