Actor dy: Difference between revisions
From Cobalt Wiki
More actions
fandomwiki>Fuzzyhed Created page with "{| border=2 cellpadding=3 cellspacing=0 style="margin: 0 0 1em 1em; border-collapse: collapse;" |- |style="background:#000430; font-size:150%;" colspan="3"|'''Actor.dy''' |- |col..." |
Koza1brada (talk | contribs) No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 12: | Line 12: | ||
local chosenActor = API.getPlayerActor()-- Use the modding API to get the player Actor | local chosenActor = API.getPlayerActor()-- Use the modding API to get the player Actor | ||
print(tostring(chosenActor.dy))-- Print the x velocity. | print(tostring(chosenActor.dy))-- Print the x velocity. | ||
[[Category:Official_Modding_API]] | |||
__INDEX__ | |||
Latest revision as of 11:07, 11 August 2025
| Actor.dy | ||
| This Property represents the y speed of an actor. Note: You must set this to the desired speed at a constant rate, otherwise it will not really set it. It should also be noted that this is more velocity than speed, as it will often teleport the player up or down. It should be also noted that the velocities seem to be inverted. | ||
| Returns | ||
| Y speed as an integer. |
local chosenActor = API.getPlayerActor()-- Use the modding API to get the player Actor print(tostring(chosenActor.dy))-- Print the x velocity.