This is an old revision of the document!
~~DISCUSSION~~ <- Alpha List of Commands <-class link <-PRPL home <- Game 4 home
| Arguments | Result | Notation |
|---|---|---|
| Bond UID, type, min distance, max distance, period, phase | None | i1 i2 f1 f2 f3 f4 – |
Determines the behaviour of a bond. The possible values for “type” are:
| Type | Description |
|---|---|
| 0 | Rigid. Always maintains a fixed distance between the particles. The min and max arguments seem to be ignored. |
| 1 | Sinusoidal. The distance oscillates between min and max. |
| 2 | Toggle. The distance switches between min and max, causing the particles to move instantly. |
The argument “period” is time taken for one complete cycle in frames; one second is 30 frames. “phase” determines where in the cycle the bond should start. For sinusoidal oscillation, phase 0.25 is the maximum length and 0.75 is the minimum.
| Standard CRPL | bond type d1 d2 period phase SetBondMovementParams |
| Warp notation | SetBondMovementParams(bond type d1 d2 period) |
Create two particles whose separation oscillate between 20 and 40. The period is 30 frames = 1 second.
CreateParticle(CurrentPixelCoords 20 add 0 20 1 1) ->p1 CreateParticle(CurrentPixelCoords 20 sub 0 20 1 1) ->p2 CreateBond(<-p1 <-p2 1 40) ->b SetBondMovementParams(<-b 1 20 40 30 0)
case STATEMENT.SETBONDMOVEMENTPARAMS:
f4 = GetFloatFromStack(); // phase
i3 = GetIntFromStack(); // time
f2 = GetFloatFromStack(); // max length
f1 = GetFloatFromStack(); // min length
i2 = GetIntFromStack(); //Signal waveform Type
i1 = GetIntFromStack(); //Bond UID