playMaker

Author Topic: Movment Check & Charging Meter  (Read 2506 times)

Col. Phil Bilko

  • Playmaker Newbie
  • *
  • Posts: 45
Movment Check & Charging Meter
« on: October 24, 2014, 05:07:01 AM »
Hello All;

I am working on a minigolf game and I am having trouble with a couple things.

Shot power charging. Right now I have a float that adds 100 every frame up to 500 before the mouse is let go for the shot to take place. However I want to have it hit 500 then minus 100 every frame until zero and then back up so the meter goes up and down until you release the mouse button.

Secondly I am having a reset shot issue, where I want to check to see if the ball is moving, if it has stopped, then reset so the player can shoot again.

Thanks for taking a look.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Movment Check & Charging Meter
« Reply #1 on: October 24, 2014, 09:41:48 AM »
For the charge up you can just transition into another state and animate the float backwards from 500. You've already done it forwards, just do with with subtraction instead in a second state.

Get Velocity should work to see if the ball is moving. If it is then just go to a state where it changes the position.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Col. Phil Bilko

  • Playmaker Newbie
  • *
  • Posts: 45
Re: Movment Check & Charging Meter
« Reply #2 on: October 26, 2014, 04:05:44 AM »
Thanks for your help :D I was able to get the power gauge working yesterday however I can not for the life of me get the check for movement to work.

Any example of this? As I am rather frustrated. Thanks again for your help.

« Last Edit: October 31, 2014, 04:10:40 AM by Col. Phil Bilko »

Col. Phil Bilko

  • Playmaker Newbie
  • *
  • Posts: 45
Re: Movment Check & Charging Meter
« Reply #3 on: October 31, 2014, 04:09:49 AM »
The power gauge now works as required and the game plays perfect EXCEPT I can not for the LIFE of me get this "MOVEMENT CHECK" stuff to work.

Basically I need to have the ball completely stop after it has been hit and then once stopped reset the shot so you can go again.

Right now I have a "Rolling" FLOAT that stores the data pulled from the balls "rigidbody.velocity.magnitude" and I am trying to check that to see if said object has stopped and then trigger the next event which is reset. Please help me resolve this as I have spent all day on this to no avail. I am ripping out my hair here hahaha.

Thanks for reading.

Col. Phil Bilko

  • Playmaker Newbie
  • *
  • Posts: 45
Re: Movment Check & Charging Meter
« Reply #4 on: November 02, 2014, 02:33:34 AM »
No one at all ? Yikes! any help would be appreciated as this is a major hiccup in the game play that I am having major issues resolving.

Thanks

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Movment Check & Charging Meter
« Reply #5 on: November 03, 2014, 03:04:09 PM »
Why does Get Velocity not work? Store the vector3 and compare it to 0,0,0 every frame. If it ever is non equal to 0 then it must be moving.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D