I've been busy this week doing a mix of Mage and Barbarian abilities.
MAGE
- I've added prototype versions of all her Defensive spells: Haven't added all their status effects (e.g. buffs and debuffs) but there is a fire shield which does set enemies and props in fire if they come in range of it, mainly because I had already set up the code for that and it was fairly easy to connect them
- Did a "dirty hack" to get the levitate spell working: This is a late-game spell, and I thought I'd have to do some complex switching between control methods, but instead I came up with a really cheap way of getting it to work - I added a small flat plane underneath the characters' feet that becomes active when the spell is triggered, making sure it was close enough to not set off the "player falling" code. At the same time I disabled the Y (height) movement of the character. Both of these combined makes the character controller think the player is still "on the ground", meaning when they walk off a ledge with the spell active they levitate in the air until it ends :D
- Tweaked the "shield" type spells: Most spells are a one-and-done affair which drain mana and then last for a set period, but I wanted the shield spells to be ongoing, meaning when they are activated they keep draining mana until either it runs out, or the player manually cancels them. Just gives the player a bit more control over them.
BARBARIAN
- Got the "Charging Boar" ability working: This is a quick rush forrward move that hurts enemies and pushes them and props out of the way. It was quite fiddly to set up for various reasons, but I eventually managed to connect it to the pre-existing enemy "push" code and send a force to them so they go flying, and had to add similar code to the props objects
- Created breakable walls for the Boar ability: The Barbarian can use the Charging Boar to smash down weak walls, so I created a prototype of this which is a trigger that checks if the Barbarian is inside it, then checks to see if the Boar attack is active. If so, it destroys the object. Obviously, for the final game this will trigger a smashing animation, but for now, this works fine.
​
GENERAL
- Moving platforms! You can't have a videogame without moving platforms, it's the law. This wasn't exactly simple to do either, but after some googling I found a couple of ways to do it, and the main one involved setting the player to be the child of the platform when they enter a trigger - meaning their world position is set to update with that of the platform, yet they can still be controlled by the player and jump/fall off.
And that's it for this week. Next week I'm going to be focusing on the Assassin and playing around with UMotion Pro to get some terrible animations in there. Lovely!
Tony.
0 comments