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: 37
Reputation: 3,684

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
22
S
8
G
25
Posts: 106
Reputation: 14,294


Return to How do I....?

Who is online

Users browsing this forum: AllanR, Artcadev, Yahoo [Bot] and 13 guests