Paste #124424: Unnamed Denizen Script Paste

Date: 2024/07/09 11:31:39 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21


EnteringNPCs:
    type: world
    events:
        on player enters npc:
            - announce "Entered your vehicle"
        on player steers npc:
            # Backward movement
            - if <context.forward> < 0 && <context.entity.is_on_ground>:
                - adjust <context.entity> velocity:<player.location.sub[<player.location.forward_flat[0.15]>]>

            - teleport <context.entity> <context.entity.location.with_yaw[<player.location.yaw>].with_pitch[<player.location.pitch>]>
            - narrate "cow yaw:  <context.entity.location.yaw>"
            - narrate "yaw: <player.location.yaw>"
            - narrate "grounded: <context.entity.is_on_ground>"

            - if <context.jump.is_truthy>:
                - if <context.forward> > 0:
                    - adjust <context.entity> velocity:<context.entity.velocity.add[<player.location.sub[<context.entity.is_on_ground.if_true[<player.location.backward_flat[0.55]>].if_false[<player.location.backward_flat[0.2]>]>]>]>
                - else if <context.forward> < 0 && <context.entity.is_on_ground>:
                    - adjust <context.entity> velocity:<context.entity.velocity.add[<player.location.sub[<player.location.forward_flat[0.2]>]>]>
                - determine cancelled