Paste #124481: Unnamed Denizen Script Paste

Date: 2024/07/11 08:11:21 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


RideAllTheChickens:
  type: world
  debug: false
  events:
    on player right clicks npc:
    - if <context.entity.has_passenger>:
        - stop
    - mount <player>|<context.entity> <context.entity.location>
    - adjust <context.entity> has_ai:false
    - wait 1t
    - actionbar "Press LSHIFT for TURBO SPEEEED"
    on player steers npc:
    - narrate <context.sideways>
    - define looking <player.location.direction.vector.with_y[0].div[3]>
    - define forward <[looking].mul[<context.forward>]>
    - define sideways <[looking].rotate_around_y[<element[90].to_radians>].mul[<context.sideways>]>
    - define speed 2
    - if <context.jump> && <context.entity.is_on_ground>:
        - define speed 5
    #- define speed <tern[<context.dismount>].pass[5].fail[2]>
    - define velocity <[forward].add[<[sideways].mul[0.5]>].mul[<[speed]>]>
    - narrate <[velocity]>
    - adjust <context.entity> move:<[velocity]>
    - if <[velocity].vector_length> > 0.01:
        - look <context.entity> <context.entity.eye_location.add[<[velocity]>]>