Jump to content

Core

Members
  • Posts

    139
  • Joined

  • Last visited

Everything posted by Core

  1. I have a annoying problem with Blender. Problem is this: After saving, hand painting does not work properly anymore. When I try to draw straight on the surface of the model, it leaves some pixels without color. Like there is a random noise all over the texture, that just does not take color in. Here is image about the problem. Highlighted edges in the image are painted before saving and are ok. Problem can be seen in the white smudge on the right, "dead pixels" that can't be painted. Can anyone advice? I¨m still learning this stuff, so might be something very simple.
  2. Thanks a ton! We will see if I need to use DistanceTo afterall, this followinf script works and is a good start atleast: self.position = self.entity:GetPosition() local pickInfo = PickInfo() if (self.entity.world:Pick(Vec3(self.position.x,self.position.y,self.position.z),Vec3(self.position.x,self.position.y-1,self.position.z),pickInfo,0,true)) == true then self.entity:AddForce(0,30,0,true) end Edit. Oh, and by the way, your Project Saturn video tutorials were fantastic! I learned so much watching them!
  3. Hmmm... I've only played Halo1. I don't remember Guilty Spark But most likely something similar. But, is this correct, this way I can check if entity hovers over ANYTHING? local pickInfo = PickInfo() self.entity.world:Pick(Vec3(0,0,0),Vec3(0,1,0),pickInfo,0,true) But How can I use GetDistance() between picked spot and hovering entity? Edit. Well, about physics, no, I might not need real physics with this one, but I just want it to look like it is hovering above the floor. And it kinda does it now being on top of invisible cube. Well, can I use Springs, or vehicle stuff... Hmmm... That is an area that I have yet not explored at all. edit2. Oh, just noticed that you wrote more than just about Guilty Spark. I read about Pick already. And thanks! I think I have enough information now to try, ofcourse, I need just the distance when pick happens!
  4. I'm trying to create small hovering craft type thingy, that follows player. It already follows using Follow() function. Now I'm just trying to make it "see" the ground under it, "see" how far/close it is so it knows when to fire "thrusters" to stay airborne.
  5. Thanks for the quick responses. @AggrorJorn, that is exactly what I'm trying to do, though I explained it very badly. I even have emitters allready running and condition for checking distance to the floor. But my problem is Pick, I'm not sure how to actually use it... @Rick yes, not sure about physics. it just first came to my mind when started to think about this this and thought it might look cool. But I'm very inexperienced with this stuff, so not sure what other alternatives there are. Other than putting no weight on it or placing it on top of an invisible box, like it actually is now Well, it almost looks like it is hovering, emitters and all
  6. Ok, I may be out of my depth, but I'm planning a scipt to make an entity to hover over another entity (floor, ramp etc.) I'm just asking am I even near the right path, if I think it would work something like this: I need to check what is under the entity and get it's shape, surface. PickInfo? Then I need to GetDistance to that entitys nearest point on it's surface. And then if it is too close, I AddForce to thrust up. Problem is the first part, I'm not sure how to get entitys shape and determine nearest point (the point right under the hovering entity). I'm not asking full script, just some tips and maybe an example how to determine distance between entity and a certain point on another, much larger entitys surface?
  7. Ok, sorry it took so long! Here is simple map with entity (cylinder) following the target (player). If there's no target, map crashes. And actually while quickly testing this map, I managed to crash the map once even if there was a target and Follow() function was working. And peculiar enough, at one point I was KILLED by the cylinder! FollowingThingTest.map Edit. And this is the first time I upload a map, so please advice, what should I include? I just realized that map file only most likely is not enough... Edit2. Added the AI script. Other map assets are from default fps project FollowAIBasic.lua
  8. Yeah, thanks. I've moved to do other stuff currently, but when I get bag to doors I'll post here if I still have problems. Funny, doors are my nemesis, I think... I've had lots of problems with them.
  9. Thanks. I tried that first but noticed no difference in color. But I'm clearly missing something simple, again. Thanks for your response!
  10. Yes, that. Ambient light color is easily changed, but How Do you choose spotlight color?
  11. Well, it WAS working, now invisible boxes stopped to follow the doors when they open... Well, I knew it was too easy. But shouldn't entities follow their "parent", which is the door in this case? They actually did first... Next I think I'll try to hide this invisible box when the door is opened and then show it again when closed. Or add door script to pivot and put door model and invisible box under that. Any better ideas?
  12. Oh, just managed to find out the problem... Sorry, It was my own fault, I have inventory script where I target this entity I was trying to "float" and at some point it had lost the pointer to this entity (or how do you say) I didn't check for "no target" in that script, so it crashed the whole game. That I don't understand why it rendered all my previous map saves unusable too. Took some time to figure it out... But yeah, lot to learn... And thank you very much for your offer for help, much appreciated
  13. Ok, I don't know what happened, I was trying to get entity to "float" over floor using AddForce() and suddenly my game started to crash the very first moment it loaded. And even if I load one of the older backup's that certainly worked back then, they crash too. I'm very worried, all my work suddenly stopped working. What can I do to fix this, please help!
  14. Ok, I got around this by adding box primitive with invisible material to the door. I'm not sure if this is a bug or just me, but I'm glad It works now. If there is a more official way to do it, please tell me
  15. Ok, I think this is a simple problem, but problem for me nevertheless. I have "helper" in my game and it follows the player. I'm using Follow() function. But it can go through closed doors and other entities, I guess it's movements are only restricted by navmesh. I tried all collision settings, different masses etc. How can I make it "see" doors and other obstacles? I can't walk through it though.
  16. Oh, this is cool. I've toyed in my mind the idea of creating interface where text prints to screen like in Nostromo from Alien movies. This is way above my current level with lua though, but it looks like Ricks example above can be used to do exactly that!
  17. I can see them now, thank you very much! And yes, actually I am browsing with my phone atm, but situation was the same yesterday evening when I was on my computer. On both I use Chrome. But thank you again, it was quickly fixed!
  18. What on earth... I can't see that. If I click learn from the dropdown menu in the main page it goes straight to Editor interface tutorial. If I click tutorials, I can see all tutorials, but if I click documentation, it goes back to Editor tutorial. No API reference anywhere!
  19. Thank you for quick response! Good to know where the tutorials can be found, but that is not what I'm looking for. I ment the reference, where were listed all the lua functions like Font::GetHeight() etc. And usually with example script where it was on use. But I think it's somewhere there, just can't find it...
  20. Sorry if this is a stupid question, but I just came back to Leadwerks after two years to continue my learning journey to game developement. I'm having a good time learning and making progress, finally, but I cant see API reference anymore. Links in the OP just give me empty page.
  21. I guess no one else is experiencing this doorproblem, so it must be something I have created by my self. Can I screw up original assets from the leadwerks dir by accident? So when ever I start new project, it copies possibly faulty assets to the new project aswell?
  22. Core

    Multiple fonts

    Thanks shadmar. I'm aware of the API reference and it is very useful, but examples could be commented so noob like me would know exactly what specific line does. I bought FlowGUi and it is very helpful!
  23. Core

    Multiple fonts

    Thank you very much. context:SetFont was the key part I missed. Here is my current progress with Tittle screen: Why tab is not working I don't know, sorry a bit hard to read... function Script:Start() self.Tittle = "Tittle" self.Tittle2 = "Subtittle" self.Menutext1 = "Press ENTER" font1 = Font:Load("Fonts/LCD-N.ttf", 100) font2 = Font:Load("Fonts/arial.ttf", 30) font3 = Font:Load("Fonts/LCD-L.ttf", 30) return true end function Script:UpdateWorld() if window:KeyDown(Key.Enter) then self.component:CallOutputs("Activate") end end function Script:PostRender() self.DisplayEnabled = true if self.DisplayEnabled == true then context:Clear() context:SetFont(font1) local font1 = context:GetFont() local screenwidth = window:GetWidth() local screenheight = window:GetHeight() local x = screenwidth/2 local y = screenheight/2 context:SetBlendMode(Blend.Alpha) context:SetColor(0,0,0) context:DrawRect(0,0,screenwidth,screenheight,0) context:SetColor(1,0,0) local font1_x = (screenwidth - font1:GetTextWidth(self.Tittle))/2 local font1_y = (screenheight - font1:GetHeight())/2 context:DrawText(self.Tittle,font1_x,font1_y-200) context:SetFont(font2) context:SetColor(1,1,1) context:DrawText(self.Tittle2,x+80,y-130) local font3_x = (screenwidth - font3:GetTextWidth(self.Menutext1))/2 local font3_y = (screenheight - font3:GetHeight())/2 context:SetFont(font3) context:DrawText(self.Menutext1,font3_x,font3_y+200) end context:SetBlendMode(Blend.Solid) end I'm just getting a bit frustrated for the lack of documentation... I understand that this is a one big learning experience, but feels that I spend too much time searching from the net and combining different pieces of information in to one just to put up some very basic tittle screen, for example. Every game needs an UI! There should be official tutorial for it! Next step is to learn to load map after pressing enter on tittle screen, and it sounds simple enough, but I'm allready sure it is not that simple... But, sorry for ranting, I love Leadwerks still I'm more angry at myself and my thick head.
  24. What is the best way to handle multiple fonts? Currently I load new font every cycle before every drawtext... I'm very noob with lua, so could someone post short reference script.
  25. Ok, still fighting with this problem. I once had all my five doors on my map working with manual controlling, looks like moving and rotating them fixed them(?!). Then I decided to try attach button to one of them. Button worked, but then, door was jamming again. Then I reloaded new door. put it in the scene without walls surrounding it and tried it with stock settings. It was working. Then I moved it in to it's place. Still working. Scaled it, rotated it, still working. Attached it to a button, working. Then I reversed it's movement and it started jamming. Now I have a door that seems to be working. If I set negative "Distance" value to reverse movement (in my case -2.0 on first Distance box in Script properties), it jams on the second open/close try usually. Using positive Distance value seems to be working. But this is strange, I have currently other working manual controlled doors on my map with negative distance value (the ones that I earlier just moved around and they started working). This puzzles me beyond belief and being noob with Leadwerks and lua does not help a bit.
×
×
  • Create New...