Skip to content

JeyDotC/construct2-tank_movement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tank Movement

Type: Behavior

Moves an object as in the first versions of Resident Evil.

Properties

Name Type Description Options
Max speed float The maximum speed, in pixels per second, the object can travel at. Default value: 200
Acceleration float The rate of acceleration, in pixels per second per second. Default value: 600
Deceleration float The rate of deceleration, in pixels per second per second. Default value: 500
Turn Speed float The speed at which this object will turn in degrees per second. Default value: 360
Set angle combo Rotate the instance or not. Default value: Yes - No
- Yes
Default controls combo If enabled, arrow keys control movement. Otherwise, use the 'simulate control' action. Default value: Yes - No
- Yes
Initial state combo Whether to initially have the behavior enabled or disabled. Default value: Enabled - Disabled
- Enabled

ACES

Actions

Name Description Parameters
****
Stop Set the speed to zero.
Reverse Invert the direction of motion.
Set ignoring input Set whether to ignore the controls for this movement. - Input combo: Set whether to ignore the controls for this movement. Options: (Stop ignoring, Start ignoring)
Set speed Set the object's current speed. - Speed number: The new speed of the object to set, in pixels per second.
Set max speed Set the object's maximum speed. - Max Speed number: The new maximum speed of the object to set, in pixels per second.
Set acceleration Set the object's acceleration. - Acceleration number: The new acceleration of the object to set, in pixels per second per second.
Set deceleration Set the object's deceleration. - Deceleration number: The new deceleration of the object to set, in pixels per second per second.
Simulate control Control the movement by events. - Control combo: The movement control to simulate pressing. Options: (Left, Right, Forward, Backward, TurnLeft, TurnRight)
Set enabled Set whether this behavior is enabled. - State combo: Set whether to enable or disable the behavior. Options: (Disabled, Enabled)
Set vector X Set the X component of motion. - Vector X number: The X component of motion to set, in pixels per second.
Set vector Y Set the Y component of motion. - Vector Y number: The Y component of motion to set, in pixels per second.
Set Rotation Speed Set the rotation speed. - Rotation Speed number: The rotation speed in degrees per second.
Set Forward Angle Set the angle at which the object will move if forward is pressed. - Forward Angle number: The new forward angle in degrees.

Conditions

Name Description Parameters
****
Is moving True when the object is moving.
Compare speed Compare the current speed of the object. - Comparison comparison: Choose the way to compare the current speed.
- Speed number: The speed, in pixels per second, to compare the current speed to.

Expressions

Name Type Description Parameters
****
Get speed
Usage: MyObject.Tank Movement.Speed
number The current object speed, in pixels per second.
Get max speed
Usage: MyObject.Tank Movement.MaxSpeed
number The maximum speed setting, in pixels per second.
Get acceleration
Usage: MyObject.Tank Movement.Acceleration
number The acceleration setting, in pixels per second per second.
Get deceleration
Usage: MyObject.Tank Movement.Deceleration
number The deceleration setting, in pixels per second per second.
Get angle of motion
Usage: MyObject.Tank Movement.MovingAngle
number The current angle of motion, in degrees.
Get vector X
Usage: MyObject.Tank Movement.VectorX
number The current X component of motion, in pixels per second.
Get vector Y
Usage: MyObject.Tank Movement.VectorY
number The current Y component of motion, in pixels per second.
Get rotation speed
Usage: MyObject.Tank Movement.RotationSpeed
number The rotation speed in degrees per second.
Get forward angle
Usage: MyObject.Tank Movement.ForwardAngle
number The angle at which the object will move if forward is pressed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published