playMaker

Author Topic: Need a Example of Player Attack  (Read 5123 times)

zaccom

  • Playmaker Newbie
  • *
  • Posts: 10
Need a Example of Player Attack
« on: May 07, 2013, 01:28:05 AM »
Does anybody have a example on player attack in playmaker for melee attacks. Thanks.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Need a Example of Player Attack
« Reply #1 on: May 07, 2013, 07:42:34 AM »
You'll need to be more specific.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

zaccom

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Need a Example of Player Attack
« Reply #2 on: May 07, 2013, 11:07:18 AM »
I having issues setting up melee attacks. I need example on how to set that up or a example how someone setups punch or sword attacks.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Need a Example of Player Attack
« Reply #3 on: May 07, 2013, 01:48:26 PM »
Top down? Platformer? Third person? First person? Turn based? 2d? 3d? Mouse button to fire? Keyboard to fire?

What exactly is the problem? It seems like even with very basic playmaker understanding you could probably create what you want with the Get Key and Rotate actions provided and go from there. Is there a bigger issue you need an answer to? Are you having trouble getting the collisions to work? Handling health? Making it run an animation?

It's hard to understand the issue with such a generic request.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

zaccom

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Need a Example of Player Attack
« Reply #4 on: May 07, 2013, 04:14:18 PM »
2.5d side scroll. I just have a issue take away enemy health from a variable. Do i need to make a collider box, raycast, or something easier to take away health from enemy.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Need a Example of Player Attack
« Reply #5 on: May 07, 2013, 04:44:19 PM »
So theres a huge number of ways to approach the health thing..

The first thing I would try to see if works for your situation is:

  • Put a collider on the weapon (a box or something should be fine).
  • Put a collider on the enemy.

Now you can actually clash the weapon and the enemy.

  • In your attack routine add a Collision Event (Action)
  • Store Collider, thats the enemy you hit.

Now you have the clash info, so when you attacked and there was a hit the action will trigger and store the enemy you hit into a variable

Add a Send Event action, choose game object, specify game object, and choose that collider/enemy variable you just stored. On the enemy you can make a state that handles subtracting the health. Which is basically just Float Subtract locally and then a return to idle state for the health management FSM.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

zaccom

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Need a Example of Player Attack
« Reply #6 on: May 11, 2013, 04:46:20 AM »
Thanks but any screenshots?