Top

Secret Chronicles of the Scripting API documentation

Class BeetleBarrage

Parent: Enemy

The Beetle Barrage is a giant plant that spits out a number of small bugs at a time to defend itself when Alex comes in range. They generally don’t move (unless you script them to), but the bugs are very vivid (see Beetle if you want to generate some of them standalone).

Events

Spit

Whenever this enemy spits out beetles, this event is triggered. Note there is only one event for one beetle bulk, the event is not triggered for each single beetle.

Class Methods

new

new() → a_beetle_barrage

Creates a new instance of this class.

Return value

A new instance.

Instance Methods

active_range

active_range() → a_float

Returns the radius in which the plant reacts on Alex.

active_range=

active_range=( range ) → range

Sets the radius in which the plant reacts on Alex, i.e. in which it will spit out beetles.

Parameters

range

Range radius.

fly_distance

fly_distance() → a_float

Returns the number of pixels generated bugs fly upwards before flying around randomly.

fly_distance=

fly_distance=( distance ) → distance

Set the distance which the bugs fly upward before flying randomly into all directions.

Parameters

distance

The number of pixels to fly up before starting randomness.

spit_count

spit_count() → an_integer

Returns the number of bugs to spit out at a time.

spit_count=

spit_count=( count ) → count

Sets the number of bugs spit out at a time.

Parameters

count

Number of beetles to spit out.