-
Posts
189 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Russell
-
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?? ?
-
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!!
-
@Marcousik same example... Scene with creepy materials and marble/shiny wood ground... So as you seen it's not imposible... You can make a scene with all creepy materials and only some marble materials in there. But you need work the Textures. Not the shader.
-
Here... Example only using DIFFUSE texture on our material (the skin on Triceratops). The SSR make the skin shiny and with reflection. 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): It's pure desing, not programation... ?
-
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.
-
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) 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.
-
@shadmar incredible Dino land!! I don't need now, but in the future in another "minigame" or level in my museum, would you give me your permission to use the camera model and fps hands??? They are cool!!
-
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:
-
changing state of post-process shader by code
Russell replied to Christian Clavet's topic in Programming
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. -
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. ☺️☺️☺️☺️
-
changing state of post-process shader by code
Russell replied to Christian Clavet's topic in Programming
I will say something that many people will tell you in the forum: "I love you Josh!! I love you buddy!!" It works!! Thank you very much!! You have saved my day -
changing state of post-process shader by code
Russell replied to Christian Clavet's topic in Programming
I don't have any camera on the map. Only de FPSPlayer.prefab of our character. This is my code for CollisionTrigger... Is the default of Leadwerks... function Script:Start() self.enabled=true end function Script:Collision(entity, position, normal, speed) if self.enabled then self.component:CallOutputs("Collision") end end function Script:Enable()--in if self.enabled==false then self.enabled=true --self:CallOutputs("Enable") end end function Script:Disable()--in if self.enabled then self.enabled=false --self:CallOutputs("Disable") end end Any hint of how encode camera:AddPostEffect line??? I have tried this: function Script:Collision(entity, position, normal, speed) if self.enabled then self.component:CallOutputs("Collision") self.camera:AddPostEffect("Shaders/PostEffects/wobble.shader") end end And in have tried this too in the same script: function Script:Render(camera, context, buffer, depthtexture, diffusetexture, normaltexture) camera:AddPostEffect("Shaders/PostEffects/wobble.shader") end It doesn't work... I don't know how encode this... -
changing state of post-process shader by code
Russell replied to Christian Clavet's topic in Programming
Thanks for your answer Josh. But my problem is how encode that line in a Script. If I write that command in my own script appears error of nil value. My case using the flowgraph is this: I've got a box (called Trigger_EnableDisableWobble) with texture Trigger, with Physics Trigger and Script collision trigger.lua. How and where can I encode the line addposteffect when our character touches the trigger to add that shader? Thanks for help. -
changing state of post-process shader by code
Russell replied to Christian Clavet's topic in Programming
I'm new in LUA, im trying to do this. Any tip i can follow to code ENABLE/DISABLE Shaders. I'm trying enable/disable WOBBLE.SHADER when i go out of water or underwater. I have readed gamecreator link about entity camera: And i tried encoding myself script with AddPostEffect command, but i don't know how use it. Any tip or code example to see the sintax??? Thank you very much. -
Hi there team!! Hi there Reepblue!! I'm working on my project trying to make this idea. Using WOBBLE.SHADER effect only underwater... But i don't know how check if the camera is below the world's water level. And more less how apply or remove effect by code... Any clue so I can get it??? This is the starting design for my idea:
-
how make "Moving Platforms" Face direction of motion
Russell replied to Russell's topic in Programming
Thanks for your answers!! I will study all of them, for make my platform turn face of motion. I'm little confuse about how use of all those entities in learn page wiki, but i will manage to success this question about the platform. I don't know if I'll get it. But if I succeeded, I will post it here my solution. Many thanks team!! I am very proud and satisfied of the people in this forum. ☺️☺️☺️☺️ -
Camera don't render on texture in STANDALONE version
Russell replied to Russell's topic in Leadwerks Engine Bug Reports
Josh here the download with an example of my problem (or leadwerks bug). DOWNLOAD CAMERA TEST Inside you have 2 folders. The project with the camera and the texture target for the render. From Leadwerks works OK. The Standalone publish of the project. Texture appears AQUA without camera render. As I said in this thread, i don't use any script for the Camera. Only Leadwerks functionality. I don't know if i need something more, or is a Leadwerks bug at this moment... Thank for your help. ☺️ -
Camera don't render on texture in STANDALONE version
Russell replied to Russell's topic in Leadwerks Engine Bug Reports
I will prepare files and give you download link. Thanks. ☺️ -
Camera don't render on texture in STANDALONE version
Russell replied to Russell's topic in Leadwerks Engine Bug Reports
Thanks for your answer Marcousik. I don't use any script for my camera. I only put the CAMERA entity focusing an area. I use the option RENDER TARGET selecting my texture like this: camaratexturarender.tex is my AQUA texture for receive the images from camera. But I don't use any script for this... So... At this moment this option is bugged on Leadwerks exporting the STANDALONE version??? I will read the thread you give me with the info of the minimap of Macklebee for take any idea to solve my problem. But at this moment I think i will take 3-6 pictures with timers to simulate the camera effect i need. I only want to show the Portal Vortex appearing before the full activation. As a i said, running my game from Leadwerks the camera works OK and render image on my texture. This is what we should view in the STANDALONE version: If anyone has another idea with this, it will be welcome.☺️ -
Camera don't render on texture in STANDALONE version
Russell replied to Russell's topic in Leadwerks Engine Bug Reports
Yes, i've checked it and the texture is fully loaded in the exported Standalone version (inside the encripted Zip file generated by Leadwerks on the export). You can see it in the screenshot i've attached. Is that AQUA texture that appears in the Screenshots. -
Camera don't render on texture in STANDALONE version
Russell replied to Russell's topic in Leadwerks Engine Bug Reports
Hi there @Josh, do you know if this is a bug, or i need something more for the Standalone publish?? Running from leadwerks works, ok, but from Standalone doesn't... -
Camera don't render on texture in STANDALONE version
Russell replied to Russell's topic in Leadwerks Engine Bug Reports
Can someone help me? Thanks. -
In my game i created a "security camera" here: Renderized on AQUA texture i've created. All works ok when i RUN THE MAP from Leadwerks: Camera runs ok, and it shows all movements in that area... But, when i PUBLISH STANDALONE version to make a full TEST outside the engine, the image of the camera doesn't appear on the screen. Like this: Anyone knows why is this?? I have searched hire in the forums and Google, but i can't find a solution to my problem Thank you very much!!
-
how make "Moving Platforms" Face direction of motion
Russell replied to Russell's topic in Programming
I think this is the part of the platform code i need to put the POINT code entity (last part of this code between comments): function Script:SetTarget(newTarget) self.currentPosition = self.entity:GetPosition() self.originPosition = self.entity:GetPosition() self.targetPosition = newTarget:GetPosition() self.distance = self.originPosition:DistanceToPoint(self.targetPosition) self.target = newTarget local pos = self.entity:GetPosition(true) local targetpos = self.target:GetPosition(true) local pin = pos - targetpos self.distance = pin:Length() pin = pin:Normalize() if self.joint then self.joint:DisableMotor() self.joint:Release() end self.joint=Joint:Slider(targetpos.x,targetpos.y,targetpos.z,pin.x,pin.y,pin.z,self.entity,nil) self.joint:EnableMotor() self.joint:SetMotorSpeed(self.speed) self.joint:SetAngle(-self.distance) --Here i think is needed Point code to turn my platform face direction of motion: self.Transform:Point(targetpos.x,targetpos.y,targetpos.z,nil,model) --Don't know what parameters i need to platform FACE up direction to the pivot waypoint... end Thanks in advance for your help!! -
how make "Moving Platforms" Face direction of motion
Russell replied to Russell's topic in Programming
I'm testing this with this example platform (The red face should always go to the front, but it doesn't? I don't know how solve my case of how platform turn face direction of motion and i don't understand "Point" entity sintax to help me with this... In other engines, like valve's Hammer, we have this option: In Leadwerks is anything like that or a code for Moving Platforms?