Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Routine: Lightning

1cec0ld edited this page Oct 27, 2012 · 2 revisions

Syntax: {location}.lightningeffect

Description: Routine that generates a lighting bolt at the specified location, or entity's location.

Examples:

Damage: #Make chickens unstable. Force players to hit them gently.
    - 'if target.type.Chicken and damage > 4':
        - 'target.lightningeffect'
Repeat:
    - 'thunder': 
        - 'if chance.50':
            - 'entity_world_loc(entity_x, entity_world_maxheight + 350, entity_z).lightningeffect'
Init:
    - 'if entity.type.player':
        - 'entity.start.thunder.60'
        
Spawn:
    - 'if !entity.type.player':
        - 'if chance.2':
            - 'entity.lightning'
Clone this wiki locally