Change Player Velocity Action: Difference between revisions
(Initial content) |
mNo edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
An action to alter a player's velocity. | An action to alter a player's velocity. | ||
The action can set, add, subtract, multiply or divide a | The action can set, add, subtract, multiply or divide a player's score. When dividing, the value will always be rounded down to the nearest whole number. | ||
Does nothing if the target isn't a player. | Does nothing if the target isn't a player. Can only be used in [[Minigame Mod]]s. | ||
== Action Settings == | == Action Settings == | ||
[[File:ChangePlayerVelocityAction.png|thumb|600px|The Change Player Velocity action. Here the player will be given an upwards boost.]] | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 12: | Line 13: | ||
| '''Speed''' || The value to modify the player's velocity by. | | '''Speed''' || The value to modify the player's velocity by. | ||
|- | |- | ||
| '''Operation''' || What should be done to the player's velocity. Set will apply the ''Speed'' value to the velocity. The other options will perform that mathematical function to the velocity. | | '''Operation''' || What should be done to the player's velocity. "Set" will apply the ''Speed'' value to the velocity. The other options will perform that mathematical function to the velocity. | ||
|- | |- | ||
| '''Space''' || What should the ''Direction Type'' and ''Operation'' be relative to. World is relative to the world origin and axis directions. Local is relative to the player's current position and facing direction. | | '''Space''' || What should the ''Direction Type'' and ''Operation'' be relative to. "World" is relative to the world's origin and axis directions. "Local" is relative to the player's current position and facing direction. | ||
|- | |- | ||
| '''Direction Type''' || Which direction or axis of the player's velocity should be affected by the ''Operation''. Of note are ''Towards Source'' and ''Towards Receiver'' which will operate on the velocity in the direction between the player and the gameobject that is performing this action. | | '''Direction Type''' || Which direction or axis of the player's velocity should be affected by the ''Operation''. Of note are ''Towards Source'' and ''Towards Receiver'' which will operate on the velocity in the direction between the player and the gameobject that is performing this action. | ||
Line 24: | Line 25: | ||
[[File:BounceExample.gif|thumb|right|Bouncing on spheres using Triggers with Set Player Velocity Actions]] | [[File:BounceExample.gif|thumb|right|Bouncing on spheres using Triggers with Set Player Velocity Actions]] | ||
One fun use is to use the ''Towards Source'' option of ''Direction Type'' with a spherical trigger. Have it set the velocity to some value, around 12 works well, and it will repel the player, like a large bouncy ball. Combine this with a spherical | One fun use is to use the ''Towards Source'' option of ''Direction Type'' with a spherical trigger. Have it set the velocity to some value, around 12 works well, and it will repel the player, like a large bouncy ball. Combine this with a spherical prop with no collision to really sell the idea that the player is bouncing on something. | ||
[[Category:Actions]] | [[Category:Actions]] |
Latest revision as of 02:39, 16 December 2022
An action to alter a player's velocity.
The action can set, add, subtract, multiply or divide a player's score. When dividing, the value will always be rounded down to the nearest whole number.
Does nothing if the target isn't a player. Can only be used in Minigame Mods.
Action Settings
Property | Description |
---|---|
Speed | The value to modify the player's velocity by. |
Operation | What should be done to the player's velocity. "Set" will apply the Speed value to the velocity. The other options will perform that mathematical function to the velocity. |
Space | What should the Direction Type and Operation be relative to. "World" is relative to the world's origin and axis directions. "Local" is relative to the player's current position and facing direction. |
Direction Type | Which direction or axis of the player's velocity should be affected by the Operation. Of note are Towards Source and Towards Receiver which will operate on the velocity in the direction between the player and the gameobject that is performing this action. |
Uses
This action combines well with Trigger Components. By using a trigger to set the velocity, you can make a jump pad or boost pad that will send the player flying in a given direction.
One fun use is to use the Towards Source option of Direction Type with a spherical trigger. Have it set the velocity to some value, around 12 works well, and it will repel the player, like a large bouncy ball. Combine this with a spherical prop with no collision to really sell the idea that the player is bouncing on something.