Jump to content

Russell

Members
  • Posts

    187
  • Joined

  • Last visited

Everything posted by Russell

  1. Thank you very much for your answer!! I'm going to try it, even though camera1 is fixed, and camera2 is anchored on a moving platform.
  2. Hi there team!! I have one question i hope you can help me with... I have a level with only 2 cameras for show an animation prologue... Text and Images using POSTRENDER and context system works ok in CAMERA 1. But when i disable CAMERA1 and enable CAMERA2 for continue animation in another location of the map, TEXT and IMAGES don't appear on CAMERA 2... Anyone have any tip or idea why is this happening??? If you need more information ask me... I don't know how solve this... Thank you very much!!
  3. Here... This is my discarded code using LABEL for large subtitles with WRAP option: Script.FuenteHud = nil local gui = GUI:Create(context) local base = gui:GetBase() base:SetScript("Scripts/GUI/Label.lua") Script.TextoSubtitulo=""--string "Texto: " function Script:Start() self.enabled=false self.entity:Hide() self.FuenteHud = Font:Load("Fonts/monotypecursiva.ttf",14) x=context:GetWidth()-context:GetWidth()/2 y=context:GetHeight()-context:GetHeight()/8 widget = Widget:Label("",x,y,800,200,base) end function Script:ModificaTexto()--in widget = Widget:Label(""..self.TextoSubtitulo,x,y,800,200,base) widget:SetStyle(LABEL_BORDER + LABEL_CENTER + LABEL_MIDDLE + LABEL_WRAP) end function Script:LimpiaTexto()--in widget:Hidden() context:Clear() And this is the result using this code: Is not a bad start, but i don't like the result, or how improve this... At this moment, my best option is to continue using images to design the texts (5-10 kbs per image): I know is not the best solution, but until I control by code how to place the subtitles in the designated place regardless of the resolution chosen, I will continue using this system. Thanks for your answers team!!
  4. Thanks for your answer. But this ist not a working solution for me, since depending on the resolution of the game on the user's computer, those coordinates change, and text could go out of frame. Also I need to use the WRAP option to wrap the text in several lines for long texts, with Drawtext I don't know how to control that. Based on what i know i think only LABEL has that property. But i have the same problem. If i adjust X and Y on in FULL HD using context.GetHeight() or context.GetWidth(), if I change the resolution to HD or less, the text doesn't appear in place. Appears out of frame. Even if I don't use any frames and i leave the text free on the screen, i don't know how center down in the screen in all resolutions. This drive me crazy. ? XD
  5. Thirsty Panther nice to read you too!! I love you man!! This save my day!! I didn't know that I could extract fragments of the animations openen in the *.mdl models from ASSETS tab!! Now i have "Talk2Ticket" animation for my model, and the full "Talk" animation for other actions ingame. Works great!! Thank you very much!! For other people if they reach this thread with the same question:
  6. Thanks Marcousik!! I like the idea, but I'm not sure if it works for me in my specific case. The animation is changed by pressing a button. From the IDLE animation (animation1) it goes to the TALK animation (animation2) and it starts at frame 0. It would be very useful for me to get the TALK animation to start at frame 450 the same moment I push the button. Anyway i will try this idea. Thanks!!
  7. Hello Marcousik!! Nice to read you again!! Despite being simple, I can't create a script to write text in the frame that I have designed for our character's dialogues. (Dialogs of several lines that fit the designed box) As you can see in the screenshot, I have already used DrawText () for the texts that are at the bottom left: "Outside of the FotoMuseo" "FotoMuseo 3D - Exterior FotoMuseo" But if I want to write text inside that Frame box, I don't know how can align it, nor how I use the WRAP parameter and make it look good and fixed to the inside of the frame. At this moment, and until I learn how to program a Script that fits the text in this FRAME, I am using transparent images with text (for each dialog). So I can leave it like this: Or even display images in the text box like this too: But no idea how write any TEXT in the Frame using CODE (which is what I want to do) and make it look good and fixed to the inside of the frame. Thanks a lot!!
  8. Hello there again team!! I have an animated 3D model with 2 animations: IDLE or STAND (frames: 0 to 400) TALKING (frame 0 to 950) And with a version of SimpleAnimation.lua like this: Script.Speed=4.0--float Script.Sequence="0"--string Script.Anim2Speed=4.0--float Script.Anim2Sequence="0"--string function Script:Start()--in self.entity:PlayAnimation(self.Sequence,self.Speed/100.0,1) end function Script:CambiaAnim()--in self.entity:PlayAnimation(self.Anim2Sequence,self.Anim2Speed/100.0,1) end With this script I can change the animation ok. But I need change animation from IDLE to TALKING and TALKING animation start from frame 450. Can I change the animation of my model starting always from frame 450? Is possible? Thank you very much!!
  9. At this moment in my game i have a simple subtitle system using 4 elements: A button. An audio message. An alpha texture with the subtitle in. A timer with X seconds. (Where X is the lenght of the audio message) When we push the button, the audio message plays, the texture with the Subtitle appears on screen and the timer is ENABLED, and the the Button is DISABLED. After the timer is over, the subtitle texture hiddes. This is my WORKFLOW working ok: And this is my result using my own DESIGN of the HUD and SUBTITLES writen inside: This is my SCRIPT CODE for show the subtitles: Script.enabled = true --bool "Enabled" Script.HudTextura=""--string "Nombre Textura" local MostradaImagen="No" function Script:Start() if self.enabled==true then self.enabled=true else self.enabled=false end --EMPTY TEXTURE textureVacia = Texture:Load("Materials/MisTexturas/TexturaVacia.tex") end function Script:Enable()--in if self.enabled==false then MostradaImagen="Yes" ImagenTextura = Texture:Load("Materials/MisTexturas/Subtitulos/"..self.HudTextura..".tex") self.enabled=true end end function Script:Disable()--in if self.enabled==true then MostradaImagen="No" ImagenTextura = Texture:Load("Materials/MisTexturas/TexturaVacia.tex") self.enabled=false end end function Script:PostRender(context) if MostradaImagen=="Yes" then context:SetBlendMode(Blend.Alpha) context:DrawImage(ImagenTextura,0,0,context:GetWidth(),context:GetHeight()) end if MostradaImagen=="No" then context:SetBlendMode(Blend.Alpha) context:DrawImage(textureVacia,context:GetWidth()/2-textureVacia:GetWidth()/2,context:GetHeight()/2-textureVacia:GetHeight()/2,textureVacia:GetWidth(),textureVacia:GetHeight()) end end My trouble at this point is, i'm using one image for each subtitle, for each dialog. The only change in all of the images i'm using is the TEXT in Spanish or English for each subtitles and for each dialog appear in my game. I want use ONE single image with the FRAME of the SUBTITLES (like the screenshot but WITHOUT text). And then use LABEL ENTITY (or another) with LABEL_WRAP property for SHOW all of each subtitles i want write inside. I have tried using LABEL, using DRAWTEXT on Context. But i don't know how code them to make succesfull the APPEAR and HIDDE of the TEXT for each subtitle. I don't know how use them... Thanks a lot Josh!! Nice to read you again after my absence these last months.
  10. I'm trying do this using LABEL pressing a BUTTON. If I can do something useful and functional I will let you know. In the meantime, it would be helpful if someone gives me a clue of how make this success. Thanks a lot.
  11. Hello team!! It has been a long time since I was connected here. I hope you are all OK. That no one has been touched by the damn COVID. This week I have finally resumed my work with LEADWERKS, and I want ask you if there is a tutorial, or a site in the WIKI (Learn) that shows how create and display SUBTITLES on the screen inside our games. Is possible? I want to subtitle in English all the dialogues that I have recorded in Spanish in my game. But I can't find anything in GOOGLE, or in the WIKI (Learn), or here in the FORUM. Thank you, and I hope you are doing well! Cheers!!
  12. Ooohh yeahhh!!! Thank you very much!!! Works marbellous now!! I've got one script with the commands of ROOT properties. But SetFogMode was driving me crazy!! It had not occurred to me use the "player" camera to set the fog mode. Now i'm complete!! Many Thanks!! I'm working on "secret" areas in my map, (achievement hidden areas), and one of those areas needs change global illumination, fogmode (and color) and the skybox... ☺️☺️☺️☺️
  13. Thanks, but doesn't work for me... Nil value error too. This time "attemp to index field 'camera' (a nil value)" If i write Script.MainCamera=""--entity for save this error, appears again SetFogMode command line nil value of the beginning of this thread. I'm trying other things, if i obtain a solution, i will post the code here. :-)
  14. Hello team!! I hope you are ok on these strange days. I'm still working on my minigame for Steam. Today i'm trying to modify ROOT properties of my map with LUA for making one surprise and secret event in the game. And i need disable FOG... With this code: function Script:Oscurecer()--in world:SetFogMode("false") world:SetAmbientLight(0,0,0) world:SetSkybox("Materials/Sky/DarkStormy.mat") end function Script:Aclarar()--in world:SetFogMode("true") world:SetAmbientLight(0.35,0.35,0.35) world:SetSkybox("Materials/Sky/zonesky.mat") end All works OK except FOGMODE... SetFogMode command give me NIL VALUE error. I want Oscurecer() disable FOGMODE and Aclarar() enable it again... After looking in the forum, i'm not be abble to find what is the correct line of LUA for make this. world:SetFogMode("true") or false doesn't work for me... Anyone know what is the sintax of this line??? Thank you!!
  15. Hello team!! I have a short question to do here. I don't know what is better sintax for check if Steamworks is Initialized before we execute the Achievements code... Is like this: if Steamworks:Initialize() then Steamworks:SetAchievement(self.Achievement) end Or like this: if Steamworks:Initialize()==true then Steamworks:SetAchievement(self.Achievement) end What is the best sintax to do this??? Thank you very much!!!
  16. The solution by Josh works for me. Now instead of having a single 2 gigabyte file, I have several smaller files with the same content as the single file. This is the solution given by Josh. (I have pushed it at the beginning of the thread for rest of the users if anyone has the same problem):
  17. @Josh , has anyone else ever had a data.zip with size larger of 2 gigabyte before?? Has anyone else had this problem or similar with large file datas??
  18. Josh, can i make a video (for the forum) explaining my problem, and how your help with the secret setting spliting data.zip files solve the problem??? Hahahahaha, is funny!! The EXE doesn't work with the original DATA.ZIP(1,8 gigs). But if i try it with the 15 files data.zip created with the change on the CFG (87 mb - 180 mb per file) the EXE works OK!!! Anyway, i will work in a new BLANK PROJECT and move ONLY the files i need to it. 43 gigs of project is not a good number.
  19. JOOSSSHHH!!!!!!!!!! WITH THE DATA.ZIP TWICED with the number you give... MY PROJECT WORKS AGAIN!!!!! I CAN'T BELIEVE!!!! I will make a VÍDEO to show you!!!! Again i say something i said before!!! I love you man!!!! I will build a House in "The Gran Vía"!! I will make the vídeo recording the problem with DATA.ZIP bigger than 1.8 gigas...
  20. Since we had talked about trying "blank projects" to compare the files that were generated in them with the files generated of my project, I understood that "new project" you asked me was referring to that "Blank project". It seemed strange to me, but perhaps you still saw something that my computer generated when exporting projects with Leadwerks.
  21. Appears this: maxpublishzipsize=-2147483648 I will change for example like this??? maxpublishzipsize=-268435456 Putting - too?
  22. Because only me (who am a melon, (melon, tarugo, pellizcabombillas, etc, etc) ?) has thought to load gigs and gigs in textures that I have been created, bought and used over the years in another type of works, and put them in the library of my Leadwerks project (Whether I was going to use them or not.), instead of putting them one by one as I have needed them. For this reason I am going to start a new Blank Project, and do what I should have done from the beginning. Perhaps in this way, also i can find the file causing my problem with the exe in the standalone version publish. I'll keep you informed team!!
  23. My project size are more than 43 gigs. Even if the standalone publication only need 1,8 gigs. (I can't upload that size with my Inet line without suffering several seizures ?) I'm trying to make a Blank Project with only the files I need for my project. If this doesn't work, I would try to upload it to my hosting so you can download it. Thanks Josh. ☺️
×
×
  • Create New...