Type: Player Brain
Level: 3 star
Pages: 1
Description: When the player holds down the left trigger the player shoots into the air with a trailing special fx. There is no limit to the height of the thrust. When the player releases the character falls to the ground. There is not fall damage.
Kode
- WHEN [once]
- …WHEN DO [equip][Astro Pistol]
- …WHEN DO [ team][equals][team 1]
- WHEN DO [follow camera]
- WHEN DO [display meter][health][max][max health][screen top left]
Jump mechanic
- WHEN [left trigger]
- …WHEN [started to]
- …/…WHEN DO [jump]
- …/…WHEN DO [multi jump count][equals][-1]
- …WHEN [left stick] DO [move][with strafing]
- …WHEN DO [push][in direction][world up][strength][1.25]
- …WHEN DO [play fx][fx:Projectile Trail][at socket][right hand][scale][0.5]
- …WHEN DO [play fx][fx:Projectile Trail][at socket][left hand][scale][0.5]
- …WHEN DO [vibrate][duration][0.1]
- …WHEN [else]
- …/…WHEN [started to] DO [fall]
- …/…WHEN [left stick] DO [move]
- WHEN [started to][on ground] DO [multi jump count][equals][2]
Action buttons
- WHEN [button A][pressed] DO [jump]
- WHEN [button X][pressed] DO [attack]
- WHEN [Right trigger] 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]
Alterations
Limit height of thrust
You probably do not want your player rising up and up until they hit the topmost limit and be destroyed (which they will in 17 seconds). So you will probably need to set a limiter to the thrust. In this example the player will lose thrust if they reach a height of 60 metres.
Change line 6 to
WHEN [left trigger][and][position][y][less than or equal to][60] // you can change the 60 to the height of your choice.