Date: 2024/07/09 11:31:39 UTC-07:00
Type: Denizen Script
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