KSP scripting error, "callback type not allowed" cant solve
So I'm attempting to make a simple script that takes the state of the soft pedal and when pressed lowers the velocity values by 15 points. I'd prefer 20% but this seems simpler.
I keep getting the error "error (line 17): callback type not allowed in this context" referring to the "on note" use and even GPT cant figure it out. Thoughts? Anyone have a better idea how to implement this?
-------------------------------------------
on init
declare $softPedalEngaged
declare $VELOCITY
$softPedalEngaged := 0
end on
on controller
if ($CC_NUM = 67)
if ($CC_VALUE >= 64)
$softPedalEngaged := 1
else
$softPedalEngaged := 0
end if
end if
end on
on note
if ($softPedalEngaged = 1)
if ($VELOCITY > 15)
$VELOCITY := $VELOCITY - 15
end if
end if
end on
Categories
- All Categories
- 18 Welcome
- 1.6K Hangout
- 66 NI News
- 863 Tech Talks
- 4.4K Native Access
- 17.7K Komplete
- 2.1K Komplete General
- 4.6K Komplete Kontrol
- 6.1K Kontakt
- 1.6K Reaktor
- 398 Battery 4
- 894 Guitar Rig & FX
- 456 Massive X & Synths
- 1.4K Other Software & Hardware
- 6.2K Maschine
- 7.9K Traktor
- 7.9K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators