Paste #36123: RIDS ALL THE CHICKENS

Date: 2016/09/15 06:22:53 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


RideAllTheChickens:
  type: world
  debug: false
  events:
    on player right clicks chicken:
    - mount <player>|<context.entity> <context.entity.location>
    on player steers chicken:
    # YOU MUST RIDE THE CHICKEN FOREVER
    - if <context.dismount> {
      - determine passively cancelled
      }
    - if <context.entity.flag[jump_cooldown]||0> > 0 {
      - flag <context.entity> jump_cooldown:--
      }
    - if <context.jump> && <context.entity.is_on_ground> {
      - adjust <context.entity> velocity:<context.entity.velocity.add[0,0.5,0]>
      - flag <context.entity> jump_cooldown:10
      }
    - if <context.forward> > 0 {
      - ~walk <context.entity> <context.entity.location.add[<player.location.direction.vector>]> speed:<context.forward.div[5]>
      }
      else if <context.forward> < 0 {
      - ~walk <context.entity> <context.entity.location.sub[<player.location.direction.vector>]> speed:<context.forward.div[-5]>
      }
    - if <context.sideways> > 0 {
      - ~walk <context.entity> <context.entity.location.add[<player.location.direction.vector.rotate_around_y[90]>]> speed:<context.sideways.div[5]>
      }
      else if <context.sideways> < 0 {
      - ~walk <context.entity> <context.entity.location.add[<player.location.direction.vector.rotate_around_y[-90]>]> speed:<context.sideways.div[-5]>
      }