Creator: Unknown
Level: Advanced
As saved by Goblin360 and posted to Project Spark Team club Jan 2018
This kode allows you to jump onto a wolf’s back and ride him. It also allows you to jump with the wolf without being misplaced. You also dismount with a backward somersault. The player rides with their head down and looks better if the wolf is scaled up to 150%.
Place a wolf and delete its brain. Replace with the following:
Kode
Interacting with the wolf
- WHEN [interacted]
- …WHEN [started to]
- …/…WHEN DO [objvar:Rider][equals][it] // sets the player as the rider
- …/…WHEN DO [objvar:Rider][deactivate brain] // turns the player brain off
- …/…WHEN DO [power on] // acts like a boolean to indicate the wolf is being ridden
Mounting the wolf - WHEN [has power]
- …WHEN [started to] DO [objvar:Rider][jump][2] // if you do not want the character to have their head down remove this line. He will now pop onto the backrather than jump, but his head will be up.
- …WHEN DO [objvar:rider][move][toward][center][min distance][0][without deceleration]
- …WHEN DO [follow camera][transition easing][flat easing]
Wolf controls - …WHEN [countdown timer][0.7]
- …/…WHEN [left stick] DO [move][at speed][1.5]
- …/…WHEN [not][in air]
- …/…/…WHEN [button:A][pressed]
- …/…/…/…WHEN DO [jump]
- …/…/…WHEN [button X][pressed] DO [attack][light]
- …/…/…WHEN [button Y][pressed] DO [attack][heavy]
Dismounting - …/…/…WHEN [button B][pressed]
- …/…/…/…WHEN DO [objvar:Rider][pace][equals][1]
- …/…/…/…WHEN DO [me][detach][objvar:Rider]
- …/…/…/…WHEN DO [objvar:Rider][dodge][in direction][objvar:Rider][backward][with strafing][distance][4] // dismounts the player with a backward somersault
- …/…/…/…WHEN [started to] DO [power off]
- …/…/…/…/…WHEN DO [objvar:Rider][up][equals][world up]
- …/…/…/…/…WHEN DO [objvar:Rider][activate brain]
- …/…/…/…/…WHEN DO [objvar:Rider][equals][nothing]
Rider positioning - …WHEN DO [objvar:Rider][vectorvar:position][equals][me][head][position][plus][me][forward][multiplied by][2]
- …WHEN DO pbjvar:Rider][vectorvar:zAxis][equals][(][objvar:Rider][vectorvar:position][minus][objvar:Rider][center][)][normal]
- …WHEN DO [objvar:Rider][vectorvar:xaxis][equals][(][world up][cross][objvar:Rider][vectorvar:zAxis][)][normal]
- …WHEN DO [objvar:Rider][vectorvar:yaxis][equals][(][objvar:Rider][zAxis][cross][objvar:Rider][vectorvar:xAxis][)]normal]
- …WHEN DO [objvar:Rider][forward][equals][objvar:Rider][vectorvar:zAxis]
- …WHEN DO [objvar:Rider][right][equals][objvar:Rider][vectorvar:xAxis]
- …WHEN DO [objvar:Rider][up][equals][objvar:Rider][vectorvar:yAxis]
- …WHEN DO [objvar:Rider][emote][Cower] // or you could use your own sit emote
- …WHEN [countdown timer][(][3][divided by][10][)]
- …/…WHEN [started to] DO [objvar:Rider][pace][equals][0]
- …WHEN DO [objvar:Rider][position][equals][root][position][plus][world down][multiplied by][0.5]
- …WHEN [started to][DO][me][attach][objvar:Rider][to socket][root]