Jump to content

Core

Members
  • Posts

    139
  • Joined

  • Last visited

Posts 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 Textureproblem.thumb.png.55b6764cf42a97586cf83fd5222c5c11.pngtexture, 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 :D 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. 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?

  9. 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

    • Upvote 1
  10. 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!

  11. 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. 

  12. 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!

    • Upvote 1
  13. 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?

  14. 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!

  15. 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.

×
×
  • Create New...