User Tools

Site Tools


pf:prpl:docs:setbondmovementparams

This is an old revision of the document!


<- Alpha List of Commands <-class link <-PRPL home <- Game 4 home

SetBondMovementParams

ArgumentsResultNotation
Bond UID, type, min distance, max distance, period, phase None i1 i2 f1 f2 f3 f4 –

Description

Determines the behaviour of a bond. The possible values for “type” are:

TypeDescription
0Rigid. Always maintains a fixed distance between the particles. The min and max arguments seem to be ignored.
1Sinusoidal. The distance oscillates between min and max.
2Toggle. 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.

How to use

Standard CRPL bond type d1 d2 period phase SetBondMovementParams
Warp notation SetBondMovementParams(bond type d1 d2 period)

Examples

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)
pf/prpl/docs/setbondmovementparams.1425484627.txt.gz · Last modified: 2025/02/14 14:56 (external edit)