playMaker

Author Topic: difficulty with character control  (Read 6029 times)

SStru1987

  • Playmaker Newbie
  • *
  • Posts: 18
difficulty with character control
« on: January 21, 2014, 11:35:39 AM »
I'm creating a game (2.5D) where the character falls and I'm trying to guide him past obstacles (he will be moving along only on the horizontal axis). I tried following the showcase page on Add Force and I'm not having any luck. Is there a suggested way of a FSM I should setup? Sincerely would appreciate it

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: difficulty with character control
« Reply #1 on: January 21, 2014, 11:56:50 AM »
What isn't working with add force? Can you post an example of what you're having trouble with?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

SStru1987

  • Playmaker Newbie
  • *
  • Posts: 18
Re: difficulty with character control
« Reply #2 on: January 21, 2014, 12:03:36 PM »
If you reference the showcase page for AddForce, It will be easier to follow along. I set it up the same way

What I want to happen is control my character using J= Slide Right & F = Slide Left. I've decided on this because I want to recreate the feeling of playing at an arcade machine.
 
What transitions, events and variables should I use to control my character as he slides left or right along the X axis? The overall mechanic is falling through level on a 2.5 view to dodge obstacles and enemies.

I appreciate your feedback and help


SStru1987

  • Playmaker Newbie
  • *
  • Posts: 18
Re: difficulty with character control
« Reply #3 on: January 21, 2014, 12:06:46 PM »
To better explain, I'm trying to add move left and right only without jumping or running.

when he falls I want to recreate how you direct this characters fall

http://jnamobile.com/samples/2DPlatformController/HeroSample.html

SStru1987

  • Playmaker Newbie
  • *
  • Posts: 18
Re: difficulty with character control
« Reply #4 on: January 21, 2014, 12:08:50 PM »
except he slides fast to right or left

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: difficulty with character control
« Reply #5 on: January 21, 2014, 12:13:15 PM »
If you just want to add some force when you push a button then you can do it in one state

Get Axis (store float as inputFloat) [every frame]
Add Force (on an axis use inputFloat) [every frame]

Adjust Get Axis multiplier as needed and adjust Add Force Force Type as needed.

No input results in a zero for Get Axis, which means no force is added.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

SStru1987

  • Playmaker Newbie
  • *
  • Posts: 18
Re: difficulty with character control
« Reply #6 on: January 21, 2014, 12:20:14 PM »
You said: If you just want to add some force when you push a button then you can do it in one state

Get Axis (store float as inputFloat) [every frame]
Add Force (on an axis use inputFloat) [every frame]

Adjust Get Axis multiplier as needed and adjust Add Force Force Type as needed.

No input results in a zero for Get Axis, which means no force is added.




Do I add this state on the Slide Right/LEft states? How should I implement what you said in PlayMaker?

SStru1987

  • Playmaker Newbie
  • *
  • Posts: 18
Re: difficulty with character control
« Reply #7 on: January 21, 2014, 02:19:57 PM »
I'm still confused on how to implement what you said in PlayMaker for the character

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: difficulty with character control
« Reply #8 on: January 21, 2014, 02:32:57 PM »
You only need one state. You can get the axis and apply the force every frame in the same state.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

SStru1987

  • Playmaker Newbie
  • *
  • Posts: 18
Re: difficulty with character control
« Reply #9 on: January 21, 2014, 03:31:04 PM »
No luck so far. I really need help and pulling my hair out. could you outline the steps of what I need to do in Playmaker?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: difficulty with character control
« Reply #10 on: January 21, 2014, 03:55:03 PM »
This is all it takes to push an object around. Adjust the Multiplier in Get Axis for more/less force.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

SStru1987

  • Playmaker Newbie
  • *
  • Posts: 18
Re: difficulty with character control
« Reply #11 on: January 21, 2014, 04:10:49 PM »
where it says 'store' on "Get axis" is that a variable? if so, whats the type?

SStru1987

  • Playmaker Newbie
  • *
  • Posts: 18
Re: difficulty with character control
« Reply #12 on: January 21, 2014, 04:13:46 PM »
Its applied, now how can I steer him by sliding left or right, because when I run it he always goes right

SStru1987

  • Playmaker Newbie
  • *
  • Posts: 18
Re: difficulty with character control
« Reply #13 on: January 21, 2014, 04:16:19 PM »
nvm, I got it!!! Thank you so much!

SStru1987

  • Playmaker Newbie
  • *
  • Posts: 18
Re: difficulty with character control
« Reply #14 on: January 21, 2014, 04:17:28 PM »
Last question, how do you map it to other keys? (As previously stated J=Right and F=Left)