Category | Scripting |
Created | 01.05.2022 15:43 |
Julius Becker (Aruetiise) | 01.05.2022 15:43 |
---|---|
Hello, i am creating a instance of MapHostpot with local hotspot = MapHotspot:new("Hotspot", MapHotspot.CATEGORY_MISSION) When i try to call setColor(color) or every other methode with hotspot:setColor(color) i get "attempt to call method 'setColor' (a nil value)". When i call it with MapHotspot.setColor(hotspot,color) i get no error. But ingameMap:addMapHotspot(hotspot) calls hotspot:getCategory() internaly which results in the same error. Can any one tell where my mistake is? Julius |
Michael T. (mx11de) | 05.05.2022 12:02 |
---|---|
Hi, outher setColor functions expects three values. try it like Hotspot:setColor(0.3763, 0.6038, 0.0782) |
Julius Becker (Aruetiise) | 05.05.2022 16:35 |
---|---|
I tried it but it does not work. My color variable is a list with all three values. But i can set the variable with hotspot.color . Any ideas on how to fix the issue with g_currentMission.hud.ingameMap:addMapHotspot(hotspot) resulting in an error. ("attempt to call method 'getCategory' (a nil value)".) It seems like i cant call any methodes on my MapHotspot instance. |
Note: Log in to post. Create a new account here.