Jump to content

Russell

Members
  • Posts

    187
  • Joined

  • Last visited

Posts posted by Russell

  1. Hello!! Help please!!
    I don't know if you can help me with a problem that is not so specific...

    Until yesterday Leadwerks exported me perfectly in STANDALONE projects and when running them from the EXE everything worked correctly.

    However this morning, I exported once more one of my projects, but when I run the EXE file it opens and closes inmediately without an error or message.

    If I run the game from the Leadwerks RUN button, the game works perfectly. But the published STANDALONE doesn't work for any project.

    I have tried:

    1. Repair Leadwerks. --Doesn't work.
    2. Uninstall and Install Leadwerks. --Doesn't work.
    3. Repair all of the Redistributables of my Windows. --Doesn't work.
    4. Creating New projects (Blank, FPS, Marble...) to try exporting them --Doesn't work. The exe closes inmediately in all of them.
    5. Restoring Windows 2 days ago (yesterday publish worked fine) --Doesn't work.

    Would anyone be able to help me?

    Or even tell me if there is anything that I can look at ... I don't know what to do.

    Just yesterday my game or another projects were exporting ok, and them ran fine on STANDALONE publish. But today, despite exporting them well, them doesn't run closing inmediately without any message or something.

    I'm going crazy with this... ????????

  2. Hello team!! Hello @Josh i need your help...

    I'm working to throw my minigame in Steam. And the compilation of the game works ok in my computer and my laptop... But when i send the compilation to the REVIEW of Steamworks, Valve answer me: " Failure: The build review has failed because the game doesn't launch on Windows. We weren't able to find a solution to get the game working. It's possible there's an issue with the game files, but there might also be one or more missing dependencies. Please test and resolve this launch error issue before submitting it for review again. "

    My question is... What redistributable of these (in the screenshot) do our games need to be able to run?

    Redistributables.jpg.2bc4f110b42d8dbf375851488dd893f6.jpg

    OpenAL is the only one i've checked. Do i need chekc anything else???

    Thank you!!

    I hope you are all fine with this whole problem about the damned COVID-19.

    Cheers.

  3. Finally, since I don't know how to make with LUA appear the Steam Popup when we achieve one of the achievements; i have make my own popup system...

    This is my code...

    Script.LogroObtenido=""--string "Logro"
    local MostradoLogro="No"
    
    function Script:Logro()--in
    	Steamworks:SetAchievement(self.LogroObtenido)
    	sound = Sound:Load("Sound/MisSonidos/ValidarTICKET.wav")
    	sound:Play()
    	--Cargamos la textura de logro introducida en la caja de texto del nombre del logro.
    	TexturaLogro=Texture:Load("Materials/MisTexturas/HUD/Logros/"..self.LogroObtenido..".tex")
    	--Como siempre textura vacía para quitar las imagenes en la pantalla.
    	textureVacia = Texture:Load("Materials/MisTexturas/TexturaVacia.tex")
    end
    
    function Script:PostRender(context)
    	--Para que se active el fondo transparente de las imagenes.
    	context:SetBlendMode(Blend.Alpha)
    	if MostradoLogro=="No" then
    		context:DrawImage(textureVacia,0,0,0,0)
    	end
    	if MostradoLogro=="Si" then
    		context:DrawImage(TexturaLogro,context:GetWidth()/2-TexturaLogro:GetWidth()/2,100,0,0)
    	end
    end
    
    function Script:LogroVisible()--in
    	MostradoLogro="Si"
    end
    
    function Script:LogroOculto()--in
    	MostradoLogro="No"
    end

    Works OK in 3 levels and 6 achievements custom popup appears OK with this code.

    But in the others 10 levels doesn't work and LEADWERKS give me "ASSERT FAILED" error without no more explanation of why...

    Anyone knows anything about this??? I have tried to find the answer in the forum, but nothing worked for my case...

    Thanks team!

  4. Just now, gamecreator said:

    Yes, I did it through code.  I don't know anything about the console.

    Thanks, i will try this.

    With LUA and my code, achievements appear only when we close the game.

    Reseting them, this give me a chance to try different lines of code.

    If I make a successfull code with achievemens showed in the same moment or few seconds later, i will share it here.

    Thanks again gamecreator.

  5. 8 hours ago, gamecreator said:

    I played with this late last year and I use C/C++ so I don't know how much this will help; it may have broken since then.  Getting the achievements to show worked but it wasn't instant.  Sometimes it took a few seconds.  It was acting weird but it's supposed to be better when you actually release the game.  Resetting achievements worked fine.  I just called SteamUserStats()->ResetAllStats(true) for that.

    Thanks for your answer gamecreator. This SteamUserStats()->ResetAllStats(true) is used inside my code in the game?

    Is there a way to reset them using the Console on Steam??

  6. Hello team!! I'm not sure where can i ask this, for this reason i write the post on "Technical Assistance".

    After read this helpful thread: How to set a Steam Achievement

    I have managed to make my achievements work ok. But as the thread says, the achievements popup doesn't show up when you achieve one of them. They are displayed together when you close the game.

    I have 2 questions that I don't know if someone can answer me:
    FIRST - Anyone knows how make that popup appears when we achieve one of the achievements??? This is my code on Leadwerks, simple as the thread says:

    --MAIN.LUA
    --Initialize Steamworks
    Steamworks:Initialize()
    --Achievements.lua (script)
    Script.LogroObtenido=""--string "Logro"
    
    function Script:Logro()--in
    	Steamworks:SetAchievement(self.LogroObtenido)
    	sound = Sound:Load("Sound/MisSonidos/Logro.wav")
    	sound:Play()
    end

    Works ok, but the POPUP on Steam doesn't appear when we achieve one of them. Only when we close the game.

     

    SECOND - Anyone know how reset achievements on Steam to test them again??? I have used the commands says in the Steamworks SDK

    To set or clear an achievement without adding code to your game, you can use the Steam client console. Run with steam.exe -console, then:
        achievement_set <appid> <achievement name>
        achievement_clear <appid> <achievement name>
        reset_all_stats <appid>

    But commands don't work. After put my APPID and the Name of the acchievement in the console, says "command not found".

    Reset_all_stats and my appid of my game, doesn't work neither. (I think these commands are no longer enabled on steam right now)

    Anyone have exp with this topic in his game???

    Thank you very much!!

  7. On 5/6/2019 at 12:04 AM, Phodex Games said:

    For all those facing the same problem, its actually pretty easy. Log into the steam backend and set up an achievement like so:

    image.png.cf0a5661de425eef8b333782b04b4833.png

    Then in leadwerks, if you use lua, just call Steamworks:Initialize() in the main.lua at start. To set an achievement active do this:

    
    Steamworks:SetAchievement("STORY_COMPLETE")
    --And thats all :)

    Two things to keep in mind and which confused me are:

    1. Steam may take a while to display your achievements after you published them, so wait until you see them displaying in the steam store, or when you click on the game in your library.

    2. The achievement unlocked popup, will NOT show up while ingame, you only see after you closed the game and an achievement has been unlocked.

    There are also progressive achievements but the work pretty similar.

    Little tip: As those functions are not documented, activate auto complete for the Leadwerks IDE and type "Steamworks:" it will display all available functions.

    Good Luck :)

    I love you man!!!

    Thanks to this thread I have been able to make 2 things work:
    - The "Autocomplete" of the code. (Which I didn't know existed for the Script Editor y LE and it's a very welcome and needed feature for me.)
    - Works OK of my own achievements in my game.

    Thank you!!! Many thanks for this thread!!! :):):):)

    • Like 2
    • Thanks 1
  8. Finally!!! Nevermind team... Finally I got it!!

    I have used a simple variable to achieve this. This is my code that finally works with SOUND playing ONCE on ZOOM IN and SOUND playing ONCE on ZOOM OUT:

    local ZoomActivo=false
    
    if window:MouseDown(Key.RButton) then
    	self.camera:SetFOV(20)
    	self.camera:SetRange(0.05,1000)
    else
    	if self.sound.zoomout~=nil and ZoomActivo==true then
    		self.sound.zoomout:Play()
    		ZoomActivo=false
    	end
    	self.camera:SetFOV(70)
    	self.camera:SetRange(0.05,1000)
    end
    
    if window:MouseHit(Key.RButton) then
    	if self.sound.zoomin~=nil then
    		self.sound.zoomin:Play()
    	end
    	ZoomActivo=true
    end

    ????

    • Like 1
  9. Hi there team!!

    I'm working in ZOOM system for my game. When i press down the Right button of the mouse, we make ZOOM and the game plays a sound with this code:

    Load sounds:

    --Aquí cargamos los sonidos que necesitaremos:
    self.sound.zoomin=Sound:Load("Sound/MisSonidos/ZOOMCamara/ZoomIN.wav")
    self.sound.zoomout=Sound:Load("Sound/MisSonidos/ZOOMCamara/ZoomOUT.wav")

     

    Use loaded sounds:

    --Hacemos ZOOM al pulsar el boton derecho
    if window:MouseHit(Key.RButton) then
    	if self.sound.zoomin~=nil then self.sound.zoomin:Play() end
    end
    if window:MouseDown(Key.RButton) then
    	self.camera:SetFOV(20)
    	self.camera:SetRange(0.05,1000)
    else
    	self.camera:SetFOV(70)
    	self.camera:SetRange(0.05,1000)
    end

    This works ok, but I don't know how play a sound ONCE when we release the Right button of the mouse.

    Any tip that can help me?

    Thank you very much!!

  10. 36 minutes ago, Marcousik said:

    Hi

    You can use source without problems, just create it in start() function like this for example: (out of the car script - available in workshop)

    --------

    After this you can use the source with more options available in UpdateWorld()

    this should run ok and let you adjust volume, distance, pitch....

    Thank you very much, but I needed the code without any Source or any configuration like volume, distance or pitch. For this reason the code:

    if window:KeyDown(Key.J) and window:KeyDown(Key.F) and window:KeyDown(Key.V) then
    	sound = Sound:Load("Sound/MisSonidos/ValidarTICKET.wav")
    	sound:Play()
    	changemapname="1-Tutorial"
    end

    It's finally what I needed for the Main Menu of my game. If we press 3 specific keys, the sound is eared (without any element or entity) and the Map i need is loaded.

    However, I have saved your code as an example in case I need it in another project.

    Thanks!! ?

  11. Hello team!!

    After read learn page with the example and this thread I'm still trying to use and understand PointEntity... But i can't make this go to walk...

    ¿Could you help me? I have a scene with only 3 elements in there:

    1. A camera named: MobileCamera
    2. A model named: SpaceShip
    3. A brush called: Earth

    Camera.jpg.3b35cba14962319e684f356bee9107a5.jpg

    I want make MobileCamera (with Script called PointToShip.lua) always point to SpaceShip, but my code or my bad sintax doesn't work...

    This is my code:

    Entity1 = GetEntityByName("MobileCamera")
    Entity2 = GetEntityByName("Spaceship")
    
    function Script:Start()
    	self.enabled=true
    end
    
    function Script:UpdateWorld()
    	PointEntity(Entity1,Entity2)
    end

    I have read @Rick thread-topic about this command. But i don't understand to make success the sintax anyway...

    Many thanks!!

  12. I want thanks this thread!! The questions of @Core and the first answers of @GorzenDev and @Josh helped me a lot with the develop of my Main Menu in my game. After 2 days fighting with the LUA Sintax with newbie eyes finally i have reached my goal, and this thread has been the key to achieving it (Load images in the menu, configure Fonts, and the explanation of the MAIN.LUA, and more)

    Thanks a lot team!!!

    I want share you result of my work with your help (first version of the main menu):

     

    • Like 1
  13. 7 hours ago, Lethal Raptor Games said:

    I think you can play a sound without creating a source.  But if you want source you need a Listener, if you dont have a camera just set the position of the listener.

     

    3 hours ago, gamecreator said:

    According to the docs, the example code looks like this.

    
    sound = Sound:Load("Sound/Music/menutheme.wav")
    sound:Play()

    This should just play a straightforward sound.  No effects possible.  Don't think you can even set the volume but it sounds like you wanted to start with something simpler.

    I don't use Lua so I can't tell you where the code goes.

    OOOHHH YEAH!!!

    It works without "a source"!! As Lethal Raptor said, my problem was that i was creating a source in the sintax. I write the example code (I had not seen it on the Learn page) and it works for what I need to do.

    Restart all the game and change map in the game when the user press 3 keys in a row:

    if window:KeyDown(Key.J) and window:KeyDown(Key.F) and window:KeyDown(Key.V) then
    	sound = Sound:Load("Sound/MisSonidos/ValidarTICKET.wav")
    	sound:Play()
    	changemapname="1-Tutorial"
    end

    Thank you very much to you both!! ?

    • Like 2
  14. 12 minutes ago, Lethal Raptor Games said:

    For a source to be heard you will need a Listener.  I can't be sure, but I think you parent it to the camera.  You're probably better off loading your sound and creating the source at the game startup, and just play it on keypress.

    Thanks for your answer.

    Im new in LUA. Where in MAIN.LUA and how can i make that??

    (Anyway, as i said i don't wanna create or use any entities. Only Play a sound by code from MAIN.LUA when i press J, F and V.)

    No Pivot. No Listener. No noise.lua. No use the Flowgraph...

    Only code. Is it possible?? ?

  15. Hi there team!!

    I have another programing/sintax question to answer...

    I want load and play a sound file by LUA pressing 3 keys on my keyboard (without using any PIVOT. Without using NOISE.LUA script. And without using the Flowgraph).

    Only executed from code of my MAIN.LUA on my project...

    I have write this, but i don't know if i need anything more, or the sintax is bad writen. The code doesn't give me any errors, but i can't ear anything:

    if window:KeyDown(Key.J) and window:KeyDown(Key.F) and window:KeyDown(Key.V) then
    	local SonidoJFV = Sound:Load("Sound/MisSonidos/ValidarTICKET.wav")
    	SonidoJFV.source=Source:Create()
    	SonidoJFV.source:SetSound(sound)
    	SonidoJFV.source:SetVolume(100)
    	SonidoJFV.source:SetPitch(1)
    	SonidoJFV.source:SetLoopMode(false)
    	SonidoJFV.source:SetRange(900000)
      	SonidoJFV.source:SetPosition(Vec3(0,0,0))
    	SonidoJFV.source:Play()
    	--changemapname="1-Tutorial"
    end

    Any tip or answer that could help me?

    Thanks a lot!!

  16. 9 minutes ago, Marcousik said:

    Right thx adebgamesoft

     Actually it would be nice to use this shader on a specific material as it seems to turn all the scene to marble: It is so impossible to compose a scene with old creepy material and marble

    Here...

    Example only using DIFFUSE texture on our material (the skin on Triceratops). The SSR make the skin shiny and with reflection.

    Activado.jpg.d353b60c8196b70329f1aa14867c8d1d.jpg

     

    But if we work NORMAL and SPECULAR textures for the same Material, SSR doesn't work on them. Example on the same Material (the Skin of Triceratops):

    Desactivado.jpg.9be4386800364e08c517b91e503b5c65.jpg

    It's pure desing, not programation...

    ?

    • Like 2
  17. Just now, Marcousik said:

    Right thx adebgamesoft

     Actually it would be nice to use this shader on a specific material as it seems to turn all the scene to marble: It is so impossible to compose a scene with old creepy material and marble

    You don't need specify material for the Shader...

    You can change the textures are you using for SSR doesn't work on CREEPY material or old Wood or Cloth textures... For example in my game, this reflections don't work on my Cloth textures or rought Stone material...

    But you need play with the diferent types of textures you can create on your MATERIALS.

  18. 12 hours ago, Marcousik said:

    Hey Russel Nice showcase.

    How did you do the floor reflections may I ask? It s cool and realistic

    As adebgamesoft said, i have use SSR.SHADER (inside our Leadwerks) on PostEffects area inside ROOT. (It's a Shader like GODRAYS, SSAO o WOOBLE)

    SSR.jpg.17c2521722d35fb07ba833b8146d2d90.jpg

    Anyway, to take advantage of the effect, be sure work and create diffuse and Normal textures, with this the shader works well and we will get that aspect and relief on the reflection of the SSR.SHADER.

    But if you create and use too Specular and Displacement textures, you will get better effect of relief with the reflections of the shader.

    Texture.thumb.jpg.2be752c079651980db975e184eb1fc64.jpg

    • Like 1
  19. 32 minutes ago, shadmar said:

    There are water shaders in Dino Land you can steal (whole game is unencrypted)

    I believe the rest of the sahders are also there. 

    But Steal is a horrible word ????

    Anyway thanks!! I will look the code of shaders to learn from them, if I don't need it anymore because I have finished the underwater area of my game. Used the default stuff has Leadwerks inside it. (I think wobble.shader is developed by you Shadmar)

    This is the final result of yesterday work (thank you very much team with the help about sintax of how use addposteffect). I'm very satisfied with it:

     

     

    • Like 3
  20. 3 hours ago, Josh said:

    Without having tried it, I think you need something like this: 

    
    function Script:Collision(entity, position, normal, speed)
    	if self.enabled then
    		if entity.script ~= nil then
    			if entity.script.camera ~= nil then
    				entity.script.camera:AddPostEffect("Shaders/PostEffects/wobble.shader")
    		        self.enabled = false
    			end
    		end
    	end
    end

     

    I have now 2 collisions scripts differents for the Water area. One for ENABLE (thanks @Josh) wobble.shader effect, and another one for DISABLE it with ClearPostEffects()

    This is the result:

    Many thanks team!!

    Im very newbie with LUA, and sometimes one simple line of code takes me a long time to achieve my objetive.

    • Like 2
  21. 1 minute ago, Marcousik said:

    Yeah, i have check those links and another ones, but my problem is that i'm new in LUA and I fail in the syntax when i encode them in my scripts.

    For examplen for underwater i wanted use WOBBLE.SHADER adding it with a COLLISION TRIGGER. To simulate we are dry, and we enter to water.

    My codes fail a lot because the sintax. And finally with help of the forum (especially Josh give me this) i have use the correct code for solve my case:

    function Script:Collision(entity, position, normal, speed)
    	if self.enabled then
    		if entity.script ~= nil then
    			if entity.script.camera ~= nil then
    				entity.script.camera:AddPostEffect("Shaders/PostEffects/wobble.shader")
    		        self.enabled = false
    			end
    		end
    	end
    end

    I love you guys!!

    I'm learning a lot about LUA sintax. ☺️☺️☺️☺️

    • Like 1
×
×
  • Create New...