2014/07/31

Swordfighting!

Hi, Lussy here.

We’re progressing with the game, even if it seems like we’re just lazing around not doing anything. I’m working on weapon scripts at the moment, while Geril is creating the 3rd player character’s model and working on Eslie and the bobcat too. The bobcat has lots of placeholder combat animations, so I started working on a more serious combat system (until now it was very simple). I’m going to talk about these scripts now, in hope of either helping out someone, or someone telling me why they suck. Remember, I’m not an experienced scripter, I just get an idea and then try to make it work. So with that said, let’s begin.

The current combat system consists of 3 possible combat animations being played. The first one simply plays when you push the attack button, and the second and third ones appear if you successfully maintain a combo. Until now, all this was simply based on timers in the script, but right now I’m experimenting with AnimNotifies. It works like this:

-Player presses the attack button. The combat animation starts.

-When the animation gets to the point where it should start dealing damage, an animnotify calls the function for tracing the swing, and when it shouldn’t deal any more damage, another animnotify stops the tracing process. This way if the animation has a part where the sword is held stationery, it won't hurt anyone.

-There are also two animnotifies for doing combos. They mark the two points in between which the player can push the attack button to continue the combo.

-The last animnotify marks where the second animation should play, if the player wants to continue the attacking combo. If there wasn’t any input, the current animation simply finishes and the player gets back to the idle state.


I needed to do lots of planning to make this work, and I’m still not sure if it’s going to stay (there are lots and lots of ways it can make the weapon stop working altogether, as of now.). If any of you know any better, please don’t hesitate to comment.

Players can have two weapons with them (and some more in their bags, which can only be accessed while out of combat), though only one can be equipped at a time, the other one will be sheathed. Right now, only the sword has the combo system mentioned before, the axe is still very primitive, but functional. Obviously, the axe will be slower but stronger.


The sword only has these really slow animations for debugging purposes. It will be a quick weapon in the final game, with great mobility.

Planned combat speed

That's about it, for now. See you next time!