How do I use the map() function on C2

Get help using Construct 2

Post » Sun Feb 05, 2017 12:55 am

This is what the map function is in a simple javascript program: https://p5js.org/reference/#/p5/map

I need to know this to make the length of the health sprite be the value of the actual health without changing at a different rate.
B
47
S
18
Posts: 38
Reputation: 3,696

Post » Sun Feb 05, 2017 1:11 am

There's no map function or any analogue to it in C2 as far as I remember.
But If your health is on the bar and you want it to represent current percents there's good & easy formula for it
Code: Select all
(235/100)*Hero.Health
Where "235" - width of health bar
I'm a Magician, not a Developer.
B
26
S
9
G
25
Posts: 125
Reputation: 14,596


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], Sal1mus and 21 guests