MONSTER SCRIPTS
Pixel Monster
Script for controlling the appearance and animation of the monster.
Properties in the Runtime
foldout should only be modified in the runtime except Facing
.
Some properties in the Runtime
foldout will be modified by Monster Controller
script.
Renderers
Reference to all the renderers inside the monster prefab.
Animator
Reference to the animator object inside the monster prefab.
Fx
Reference to the object that contain special effects inside the monster prefab.
Can be left empty.
Die Fx Prefab
The special effects object to instantiate when the monster dies.
Can be left empty.
Alpha
Controls the transparency of the entire monster.
Facing
The monster’s facing.
Can be changed in editor to set the character’s initial facing.
Is Hiding
Is the monster hiding.
Only works for Mimic.
Is Grounded
Is the monster on ground.
Is Dead
Is the monster dead?
Turn this on will only let the monster play the die animation. If you also want to stop the monster’s movement. Turn on the [Is Dead] property of the controller script.
Moving Blend
Moving animation blend.
0.0: Idle 0.5: Walk 1.0: Run
Attack
Play attack animation.
Injured Front
Play Injured Front
animation.
Injured Back
Play Injured Back
animation.
Monster Controller
Script for controlling the monster’s movement.
It will modify some of the parameters in the Pixel Character
script to control animation.
Default Movement
Default movement type, walk or run.
Walks Speed Max
Max walking speed.
Walks Acc
Walking Acceleration.
Run Speed Max
Max running speed.
Run Acc
Running Acceleration.
Air Speed Max
Max move speed while in air.
Air Acc
Air acceleration.
Ground Brake Acc
Braking acceleration while on ground.
Applied when there is no movement input.
Air Brake Acc
Braking acceleration while in air.
Applied when there is no movement input.
Jump Speed
Speed applied to the character when jump.
Jump Cooldown
Time needed to be able to jump again after landing.
Jump Delay
Time it takes from the moment the jump input is fired to the moment the monster actually jumps.
During this time, the jump prepare animation will be played to achieve a more realistic jump behavior, and you will need to press the key for a little while until the monster actually jump.
If you do not need this, you can set it to 0.
Jump Gravity Multiplier
Gravity multiplier when the monster is jumping.
Set it to lower value so that the longer you press the jump button, the higher the monster can jump.
Fall Gravity Multiplier
Gravity multiplier when monster is falling.
Moving Blend Transition Speed
The transition speed when modifying the Moving Blend
property in Pixel Monster
script.
Ground Check Size
Size of the box on character's bottom to determine whether the character is on ground.
Can Attack in Air
Can the monster perform attack action while in air.
Can Attack When Moving
Can the monster perform attack action while moving.
When turned off, it also forbids the monster to move while in attack animation.
Input Move
Movement input, x for horizontal, y for vertical, x and y should be in [-1.0, 1.0]
.
Input Move Modifier
Input to switch between walk and run.
Input Jump
Jump input.
Input Attack
Attack input.
Is Dead
Is the monster dead?
When turned on, it will also turn on the Is Dead
property on Pixel Monster
script and stop the monster’s movement.
Monster Flying Controller
Same as Monster Controller
script, but for monsters that can fly.
Speed Max
Max moving speed.
Acc
Moving Acceleration.
Brake Acc
Braking acceleration
Applied when there is no movement input.
Ground Check Size
Size of the box on character's bottom to determine whether the character is on ground.
Moving Blend Transition Speed
The transition speed when modifying the Moving Blend
property in Pixel Monster
script.
Dead Gravity Scale
Gravity scale when the character is dead.
Flying monsters will have their gravity scale set to 0 when there are alive.
So, this parameter actually controls whether the flying monster should fall to the ground when it is dead.
Input Move
Movement input, x for horizontal, y for vertical, x and y should be in [-1.0, 1.0]
.
Input Attack
Attack input.
Is Dead
Is the monster dead?
When turned on, it will also turn on the Is Dead
property on Pixel Monster
script and stop the monster’s movement.
Monster Input Mouse and Keyboard
Script for feeding player inputs to Monster Controller
script using mouse and keyboard.
Last updated