playMaker

Author Topic: Pick ups not adding time correctly to Countdown [SOLVED]  (Read 1840 times)

OddButAwesome

  • Playmaker Newbie
  • *
  • Posts: 49
    • Odd but Awesome Apps on Playstore
Pick ups not adding time correctly to Countdown [SOLVED]
« on: December 15, 2016, 10:18:07 AM »
Hi all,

Thank you for taking the time to read.

I am making an item pickup game with each level on a countdown timer. Various item pickups have a points value and a time add value. i.e. every pick up grants bonus seconds. small items give 1-2 seconds,  big items give 10 seconds. etc.

I test with 3 pick up items A, B & C. Each has 20 seconds, 40 seconds and 60 seconds bonus upon pickup (I am using big numbers so I can visually see the timer change). Each also has different points values.

Problem:
The points get added correctly. The time does not. If I pickup in order A, B then C then the time bonus is stuck at 20 seconds for each. 
If I pick up in reverse order C, B then A then a weird thing happens. The correct time bonus is applied from C (60 secs) but B then A minus 20 seconds each.

The player should be able to pickup in any random order.

I believe I am using the same method of acquiring points as acquiring time so they should both work but they don't. Points is fine, time is not.

Image01: Item Pickup shopwing points (working) and Time(not)
Image02: Time Manager game object
Image03-04: Player object Pickup Manager

It's been quite a few days now and I am willing to try anything. Any help would be super awesome.

Thank you in advance.
« Last Edit: December 18, 2016, 11:35:06 AM by OddButAwesome »

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Pick ups not adding time correctly to Countdown
« Reply #1 on: December 16, 2016, 03:52:45 AM »
On your countdown state- untick every frame as its not needed as you have a next frame action in that state- right click in the state and make it an Action Sequence- the actions are probably not firing in the correct order
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

OddButAwesome

  • Playmaker Newbie
  • *
  • Posts: 49
    • Odd but Awesome Apps on Playstore
Re: Pick ups not adding time correctly to Countdown
« Reply #2 on: December 16, 2016, 05:56:38 AM »
Thank you @mdotstrange, =)

I will try that and let you know.

Cheers
JG

OddButAwesome

  • Playmaker Newbie
  • *
  • Posts: 49
    • Odd but Awesome Apps on Playstore
Re: Pick ups not adding time correctly to Countdown [SOLVED]
« Reply #3 on: December 18, 2016, 11:34:09 AM »
Hi all,

Thank you to all who have taken the time to read. I have found a solution that allows me to have a level countdown timer and item pick ups that add # seconds when player touches them. I will be adding mobs/obstacles that reduce the time when struck but I am pretty sure negative values will work in the same manner.

I am certain that people out there smarter than I may have a better solution but this one seems to work for me so far. :)

I hope this helps those who may want to add this to their game.

Please let me know if you have any Qs or suggests.

Cheers
JG