Jump to content

randomdude

Members
  • Posts

    70
  • Joined

  • Last visited

Posts posted by randomdude

  1. For people who want to use this, just make two triggers, one enables and one disables.

    function Script:Start()
    	self.enabled=false
    	
    end
    
    
    
    function Script:Enable()--in
    	
    	if self.enabled==false then
    		self.enabled=true
    		
    	end
    end
    
    
    function Script:PostRender(context)
    
        
        if self.enabled==true then
            local text = "Hello!"
            
    		local font = context:GetFont()
    
    		local x = window:GetWidth()/2
    		local y = window:GetHeight()/2
    
    		x = x - font:GetTextWidth(text)/2
    		y = y - font:GetHeight()/2
    
    		context:SetBlendMode(Blend.Alpha)
    		context:SetColor(1,1,1)
    		context:DrawText(text,x,y)
        end
    end
    
    	
    
    function Script:Disable()--in
    	if self.enabled then
    		self.enabled=false
    		--self:CallOutputs("Disable")
    		
    	end
    end

     

  2. Okay Thanks. These Timers aren´t working somehow, I tried a lot of variations. Dont know what is wrong. Its either ignored or nothing happens.

    But this DrawText function is what I need. This here is working correct but the app is stopping.

    function Script:Start()
    	self.enabled=false
    end
    
    
    
    
    function Script:Enable()--in
    	if self.enabled==false then
    		self.enabled=true
    		--self:CallOutputs("Enable")
    		local text = "Hello!asdasdasdasdasdasdasdasdasd"
            
            local font = context:GetFont()
    
            local x = window:GetWidth()/2
            local y = window:GetHeight()/2
    
            x = x - font:GetTextWidth(text)/2
            y = y - font:GetHeight()/2
    
            context:SetBlendMode(Blend.Alpha)
            context:SetColor(1,1,1)
            context:DrawText(text,x,y)
    		context:Sync()
    		Time:Delay(1000)
    	end
    end
    
    function Script:Disable()--in
    	if self.enabled then
    		self.enabled=false
    		--self:CallOutputs("Disable")
    		
    	end
    end

    I tried instead of Time:Delay this timer function but its not working.

  3. function Script:Start()
    	self.enabled=false
    end
    
    
    function Script:Enable()--in
    	if self.enabled==false then
    		self.enabled=true
    		--self:CallOutputs("Enable")
    		local gui = GUI:Create(context)
    		local base = gui:GetBase()
    		base:SetScript("Scripts/GUI/Panel.lua")
    		x=100
    		y=50
    		local sep=30
    		widget = Widget:TextArea(x,y,500,100,base)
    		widget:SetText("This function creates a textarea widget.\n\nA textarea is read-only widget that can display multiple lines of text.")
    		y=y+sep
    	end
    end
    
    function Script:Disable()--in
    	if self.enabled then
    		self.enabled=false
    		--self:CallOutputs("Disable")
    	end
    end

    Okay cool, thats fuctional. but how do  get only the window with text and the game as background? And how do I get it stopped after a specific time?

  4. The mapname needs to be correct with lower and upper cases.

    if self.newbutton:GetText()=="NEW GAME" then
    					if Map:Load("Maps/begin.map") then
    						prevmapname = "start"
    						
    						--Send analytics event
    						Analytics:SendProgressEvent("Start",prevmapname)
    						
    						self.newbutton:SetText("RESUME GAME")
    					end
    				end

    This works for me. make a screenshot of your scene in LW.

  5. Quote

    MoCap? How did you do that? You dont have a professional mocap studio I guess. You used that kinect thing did'nt you?

    Sure I make them in my basement. haha Nah google for free BVH, makehuman, makewalk and blender. In blenders makewalk-tab you need to select "global edit" and there "fixate bone location". then export as .fbx. The thing I dont know at the moment is how to reassign the positioning dot. Maybe you know? I make a video. I want this Dot in the center, but I cant grab it, or just the name of it would be good to know. https://www.twitch.tv/videos/169660004

    (Edit: Nevermind I found it, you need a extra programm called "bvhacker" to get it in position. Thats the downside of free stuff. xD)

     

    Quote

    Of course, but I am talking about you have an entity in the editor for every csg brush, so for larger structures you will generate many entites. A single modle just counts as one entity. And the number of entites also affects performance know what I mean?

    Sure I understand. I´m not a complete expert on this, I just know for sure, that the faces will be rendered and calculated. So I keep them as low as possible. In the other ingame video I uploaded yesterday the fps drop to 30-60 at one point and that is because I made one NPC highpoly with over 40k polygones.I made my mainlocation with so many CSG, lights, particles and models and still have 60 fps an my pretty old graphic card. Its not entirly finished and I dont want to reveal it.

    Quote

    know what I mean. But I guess what you actually mean is to not overload your scene with details dont you?

    No, I get your point but I mean I´m not a modeler and I use Blender for such things. The models just look different and if you make for example an entire city with models in blender and add them into LW you have made you map in blender and thats what it looks like.You can do this but I personally dont like it.

  6. Hey Ladies and Gentleman,

    I´m working on a sidelocation and have it nearly finished. I try to beg a script to do multiple animations in a row, like animation1, then animation2, etc.. In the Video I use Hankinators AI scripts and I placed a lot of pivot at the same spot to do the animations in a row. But its always switching back to idle or walk after the animation is completed what looks kinda weird.

    --[[

    Edit: I´m just stupid, its not a bug.

    I also have a problem with the NavMesh, like you see in the video, the AI stops doing its work. I think its a bug or something because I made multiple navmeshes and it still stops working on specific points. I want the player to get chased by the AI but it just stops and does nothing, especially around corners. Am I doing something wrong or what is the problem? I need some clarification before I make a bug report. (I tried both normal AI script and Hankinators AI script, multiple navmeshes)

    ]]--

    Here is the video.

    https://www.twitch.tv/videos/169566657

     

    I tried a lot to solve this but I came to the conclusion its a bug, but its better if someone else gives an opinion.-- "No its not you Scrub."

    Anyway the main thing is the animation script because I will need it a lot, as well as someone else who wants to do some theater stuff.

     

    Thanks in advance.

  7. Haha yes I skipped that at the beginning, thought I dont need it but it is a real game engine, not gameguru or **** like this. You need a lot of time to get into but it is so much fun playing around her if you know what you can do. You can create your own world, its so awesome.

    • Upvote 1
  8. Quote

    The idle animation needs 500 miliseconds to blend into the walking animation. So the blending always happens you just decide how long it takes, if it is nil or 0 then no blending happens.

    Ohh ok thats the infomation I needed, so it does it always, I dont need to call for it. Thank you very much.

    Quote

    I have that problem with good working animations and models, but I really want to learn it. Currently getting into ZBrush. My Animation skills are at least good enough to create some basic motions.

    Had the same issue with animations, takes long to understand all this variations and stuff. I made a character for that purpose which has a big load of MoCap-animations which can be loaded on other Characters with the same rig in LW.

    Quote

    Did not knew that yet, but some time ago I created an whole house with CSG Brushes and it lead to heavy performance issues, because its creates a LOT of entites.

    Yes if you do it not this way or lets say you are not making all unseen sides invisible you get fps problems. The engine is rendering any textured side. you can either retexture all unseensides on your house or you make it new with that technique. What is very importent as well, is that you make sure the CSG do not overlap into other CSG, this will drop your FPS as well.

    In LW itself you cant make specific sides of models invisible as far as I know. The point is you loose all of LW beauty if you use too much models. In my opinon Models are not more than details. But its more my personal preference.

    Quote

    Well working hard, I guess cant take too long till I will show some stuff. I have huge plans :D working for about an year on my current project, but not much model/animation work is done yet, but as mentioned before its just an framework no real game or something but whatsoever ^^

    Haha no worries, just said that to reason my mapping drift, due to my bad English the thread says I´m helping someone so, we are back on track. haha

  9. Hey man,

     

    Thanks again, yes that was my question, there is the playanimation stuff so why I need a animationmanager? I got this let me know if you finished your script if you want.

     

    Yes I saw this but I have no idea how this is meant.

    number blendtime=500

    thats the time I can set but how do animation one know that animation two has to blend into? I dont understand how is it used. do I have a function like "function blend()" or BlendAnimation or something like that?

    I have no idea what raycasts are but you dont need to explain this. I will look if I find something in the forums. " The only thing this lines of code does is to search for entities which have an "Use" function inside their script. " I can do do something with this, let me think a while about that.

     

    Yeah its fun for me as well, but I want to get it done, it takes just too much time and then it doesnt work. My plan is to finish the maps and do this at the end.

    I have my skills in mapping and the editor. If you ever have a performance problem or no idea how to give your maps a special touch just let me know. I have not seen something from you but the most people here make lets say a lot of mistakes that make their maps look unprofessional, they then blame the engine and go und ue or unity, but I love the graphics, the sharpness, I have so much fun doing this mapping stuff. I mapped a lot in hammer and world when I was younger. One good tip that most people do wrong is thinking, useing models as mainstructures in your maps make its performance better. but thats not true. Here I made a video for you to see a very importent tip in making maps.

    https://www.twitch.tv/videos/169168592

    Thats one of the most important things. you have to make all sides that can not be seen invisible. So you can maintain optimal performance and make use of the great engine graphics.

    I just telling you this that its not so one-sided.

    Have good luck too.

     

     

    • Upvote 1
×
×
  • Create New...