VPX Documentation

Gate

4min

Variables

Variables are items in vpx you can set, adjust or call.

Call

Detail

Example

Name(string)





X(float)





Y(float)





Length(float)





Height(float)





Rotation(float)





TimerEnabled(bool)





TimerInterval(int)

set interval for triggering the timer (1 equals 1000 timer calls per second, 1000 equals 1 timer call per second, -1 makes it dependent on the FPS that a user can reach)



Open(bool)





Material(string)





Elasticity(float)





Surface(string)





UserValue(any)

can store any user defined value for re-use later-on



CloseAngle(float)





OpenAngle(float)





Collidable(bool)





Friction(float)

0..1



Damping(float)

How quickly the gate's momentum dissipates. High values with low gravity factor will seem like they don't move freely. High values with high gravity factor will move very rapidly.



Visible(bool)





ShowBracket(bool)





CurrentAngle(float)

only readable, it returns the current open angle



GravityFactor(float)

How "heavy" the gate is. Usually between 1..3. Use this in combination with adjusting the damping value to get appropriate swinging action.



Methods

Methods are procedures or actions that you can fire in VPX.

Call

Detail

Example

Move(int dir, float speed, float angle)

dir(0/1)



Events

Event

Detail

Example

_Init





_Timer





_Hit





_EOS





_BOS





JS




Updated 25 Mar 2024
Doc contributor
Did this page help you?