Sorry if I ask too much but I figured this was worth a shot!
So I have an old gamemaker studio project that I want to do again but in unity and try it with ork,it was an action rpg with dungeon crawling elements,the game was topdown from a 2d perspective and the player had a basic melee weapon that would attack based on the direction he clicked from.
Currently I have all the movement and attack sprites as well as the weapon sprites and some enemies,I plan to use the top down camera and keep it static of course but my question comes from the following parts.
How would I do the attck system display the weapon when the attack is done and have it based on where the player clicks?,after having that set I should have everything else figured out by my own as I have been doing the tutorials and they have been pretty good as a learning tool for ORK
I.e. use Equipment Viewer component on the player/combatant to show the weapon, but limit it to only display when defined conditions are valid, e.g. using a game state (see this part of the tutorial).
Your attacks manage when the weapon is shown and hidden (via the conditions you defined) and do damage via damage dealers (unless you don't want to use actual physical hits for damaging. See this part of the tutorial.
As for the weapon displaying in the correct direction - that depends on your overall player setup. E.g. I'd recommend a setup where your root player object is rotating in the movement direction (or e.g. toward the click) and a child object displays the actual player sprite (using a Face Camera component to always display correctly).
That way you can e.g. just use a Rotate To node to rotate to the mouse position, and also drive your sprite directional animations via the rotation (can be forwarded in ORK's Mecanim animation setup to the animator controller).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Edit:NVM found the option guess I was so focused on getting it all set up I forgot to tick it
The dropped loot is created based on the item prefabs you defined. The default prefab for all is set up in Inventory > Inventory Settings, each individual item, equipment, currency, etc. can define their own custom prefab.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Of course with unity and ork I can make everything way fancier so I am excited to finish this project
Might be the animation itself, e.g. starting with an 'idle' frame in the movement animation instead of starting with a 'step' frame.
Might be animator controller (if you're using Mecanim) using exit times for the transitions, so the movement animation waits for the previous to finish, etc.
Could be different things - which player controls are you using, how's your animation setup, etc.?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
For example the player attacks to the uper left, the weapon object shows in the upper left as an Animation that has the hitbox and everything added pretty much the curren setup I have I only need a way to play the "swing" animations to show the damage area
Naturally, your weapon prefabs have to be set up for that.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Finally everything is working together as intended except for one detail I cant seem to figure and that is my enemy wont play its move animstion.
He is pretty much a copy of the player prefab and uses its own Animation, but for some reason even when moving he stays idle, at times the movement Animation seems to flash as if it was trying to show itself.
When using the inspector the enemy speed constantly goes up and down all the way to 0,of course I am working on 2D.
Another thing is that I set one move Animation for all the movement direction since I have the enemy also able to look where its moving so thats whats not playing at all.
I could try later to share some pictures of the set up if that helps since its really giving me Some trouble
How's the combatant moved and what Update Mode is set for the used prefab?
In short - when moving via rigidbody, the update mode should be set to Fixed Update since the movement speed has to be determined in the physics frame.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!