-
Notifications
You must be signed in to change notification settings - Fork 4
Enemy Actions
Enemy actions are TimeEvents that define discrete behaviours that can be assigned to enemies in order to give them interesting traits outside of simply walking.
Enemy actions are assigned to enemy's in their initStats method via the PropertiesBuilder. To do this, simply append the PropertiesBuilder method addEvent with the enemy action desired for the enemy to hold to the returned PropertiesBuilder. For guide to creating your own enemy action see TimeEvents. The existing enemy actions detailed below can also be used for examples.
The enemy actions currently in Rocket Potatoes are:
- ChannelEvent
- HealingWaveEvent
- MeleeAttackEvent
- StealingEvent
ChannelEvent is a behaviour that can be attached to another enemy action in order to create the impression that the enemy is "channeling" in order to perform the event by pausing for a period of time before performing the channel event's connected enemy action. An example of this pairing is the moose enemy's healing wave which results in the moose pausing before initiating the healing wave. The parameters for ChannelEvent define the time resolution in which it polls its connected action for when to begin channeling, for how long prior to it's connected action should channeling endure, and the action desired for this channel event to be intertwined with.
HealingWaveEvent defines a healing wave that is emitted from the enemy and heals all enemies within its radius. The parameters for the action allow for the rate at which an enemy emits the wave, the radius of the wave and the amount the wave heals for to be specified.
MeleeAttackEvent gives the enemy the ability to perform a close-range melee attack to a target. The rate at which the enemy performs attacks as well as the target of the enemy's attacks are specified in its parameters.
StealingEvent gives an enemy the ability to steal from resource trees. An enemy with this enemy action will, if within range of a resource tree, stop, turn to face the tree and steal its resources gradually over time until the tree is depleted of resources and then begin moving again. The rate at which this action is performed by the enemy holding it, and therefore the speed at which it depletes a tree of resources can be defined in its parameters.
- Home
- How To Play
- Keybindings
- Inventory and Resources
- Trees
- Portals and Worlds
- Projectiles
- Enemies
- Waves & Spawning
- Graphical assets progress overview
- Audio Files
- Design Templates
- Blender Intro
- Converting 3D models to Sprites
- Scripting in Blender
- Creating a Model in Sketchup
- Colouring and Animating in Blender
- Animation using Dope Sheet, Keyframes and Scale Transformation in Blender
- Template
- Testing
- Terrain
- Terrain Generation
- Resource Trees
- Main Menu, Chat, options
- Main Menu V2, Options V2, Sound
- Damage Trees
- Projectiles
- Enemy User Testing
- Tree planting, inventory GUI, resources, portals
- Caveman Character
- Debug Mode Menu
- Tree learning, Attack Trees, Main Menu Tutorial Resources Styling
- Revamped Resource Trees
- Squirrel User Testing
- Final evaluation
- Project Structure
- Git Workflow
- GUI
- Worlds
- Entity Directions
- Resources
- Inventory
- AbstractEntities
- BasicProperties
- MortalEntity
- ProgressBarEntity
- Multiplayer
- Trees
- TimeEvent
- Game Time
- Animations
- Enemies
- Waves
- Player
- Projectiles
- Effect
- Particles
- Path Manager
- Sounds
- Debug 'God' Mode
- 2D Collision
- Box3D {depreciated}
- Render3D
- Cheat Codes