Type: Player Brain
Level: 3 star
Pages: 1
Description: A rather inefficient flight mechanic that allows your player to fly very short distances while falling towards the ground with his arm outstretched like Superman. Requires player to jump twice and hold the A button to maintain flight. Flight lasts a couple of seconds at most.
- WHEN [once] DO [team][equals][team 1]
Set up situations when you can glide
- …WHEN DO [multi jump count][equals][2]
- WHEN DO [allow quick turn][equals][not][boolvar:gliding]
- WHEN [started to][not][(][on ground][or][swimming][)] DO [boolvar:can glide][equals][true]
Camera settings
- WHEN DO [follow camera][deadzone][0.3][ignore prop collision][transition easing][ease between]
- WHEN DO [display meter][health][screen top left]
Button press to activate gliding
- WHEN [button A][pressed]
- …WHEN [not][(][jumping][or][falling][or][flying][)] DO [jump]
- …/…WHEN [else]
- …/…/…WHEN [boolvar:can glide] DO [boolvar: gliding][equals][true]
Gliding mechanic
- WHEN [boolvar: gliding]
- …WHEN [started to]
- …/…WHEN DO [jump]1.8]
- …WHEN DO [boolvar:can glide][equals][false]
- …WHEN [raycast hit][direction][world down][length][1.2] DO [boolvar:fall][equals][true]
- …WHEN [button:A][released] DO [boolvar:fall][equals][true]
- …WHEN [countdown timer][2] DO [boolvar: fall][equals][true]
- …WHEN [not][boolvar: fall]
- …/…WHEN [countdown timer][6][in frames]
- …/…/…WHEN [started to] DO [velocity][equals][velocity][multiplied by][0.7]
- …/…/…WHEN [left stick] DO [vectorvar:stick direction][equals][left stick]
- …/…/…/…WHEN DO [vectorvar:stick direction][equals] [vectorvar:stick direction][from camera space]
- …/…/…/…WHEN DO [ [vectorvar:stick direction][y][equals][forward][y]
- …/…/…/…WHEN DO [move][at speed][1.5][in direction] [vectorvar:stick direction][with flying]
- …/…/…WHEN DO [move][at speed][0.5][in direction][world down][with flying]
- …WHEN [else][left stick] DO [move]
- WHEN [boolvar:fall]
- …WHEN DO [boolvar:gliding][equals][false]
- …WHEN DO [fall]
- …WHEN DO [boolvar:fall][equals][false]
Firing and combat
- WHEN [button:X][pressed] DO [attack][light][heavy]
- WHEN [button:Y]
- …WHEN [objvar:equipped projectile] DO [throw][objvar:equipped projectile]
- …/…WHEN [else] DO [shoot]
Standard interaction kode
- WHEN [detect][interactable][objects in front]
- …WHEN 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]