JetSteele Posted March 31, 2016 Posted March 31, 2016 I'm writing a script and require the use of the OnControlDown Event however right now its being a pain or at least the string attached to the event is. I can write a script with the event inside no problem but as soon as I try doing something like this: Event OnControlDown(string control)if control = "Forward"endifEndEvent I get an error stating: No viable alternative at input 'control' I've tried replacing the scripts with new SKSE ones and still this error persists. I have no idea what could be causing the string to not be read properly but its causing the script that I need to finish writing to be non gamepad friendly. For some it won't be a problem since they use a keyboard and mouse but for those who uses a gamepad this will prevent them from running this script properly. I've tried IsKeyPressed but as stated above this doesn't work with a gamepad which is why I've taken a look at OnControlDown however with this acting up I don't know what else to try. So if someone can help getting this Event up and running or if someone knows another event that can allow controls to be detected by both Gamepad and Keyboard I'll be grateful for the help. *Edit: I'm trying to add this onto a Quest Script
IsharaMeradin Posted March 31, 2016 Posted March 31, 2016 Try using a double "=" as in the following: Event OnControlDown(string control) if control == "Forward" endif EndEvent
JetSteele Posted March 31, 2016 Author Posted March 31, 2016 Well that was embarrassing, lol. I didn't think it would work since it was shown with one equals sign on the CK Wiki anyways it compiled properly. Thank you so much! :laugh:
Recommended Posts