This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
Parameterized: Knockback
KoryuObihiro edited this page Dec 26, 2011
·
3 revisions
Syntax: $entityeffect.knockback
Nested elements:
-
Direct Knockback
- Using only routines for a Knockback nest will apply the result to a knockback vector.
-
Parameterized Knockback
-
X: Affects the horizontal velocity relative to the knockback vector.
-
Y: Affects the absolute vertical velocity of the knockback vector.
-
Description: Applies a velocity whose power is calculated with nested elements and direction is determined by the following cases:
-
Target-only events:
-
Multiple-entity events: For Projectile-only events (as of 10/23/2011, only the ProjectileHit node), the vector is between the projectile and the shooter. For attacker-target events, it is between the attacker and the target.
Examples:
Damage: # Apply a basic knockback to targets of attacks from members of the group Brute.
- 'if attacker.group.Brute':
- 'targeteffect.knockback': '4'
Damage: # Screwball attack, anybody?
- 'if projectile.type.egg and attacker.group.metroid':
- 'targeteffect.knockback':
X: '0'
Y: '30'
OnProjectileHit: # Hookshot effect with an arrow?
- 'if attacker.haspermission.hookshot.use':
- 'targeteffect.knockback':
X: '(projectile_x - target_x * 10)'
Y: '(projectile_y - target_y * 10)'