Class: A_AttractX

b5. A_AttractX


new b5.A_AttractX(target, container, min_x, max_x, min_y, max_y, strength, stop, bounce){b5.A_AttractX}

actions/generic/attractor.js, line 35

Action that pulls objects towards or repels objects away on the x-axis that are within a specific range, does not exit

Created actions should be added to an actor or scenes actions list to be processed

For a complete overview of Actions see Booty5 Actions Overview

Name Type Description
target string:b5.Actor

Path to or instance of actor object that will attract other objects

container b5.Actor | b5.Scene

Path to or instance of object that contains the actors (actors that can be attracted have attract property set to true)

min_x number

Minimum x-axis attraction range

max_x number

Maximum x-axis attraction range

min_y number

Minimum y-axis inclusion range

max_y number

Maximum y-axis inclusion range

strength number

Strength of attraction, negative for repulsion

stop boolean

If set to true then attracted objects will stop when they hit the min distance range

bounce boolean

If set to true then objects when stopped at the min distance range will bounce

Type Description
b5.A_AttractX The created action