Hello, if you need value when you scroll with your mouse, you need “MouseWheelDelta”
It’s ok with mouse on pc/mac/linux, for touch on mobile it’s not tested, I don’t think it’s going to work, the mobile works differently.
This function is in GD but not accessible easyly.
I’ve added a function for use it as numerical expression !
Here code and below the instruction for import it in your game :
{"000kind":"GDEVELOP_Events Function_CLIPBOARD_KIND-jsBdHbLy912y8Rc","content":{"eventsFunction":{"description":"Return mouse wheel delta when we scroll","fullName":"MouseWheelDelta","functionType":"Expression","name":"E_GetMouseWheelDelta","sentence":"","events":[{"disabled":false,"folded":false,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[],"events":[]},{"disabled":false,"folded":false,"type":"BuiltinCommonInstructions::JsCode","inlineCode":"eventsFunctionContext.returnValue = runtimeScene.getGame().getInputManager().getMouseWheelDelta();","parameterObjects":"","useStrict":true}],"parameters":[],"objectGroups":[]},"name":"E_GetMouseWheelDelta"}}
- Double click for select all text
- Copy it with CTRL+C
- Go in GD5, in functions.
- Add a new empty function
- Just right click on it, and click on Paste !
- Now you see a new function “E_GetMouseWheelDelta”
- You can delete the empty function, it was just for Paste