This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
prpl:docs:createbond [2015/03/04 15:52] – external edit 127.0.0.1 | prpl:docs:createbond [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <- [[pf: | ||
- | ===== CreateBond | ||
- | ^Arguments^Result^Notation^ | ||
- | |Particle UIDs, visible, distance | Bond UID | '' | ||
- | |||
- | === Description === | ||
- | Creates a bond between two particles. Set " | ||
- | |||
- | The command returns the bond UID, which can be passed to other bond related commands like [[pf: | ||
- | |||
- | === How to use === | ||
- | |||
- | | Standard CRPL | p1 p2 visible distance CreateBond | | ||
- | | Warp notation | CreateBond(p1 p2 visible distance) | | ||
- | |||
- | === Examples === | ||
- | |||
- | Create two particles with a fixed distance of 40 pixels moving to the right, and capture the bond UID. | ||
- | < | ||
- | CreateParticle(CurrentPixelCoords 20 add 0 20 1 1) ->p1 | ||
- | CreateParticle(CurrentPixelCoords 20 sub 0 20 1 1) ->p2 | ||
- | CreateBond(< | ||
- | </ | ||
- | Instead have them move in opposite directions; the bond forces them to rotate. | ||
- | < | ||
- | CreateParticle(CurrentPixelCoords 20 add 0 20 1 1) ->p1 | ||
- | CreateParticle(CurrentPixelCoords 20 sub 180 20 1 1) ->p2 | ||
- | CreateBond(< | ||
- | </ |