Question about the Demonoire project?

0 favourites
  • 2 posts
From the Asset Store
With this template you can create your own archer game and customize it however you want.
  • what is the purpose of having this trigger once after the input checking?

    [Player Walk]

    // Allow the player to move in 8 directions but only change directions if a single direction is being pressed.

    Keyboard and Gamepad controls are exclusively separated here to simplify things.

    // Keyboard

    ----+ Keyboard: ↑ is down

    --------+ Keyboard: [X] ↓ is down

    ---------> Player_Base: Simulate 8Direction pressing Up

    ---------> Player_Mask: Set Walking to True

    --------+ Keyboard: [X] ← is down

    --------+ Keyboard: [X] → is down

    ---------> Player_Mask: Set Direction to "Up"

    ----+ Keyboard: ↓ is down

    --------+ Keyboard: [X] ↑ is down

    ---------> Player_Base: Simulate 8Direction pressing Down

    ---------> Player_Mask: Set Walking to True

    --------+ Keyboard: [X] ← is down

    --------+ Keyboard: [X] → is down

    ---------> Player_Mask: Set Direction to "Down"

    ----+ Keyboard: → is down

    --------+ Keyboard: [X] ← is down

    ---------> Player_Base: Simulate 8Direction pressing Right

    ---------> Player_Mask: Set Walking to True

    --------+ Keyboard: [X] ↓ is down

    --------+ Keyboard: [X] ↑ is down

    ---------> Player_Mask: Set Direction to "Right"

    ----+ Keyboard: ← is down

    --------+ Keyboard: [X] → is down

    ---------> Player_Base: Simulate 8Direction pressing Left

    ---------> Player_Mask: Set Walking to True

    --------+ Keyboard: [X] ↓ is down

    --------+ Keyboard: [X] ↑ is down

    ---------> Player_Mask: Set Direction to "Left"

    // Gamepad

    ----+ Gamepad: Gamepad 0 D-pad up is down

    --------+ Gamepad: [X] Gamepad 0 D-pad down is down

    ---------> Player_Base: Simulate 8Direction pressing Up

    ---------> Player_Mask: Set Walking to True

    --------+ Gamepad: [X] Gamepad 0 D-pad right is down

    --------+ Gamepad: [X] Gamepad 0 D-pad left is down

    ---------> Player_Mask: Set Direction to "Up"

    ----+ Gamepad: Gamepad 0 D-pad down is down

    --------+ Gamepad: [X] Gamepad 0 D-pad up is down

    ---------> Player_Base: Simulate 8Direction pressing Down

    ---------> Player_Mask: Set Walking to True

    --------+ Gamepad: [X] Gamepad 0 D-pad left is down

    --------+ Gamepad: [X] Gamepad 0 D-pad right is down

    ---------> Player_Mask: Set Direction to "Down"

    ----+ Gamepad: Gamepad 0 D-pad right is down

    --------+ Gamepad: [X] Gamepad 0 D-pad left is down

    ---------> Player_Base: Simulate 8Direction pressing Right

    ---------> Player_Mask: Set Walking to True

    --------+ Gamepad: [X] Gamepad 0 D-pad down is down

    --------+ Gamepad: [X] Gamepad 0 D-pad up is down

    ---------> Player_Mask: Set Direction to "Right"

    ----+ Gamepad: Gamepad 0 D-pad left is down

    --------+ Gamepad: [X] Gamepad 0 D-pad right is down

    ---------> Player_Base: Simulate 8Direction pressing Left

    ---------> Player_Mask: Set Walking to True

    --------+ Gamepad: [X] Gamepad 0 D-pad down is down

    --------+ Gamepad: [X] Gamepad 0 D-pad up is down

    ---------> Player_Mask: Set Direction to "Left"

    ----+ Keyboard: [X] ↑ is down

    ----+ Keyboard: [X] ↓ is down

    ----+ Keyboard: [X] → is down

    ----+ Keyboard: [X] ← is down

    ----+ Gamepad: [X] Gamepad 0 D-pad down is down

    ----+ Gamepad: [X] Gamepad 0 D-pad up is down

    ----+ Gamepad: [X] Gamepad 0 D-pad right is down

    ----+ Gamepad: [X] Gamepad 0 D-pad left is down

    -----> Player_Mask: Set Walking to False

    ----+ System: Trigger once

    -> (no actions)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It is most likely a typo, it should be inside that previous event. If keyboard or gamepad buttons are not down, set walking to false once. Atm trigger once is seperated, it sets walking to false each tick, which is bad behavior.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)