playMaker

Author Topic: In a tough spot, trying to get some basic gameplay working  (Read 2719 times)

spiralKing

  • Junior Playmaker
  • **
  • Posts: 50
In a tough spot, trying to get some basic gameplay working
« on: April 03, 2013, 04:36:08 PM »
Hi everybody

I'm new here, I've been using playMaker for a few hours now, and reading some of the posts and it’s amazing how fast people reply here, with other forums you have to wait days, only to get the all too familiar “this has been asked before” response

I just have so many questions, see I'm working a small project which I'm supposed to get done by Monday

My questions

1. I followed the 3rd person controller tutorial, and got my Playable Character (PC) moving relative to the camera, but I can't get the camera to follow the PC without rotating when the PC makes a turn
I want the camera to follow the PC in the Z axis (back & forth), but not rotate in the X and Y axis (left & right, up & down)


2. I'm trying to get my PC to Evade left, right, back and forward like in God of War, how might I do this in playMaker (I'm using a character controller)


3. I also wanted to implement a simple health system, where if the PC gets hit, I'm able to switch his run animation and subtract his run speed with each hit taken, so say he has 4 GUI images on the HUD, every time he gets hit he loses one GUI and he gets slower and when his out of GUIs he stops moving altogether


4. Last thing, a simple AI, where an NPC follows the PC if he gets in a certain range and when the NPC is a lot closer to the PC it triggers a Ram attack in a straight line from the NPC, kinda like a bull charging at someone, but the NPC won't be able to rotate to the PC's new position (if the PC Evades the attack) before the attack is finished
I kinda got this working but it's coded (in java and glitchy)


Sorry to ask so many questions
I'm in tough spot here, if you can help with even just one of these questions I'd really appreciate it

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: In a tough spot, trying to get some basic gameplay working
« Reply #1 on: April 03, 2013, 05:50:21 PM »
1. I followed the 3rd person controller tutorial, and got my Playable Character (PC) moving relative to the camera, but I can't get the camera to follow the PC without rotating when the PC makes a turn
I want the camera to follow the PC in the Z axis (back & forth), but not rotate in the X and Y axis (left & right, up & down)

Are you using the PC as a parent to the camera? If you do not want to inherit its rotation, then don't parent it. Use a Smooth Follow action on the camera FSM and tweak the settings until it is like you want.

Quote
2. I'm trying to get my PC to Evade left, right, back and forward like in God of War, how might I do this in playMaker (I'm using a character controller)

Not sure how it works in GoW, is it like a dodge move?

Quote
3. I also wanted to implement a simple health system, where if the PC gets hit, I'm able to switch his run animation and subtract his run speed with each hit taken, so say he has 4 GUI images on the HUD, every time he gets hit he loses one GUI and he gets slower and when his out of GUIs he stops moving altogether

Setup collision events on a damage handler FSM that does an event when there is a collision with a projectile/attack. You can put any actions you want to occur in there. Just have it change the GUI and subtract from the variable that is used for the characters' speed. It would be easy if you made it a global variable.

Quote
4. Last thing, a simple AI, where an NPC follows the PC if he gets in a certain range and when the NPC is a lot closer to the PC it triggers a Ram attack in a straight line from the NPC, kinda like a bull charging at someone, but the NPC won't be able to rotate to the PC's new position (if the PC Evades the attack) before the attack is finished
I kinda got this working but it's coded (in java and glitchy)

This is some basic AI. You first need a collider or a distance trigger to engage alert/follow mode. You can use Look At or Smooth Follow to make the enemy Aim at the player while it is in alert/follow mode and then apply your transform/physics to move it forward after it is looking at the player. Another collider for attack range or a distance test will trigger the Ram/Attack event, which would change the speed variables and do a wait, or whatever for recovery, then return to follow mode.

AI is all about modes, states, triggers.. What do you want him to do? Attack? Think about what triggers the attack - range? Then setup a range check in some form, then run an event when the prerequisites are met so that the Attack is engaged.

Once you get more familiar with the actions you will start finding out how the system works and throw things like this together pretty quickly. Use the search filter in the action browser and see if there is something named exactly what you want. Often you'll get close and find a place to start.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

spiralKing

  • Junior Playmaker
  • **
  • Posts: 50
Re: In a tough spot, trying to get some basic gameplay working
« Reply #2 on: April 03, 2013, 09:54:18 PM »
Lane

Quote
1. Are you using the PC as a parent to the camera? If you do not want to inherit its rotation, then don't parent it. Use a Smooth Follow action on the camera FSM and tweak the settings until it is like you want.

I got the camera working without inheriting the PC's rotation, but when I move the PC it's kinda choppy, like there is resistance or a slow frame rate or something


Quote
2. Not sure how it works in GoW, is it like a dodge move?

Evade

and this is close to what I was trying to do with the Ram attack

God of War is kinda brutal, just so you know


Quote
3. This is some basic AI. You first need a...

I've been trying the things you suggested, I haven't gotten to (3) yet

I haven't figured everything out, but at least I now have some stuff working, thank you


Quote
Once you get more familiar with the actions you will start finding out how the system works and throw things like this together pretty quickly

and this was encouraging, I was ready to just about give up