Type: Player Brain
Level: 3 star
Pages: 1
Description: A player brain with flying capabilities. Primarily designed for a bird character instead of a human character controlled by the player. The player glides after jumping and flies for short distances until hitting the ground where he can walk as normal.
Kode
- WHEN [once] DO [team][equals][team 1]
- WHEN DO [follow camera][force controls]
- WHEN DO [display meter][health][max][max health][screen top left]
Flying mechanic
- WHEN [jumping][or][flying][and][not][falling] DO [move][with flying][at speed][numvar:speed][in direction][camera forward]
- WHEN [not][flying]
- …WHEN [left stick] DO [move]
- …WHEN [button A][pressed] DO [jump]
- …/…WHEN [on ground] DO [play fx][Dust Ring] //plays a special effect when you jump up into flight
- WHEN [bump][or][bump terrain]
- …WHEN [hit by attack] DO [play fx][feather burst] // plays a special effect of feathers flying when you are hit
- …/…WHEN [else]
- …/…/…WHEN [started to] DO [fall]
Speed boost in the air
- WHEN [right trigger][and][flying] DO [numvar:speed][equals][10]
- …WHEN DO [play sound][Ambient Flight Speed Boost Loop]
- …WHEN DO [play fx][projectile trail][at socket][right hand]
- …WHEN DO [play fx][projectile trail][at socket][left hand]
- …WHEN [else] DO [numvar:speed][equals][1]
- WHEN [button:X][pressed] DO [attack][light][heavy]
- WHEN [Button:B][pressed] DO [fall]
Standard Interaction kode
- WHEN [detect][interactable][objects in front] DO[highlight it yellow]
- …WHEN [is using keyboard] DO [display][middle mouse button][ above ][ it]
- …WHEN[using controller][or][is using touch] DO [display][icon:B][above] [it]
- …WHEN [button B][pressed] DO [interact]
- …WHEN [else]
- …/…WHEN [button B][pressed] DO [dodge][with strafing][invulnerable]
Alterations
Remove feather fx
The feather burst effect is not particularly good if you are putting this brain in anything but a bird.
Take out line 10 and 11 and move line 12 to one indent.
Fly higher
To make the character fly higher in the air try increasing the jump height. Change line 7 to
WHEN [button:A][pressed] DO [jump][jump height][multiplied by][2]