Wind jumping (similar to Never Alone)

By LadylexUK
Level: Intermediate
Type: Character skills

There is a game mechanic in Never Alone (a side scrolling platformer with a child and a fox) where your player can jump across wider gaps if the wind is blowing, and in the correct direction. The wind appears on a timed loop and you need to time your jump to get across (where you are blown across the gap, or blown backwards if the wind is in the other direction). Here is the kode I used to make something similar.

You will need a visual wind effect. I used one of the creation ribbon props and a power attached and attached blizzard fx. Place the ribbon in the gap you want your player to be blown across.

In your player brain

  1. WHEN [flying] DO [multi jump count][equals][0] // this stops the player jumping further when blown across
  2. …WHEN [else] DO [multi jump count][equals][1]
  3. WHEN [raycast hit][IWP:primitive block] DO [boolvar:forward][equals][true] // I placed a block at either end of the platform section, if the raycast hits the block I know which way my player is facing
  4. …WHEN [else] DO [boolvar:forward][equals][false]
  5. WHEN [global][boolvar:wind]
  6. …WHEN [else]
  7. …/….WHEN [not][on ground] DO [fall]
  8. …WHEN [started to][jumping] DO [boolvar:jump][equals][true]
  9. …WHEN [boolvar:jump]
  10. …/….WHEN [boolvar:forward]
  11. …/…/…WHEN [else]
  12. …/…/…/…WHEN [global][left to right]
  13. …/…/…/…/….WHEN [duration timer] DO [move][object backward][with flying]
  14. …/…/…/…/…/…WHEN [else] DO [fall]
  15. …/…/…/…/…/…/…WHEN [duration timer] DO [boolvar:jump][equals][false]
  16. …/…/…/…/…WHEN [else]
  17. …/…/…/…/…/…WHEN [duration timer] DO [move][object forward][with flying]
  18. …/…/…/…/…/…/…WHEN [else] DO [fall[
  19. …/…/…/…/../…/…/…WHEN [duration timer] DO [boolvar:jump][equals][false]
  20. …/…/…WHEN[global] [boolvar:left to tight]
  21. …/…/…/…WHEN [duration timer] DO [move][object backward][with flying]
  22. …/…/…/…/…WHEN [else] DO [fall]
  23. …/…/…/…/…/…WHEN [duration timer] DO [boolvar:jump][equals][false]
  24. …/…/…/…WHEN [else]
  25. …/…/…/…/…WHEN [duration timer] DO [move][object forward][with flying]
  26. …/…/…/…/…/…WHEN [else] DO [fall[
  27. …/…/…/…/../…/…WHEN [duration timer] DO [boolvar:jump][equals][false]

In your ribbon

  1. WHEN [started to][countdown timer][4][loop][trigger on start][hold time][4] DO [toggle][global][boolvar:wind]
  2. WHEN [started to][countdown timer][4][loop] DO [toggle][global][boolvar:left to right]
  3. WHEN [global][boolvar:left to right] DO [forward][equals][north]
  4. …WHEN [else] DO [forward][equals][south] // this establishes the direction of the wind
  5. WHEN [global][boolvar:wind] DO [visible][equals][true]
  6. …WHEN DO [play sound][Ambience Wind Sand gust Large][everywhere]
  7. …WHEN [started to] DO [power on] // this controls the fx visibility
  8. …WHEN [else] DO [visible][equals][false]
  9. …/….WHEN DO [power off]

Comments are closed.

Powered by WordPress.com.

Up ↑

%d bloggers like this: