User Tools

Site Tools


prpl:docs:setbondmovementparams

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
prpl:docs:setbondmovementparams [2015/03/04 15:57] – external edit 127.0.0.1prpl:docs:setbondmovementparams [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-<- [[pf:alphabetic_list_of_commands| Alpha List of Commands]] <-[[class link]] <-[[pf:prpl_information|PRPL home]] <-[[pf:start| Game 4 home]]   
-=====  SetBondMovementParams   ===== 
- 
-^Arguments^Result^Notation^ 
-|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: 
-^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. 
- 
-=== 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. 
-<code> 
-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) 
-</code> 
- 
  
prpl/docs/setbondmovementparams.1425484627.txt.gz · Last modified: 2025/02/14 14:56 (external edit)