Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: intrikit on July 14, 2015, 03:36:08 AM

Title: Top Down Shooter Controller
Post by: intrikit on July 14, 2015, 03:36:08 AM
This is more of a general question and not so much about a specific technical issue. This is more like a question about approach and concept.

I just purchased a Top Down Shooter controller off of the Asset Store and it's made with PlayMaker. The package includes an animated (Mecanim) model with a pistol. It shoots and kills enemies and there is a camera rig that follows it. It all works well and seems like a great starting point.

Seeing that the only weapon supported by this controller is a Pistol, I want to add support for a Rifle and Melee mode. So my approach would be to copy the Pistol FSM and create two other versions for the Rifle and Melee, then adjust accordingly ie. use appropriate animations, firing rate, ammo etc.

These FSM would then be activated if the player acquires the corresponding weapon (the melee FSM being the default running FSM).

Anyway, I hope this "question" makes sense as I know it's quite broad. I just wanted to get opinions if this is the right approach or if there might be better solutions.
Title: Re: Top Down Shooter Controller
Post by: djaydino on July 14, 2015, 07:01:11 AM
Hi,
I think that's fine.
I "copy/paste" a lot when possible, it saves a lot of work.

only for melee i might do from scratch as it works different than the rifle.
Title: Re: Top Down Shooter Controller
Post by: Lane on July 14, 2015, 07:33:33 AM
Sounds pretty normal to me.

If the kit is laid out properly then you shouldn't have much trouble making that pistol into a rifle but Melee will be a different matter and there are lots of ways to go about doing that system.
Title: Re: Top Down Shooter Controller
Post by: intrikit on July 14, 2015, 04:31:26 PM
The base of the default Pistol FSM though is well-done. It might take a bit more modification to use it for the Melee mode, but it's got a good set up for how it interacts with Mecanim. Off the top of my head, the only thing I can think of that needs switching is a punching mechanic that will take the place of a firing mechanic.

Anyways, I will post updates on progress when I get deeper into it. I think it's worth a try to use it as a base for all modes.

Thanks for your input! I just wanted to run it through more experienced PM users.
Title: Re: Top Down Shooter Controller
Post by: intrikit on July 22, 2015, 04:04:34 AM
So instead of creating different versions of the same FSM for a weapons change system, I just took another controller (third person) from the same vendor which had a weapons change system built in and merged it with the top down camera from the other asset.

It took some effort hooking it all up but I think I am close to figuring it out. I'm encountering a problem though in which the player moves according to where the mouse is aiming (as you would want it for a third person over the shoulder view) as opposed to moving according to the top down camera. It makes for a very awkward experience.

The movement is using root motion in Mecanim. I know it's a bit vague as it will take a while to detail out the complexities, but any ideas would help!