playMaker

Author Topic: [SOLVED] Floor / Ceiling??  (Read 2418 times)

mekoid

  • Playmaker Newbie
  • *
  • Posts: 35
[SOLVED] Floor / Ceiling??
« on: December 10, 2014, 10:48:48 AM »
Hi I am new to Playmaker.
I need some math functions such as "floor" and "ceiling".
I couldnt find any actions that can do those.
Any ideas please?
Thanks a lot!
« Last Edit: December 11, 2014, 08:54:02 AM by Lane »

Merto

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Floor / Ceiling??
« Reply #1 on: December 10, 2014, 11:17:12 AM »
If by floor and roof you mean something that blocks a number from going lower or higher, here's an artificial one I created with the compare action:





So that's a roof. Basically if the float variable's number goes higher than 1, it sends the roof event. Then the roof event sets the float variable's number back to 1 and it can't go higher.

mekoid

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Floor / Ceiling??
« Reply #2 on: December 10, 2014, 11:49:02 AM »
Hi Metro
Thanks for your reply. The actions that you did seem not enough to what I need.
I have a variable that changes with player's frequent inputs.
And I need to change the variable to its floor or ceiling value.
For example, when the value is 1.5 and the player presses up, it needs to become 2 , if the player presses down, 1.
And the value can be anything > 0.
So any other ideas?
There should be an action to customize math function for the variables....

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

mekoid

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Floor / Ceiling??
« Reply #4 on: December 10, 2014, 12:48:54 PM »
AH~~
Awesome!! Thanks very much.
But very strange I couldnt find it previously...

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Floor / Ceiling??
« Reply #5 on: December 10, 2014, 12:53:50 PM »
I just made them when I read this post. ;)
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D