- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register


Click here to create your own public paste ~ ~ click to duplicate and edit this paste


TitleUntitled Paste
TypeDenizen Script
Date2017/08/20 15:50:43 UTC-07:00
ByGuest
Other
Paste
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
3700
PETS_RIDE:
    type: world
    events: 
        on player right clicks entity: 
        - define pet <player.flag[pets.current_pet]||null>
        - mount <player>|<def[pet]> <def[pet].location> 
            - adjust <def[pet]> has_ai:false 
        on player steers entity: 
        - define pet <player.flag[pets.current_pet]||null>
        - if <context.jump> { 
            - if <def[pet].is_on_ground> {
                - define velocity <def[velocity].add[0,0.5,0]>
            }
        }        
        - flag player pets.JumpCooldown:-- 
        - flag player pets.TickCooldown:-- 
        - if <player.flag[pets.TickCooldown]||0> > 0 { 
            - flag player pets.Forward:+:<context.forward> 
            - flag player pets.Sideways:+:<context.sideways> 
        - if <context.dismount> { 
            - determine cancelled 
            } 
        - queue clear 
        - define forward <context.forward.add[<player.flag[pets.Forward]||0>].div[<def[dividing]>]> 
        - define sideways <context.sideways.add[<player.flag[pets.Sideways]||0>].div[<def[dividing]>]> 
        - define looking <player.location.direction.vector.sub[0,<player.location.direction.vector.y>,0]> 
        - define velocity <def[looking].mul[<def[forward]>].add[<def[looking].rotate_around_y[<el@90.to_radians>].mul[<def[sideways]>]>]> 
        - flag player pets.Forward:0 
        - flag player pets.Sideways:0 
        - if <player.flag[pets.ShouldJump]||false> { 
            - if <def[pet].is_on_ground> && <player.flag[pets.JumpCooldown]||0> <= 0 { 
                - define velocity <def[velocity].add[0,0.5,0]> 
                - flag player pets.JumpCooldown:10 
            } 
        - flag player pets.ShouldJump:false 
        } 



RawRaw



Pastes made: 79782