playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Movement distance
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Movement distance (Read 1504 times)
deewahyu
Playmaker Newbie
Posts: 10
Movement distance
«
on:
August 28, 2014, 10:52:12 PM »
Hi... i want to create a logic to decrease energy of player every specific distance of movement. For example, every 100meter of movement, the energy will decreased by 0,5 % of energy. Which playmaker's action can i use? Thanks
Logged
jess84
Hero Member
Posts: 515
Re: Movement distance
«
Reply #1 on:
August 29, 2014, 01:59:11 AM »
You probably want to calculate the time spent moving, rather than a distance - so it decreases even if the player runs around in a circle.
I would probably use a float add action and detect when my player is moving, and increase the float value. (stopping the float if the player stops moving).
then link the health value to the 'player movement' float.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Movement distance