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
- 19 Welcome
- 1.3K Hangout
- 59 NI News
- 706 Tech Talks
- 3.6K Native Access
- 15.2K Komplete
- 1.8K Komplete General
- 4K Komplete Kontrol
- 5.2K Kontakt
- 1.5K Reaktor
- 354 Battery 4
- 783 Guitar Rig & FX
- 403 Massive X & Synths
- 1.1K Other Software & Hardware
- 5.2K Maschine
- 6.7K Traktor
- 6.7K 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