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.7K Hangout
- 67 NI News
- 896 Tech Talks
- 4.6K Native Access
- 17.8K Komplete
- 2.2K Komplete General
- 4.8K Komplete Kontrol
- 6.3K Kontakt
- 1.1K Reaktor
- 407 Battery 4
- 917 Guitar Rig & FX
- 465 Massive X & Synths
- 1.5K Other Software & Hardware
- 6.4K Maschine
- 8.2K Traktor
- 8.2K 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