Jump to content

Ivan

Member
  • Posts

    14
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Ivan reacted to turbotutone in Issue with ISCoordConversion and Zooming.   
    Its probably because the mouse xy are still relative to 1.0 zoom...
     
    try this in placeItem():
    local zoom = getCore():getZoom(); local worldX, worldY = ISCoordConversion.ToWorld(ISZomboid.mouseX * zoom, ISZomboid.mouseY * zoom, 0);
  2. Like
    Ivan reacted to turbotutone in Custom texture packs and tile definitions   
    Seems like an outdated link...
     
    check this thread instead:
    http://theindiestone.com/forums/index.php/topic/4674-map-tools/?p=113529
  3. Like
    Ivan reacted to turbotutone in Tutorial: World Objects   
    Hehe yes that loadtextures function is a bit ugly, only used to set masks perhaps theres a better way to do this for single file sprites...
    Anyhow, youre probably better of using texturepacks.
     
    EasyP recently added a tut on how to set them up:
    http://theindiestone.com/forums/index.php/topic/8790-custom-texture-packs-and-tile-definitions/
     
    With a texture pack for example you could put all the cubes in one tilesheet, that automatically loads the masks properly and the bonus is that you can set some properties for the sprites in the editor which might come in handy if you need those.
     
    instead of grabbing the sprites with:
    getTexture( "media/textures/cube_red.png" );with a texture pack you grab them like the game sprites, say if your sheet is called "cubes" its that plus "_indexnumber".
    getTexture( "cubes_0" );Regards,
    Turbo
  4. Like
    Ivan got a reaction from turbotutone in Tutorial: World Objects   
    I am trying this tutorials method. The object is added, and detected. However it is not showing up graphically.
     
    -----------------------------------------STACK TRACE-----------------------------------------Callframe at: getDatafunction: maskLoad -- file: SecureContainer.lua line # 20function: loadTextures -- file: SecureContainer.lua line # 38function: onLoadedTileDefinitions -- file: SecureContainer.lua line # 120java.lang.reflect.InvocationTargetException        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        at java.lang.reflect.Method.invoke(Method.java:606)        at se.krka.kahlua.integration.expose.caller.MethodCaller.call(MethodCaller.java:61)        at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:199)        at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:189)        at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:181)        at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:981)        at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:162)        at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1721)        at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1666)        at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:53)        at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:81)        at zombie.Lua.Event.trigger(Event.java:37)        at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:83)        at zombie.iso.IsoWorld.init(IsoWorld.java:979)        at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:237)        at java.lang.Thread.run(Thread.java:724)Caused by: java.lang.RuntimeException: No OpenGL context found in the current thread.        at org.lwjgl.opengl.GLContext.getCapabilities(GLContext.java:124)        at org.lwjgl.opengl.GL11.glGetTexImage(GL11.java:1637)        at zombie.core.textures.TextureID.getData(TextureID.java:325)        at zombie.core.textures.Texture.getData(Texture.java:705)        ... 19 more[Z cannot be cast to [Ljava.lang.Object;Is the console output I see.
     *EDIT* Fixed. Was calling loadTextures in OnLoadedTileDefinitions instead of OnGameBoot
×
×
  • Create New...