Module 8 · In Studio · challenge 2 of 3 in this lesson
RotorClient.speedFor takes a third argument, healthRatio
A test in Studio grades it and prints a pass code.
Open
Level 2, Builder
Challenge
Make a hurt drone's rotors race. Check out m13-art-pass (where RotorClient.luau and challenges/rotor-spin.luau live); the steps are in challenges/solutions/rotor-spin.md. Run it on the client.
- Start from
- The game at milestone m13 (download)
- Grade it
- To grade work from an earlier milestone, apply your challenge changes to a checkout based on
m14-ship, which includes the Course Runner. In Studio, press Play, then runrequire(game.ReplicatedStorage.GameTests.RunChallenge)("rotor-spin", "blender-rigging-2-spin")in the client command bar. Copy the pass code from Output.
Done means
- RotorClient.speedFor takes a third argument, healthRatio
- At full health the speed is ROTOR_SPIN_SPEED, at half health 1.5 times that, and with no health twice that
- Stunned and reduced motion keep their own speeds, and reduced motion still wins over health
- The client test prints TEST PASS rotor_spin_health