playMaker

Author Topic: Scale object on click?  (Read 1045 times)

EpicMcDude

  • Playmaker Newbie
  • *
  • Posts: 45
Scale object on click?
« on: December 03, 2020, 10:00:10 PM »
Hey all,

I'm trying to figure out to set up an object that would continuously grow when you click on it.

I have a capsule with an FSM and I have an action for when the mouse clicks on the capsule, the Y scale grows by what I set it to be, but this isn't additive and only scales once with the action "Set Scale", i.e. capsule has 0.5 Y and on mouse click I set the scale to be 1.

Is there any way I can loop this action additively? So I can have the "Set Scale " action scale +1 on mouse click instead of setting it to just 1?

Thank you

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Scale object on click?
« Reply #1 on: December 04, 2020, 01:34:09 AM »
Use a float variable for y scale. When you click, use float add to add 1 to that float variable and set scale can use that variable's value for y value.
Available for Playmaker work

EpicMcDude

  • Playmaker Newbie
  • *
  • Posts: 45
Re: Scale object on click?
« Reply #2 on: December 04, 2020, 06:40:47 AM »
Use a float variable for y scale. When you click, use float add to add 1 to that float variable and set scale can use that variable's value for y value.

Perfect, thank you! First time I'm trying out variables and I didn't even thought of searching for a float add.

Thanks again