Category | Scripting |
Created | 25.12.2018 12:17 |
Baptiste Brossette (Monsieur_Bab) | 25.12.2018 12:17 |
---|---|
Hi, I don't understand where my code is wrong :( I would like to desactivate the visibility of the mini-map when I press a specific key. function MiniMap:keyEvent(unicode, sym, modifier, isDown) if Input.isKeyPressed(Input.KEY_equals) then HUD:setIngameMapSize(IngameMap.STATE_OFF) end; end; The error : attempt to index field 'ingameMap' (a nil value) The LUA doc says we need to specify one of 3 states (https://gdn.giants-software.com/documentation_scripting_fs19.php?version=script&category=1&class=6986#setIngameMapSize117392). I wrote the component and the function with arguments, but it doesn't work :/ Thanks in advance for your response Bye! |
Espen K. (estyx) | 26.12.2018 21:54 |
---|---|
If you haven't figured out yet, it's because you have a lower case 'i' in 'IngameMap' :) |
Jos Kuijpers (Unknown) | 02.01.2019 15:57 |
---|---|
HUD -> g_currentMission.hud |
Note: Log in to post. Create a new account here.