Jump to content

lxFirebal69xl

Members
  • Posts

    333
  • Joined

  • Last visited

Posts posted by lxFirebal69xl

  1. When the Linux build of the Game Launcher is available, I recommend only having your game on there. This way, it will easier to manage updates.

     

    I'm gonna be honest and say I'm not your target audience so I feel like I can't really give you valid input. But I still wish you the best of luck! smile.png

     

    I was thinking about that as well, but we still don't know when that will be released.

    Thanks for being honest about not liking the type of game it is though! (I'm guessing you got spooked? XD)

  2. So, I was making my sewers level today and I came across a hard decision, so I would like your opinion on it, I also made a poll so I can look at it later :P

    So here's the thing, I need to know which is creepier, the sewers with the fog effect, or without.

     

    Here's the sewer with fog.

    post-13811-0-16519100-1438304159_thumb.png

     

    And here it is without fog.

    post-13811-0-97284400-1438304192_thumb.png

  3. I was wondering how would you guys go about making a pause screen while you play the game, aka, the player presses ESC and a menu shows up, completely stoping everything in the world, then I guess 2 buttons would pop up, "continue" and "exit". Each of them doing exactly what they say, obviously.

     

    post-13811-0-06669600-1437997882.png

  4. Now the game starts, but when I crouch the same error pops up >_<

    I'll put my code here, in case you find something that's wrong.

     

    if entity.script.health>0 then
    local d = self.entity:GetDistance(entity)
    local pickinfo=PickInfo()
    --LOS BEGIN
    local entity_pos
    if entity.script.camera ~= nil then--if there is a camera object
    			 entity_pos = entity.script.camera:GetPosition(true)--use the camera position
    else
    			 entity_pos = entity:GetPosition(true)--otherwise, use the entity's position
    end
    --cast a ray from the monster's eye to the target position
    local pick_height=player.script.eyeheight
    if player.script.crouched then pick_height=player.script.crouchedheight end
    if self.entity.world:Pick(self.entity:GetPosition()+Vec3(0,pick_height,0),entity_pos,pickinfo,0,true,Collision.LineOfSight)==false then
    			 --when we reach here, the target is in line of sight
    			 --now we need to check if the target is in the monster's field of view.
    			 --we are going to measure the angle from the direction the monster is looking
    			 --to the target.
    			 local dir_facing = Transform:Normal(0,0,1,self.entity,nil):Normalize()
    			 local dir_to_target = (entity:GetPosition() - self.entity:GetPosition()):Normalize()
    			 local angle = math.acos(dir_facing:Dot(dir_to_target))
    
    			 --compare the resulting angle in radians, this determines the monster's field of view
    local window=Window:GetCurrent()
    			 if angle > 2.0943951 then --~120 degees
    			 return entity.script
    		 end
    		 end
    --LOS END
    	 end
     end
    end
    end
    

  5. Where the code for the noise is

     

    if self.alertnoise == false then

    playsound code etc

    self.alertnoise = true

    end

     

    Problem is, I don't know where exactly to put this code, I think it's here or around here. I'm not sure though...

    if self.entity:Follow(self.target.entity,self.speed,self.maxaccel) then
       if prevmode~="chase" then
     if self.sound.alert then self.entity:EmitSound(self.sound.alert) end
       end
    

  6. The closest flag should be true because otherwise the raycast could pick anything on that ray instead of just the closest. Also, the height isn't changing, so you need to account for that.

     

    local pick_height=self.eyeheight
    if self.crouched then pick_height=self.crouchheight end
    
    if self.entity.world:Pick(self.entity:GetPosition()+Vec3(0,pick_height,0),entity_pos,pickinfo,0,true,Collision.LineOfSight)==false then
    

     

    This will change the height at which the pick will end.

     

    I don't get where to put this :P

     

    Here is a shadow/light detector for sneaking (cpp is needed to build your own exe to expose a function to lua)

    http://www.leadwerks.com/werkspace/topic/11991-csg-shape-to-mimic-light/#entry87032

    I'll take a look at it, thank you.

  7. Exactly as it says on the tin, I've been getting the AI ready for my game when this started happening, basically when the monster atackes you, he does the alert noise again when you run away from him, doesn't matter if it hits you or not, he keeps spamming the alert noise over and over again, is there any way to make it so that it only does the alert noise once?

  8. In terms of texturing, I like 3D-Coat and Substance Designer best, they're kind of expensive, but they offer you unlimited amounts of possibilities in texturing.

    If you're looking for free software, sculptris is a very good starting point, and from there you could move on to either Zbrush or 3D-Coat.

  9. Today I fiddled around with the sneaking aspect and I got a crouching thing going on, since you know sneaking involves crouching and stuff.

     

    I made 2 new variables

    Script.crouchHeight = 0.6   --float "Crouch Height"
    Script.crouched = false --crouched
    

     

    Starting at line 629 of the FPSPlayer script this is what I got.

      -- Check for crouching
    		    if App.window:KeyHit(Key.C) then
    				    crouched = not crouched
    		    end
    
        --With smoothing
        --Position camera at correct height and playerPosition
        self.entity:SetInput(self.camRotation.y, playerMovement.z, playerMovement.x, jump , crouched, 1.0, 0.5, true)
    	 local playerPos = self.entity:GetPosition()
     local newCameraPos = self.camera:GetPosition()
     local playerTempHeight = 0
     if (self:IsCrouched()) then playerTempHeight = self.crouchHeight + playerPos.y
     else playerTempHeight = self.playerHeight + playerPos.y
     end
     --playerTempHeight = ((self:IsCrouched() == true) and crouchHeight or playerHeight)
     newCameraPos = Vec3(playerPos.x, newCameraPos.y ,playerPos.z)  --if newCameraPos.y<playerPos.y + self.eyeheight then
     newCameraPos.y = Math:Curve(playerTempHeight, newCameraPos.y, 8)
     --else
     --newCameraPos.y = playerPos.y + self.eyeheight
     --end
     self.camera:SetPosition(newCameraPos)
    

     

    Any thoughts if I should change something? This is just the crouching part of the sneaking, nothing else.

  10. That works for this pickup but I would refrain from making that sort of change to the FPSPlayer script. It could break some other item's Use function because they would be expecting the script object rather than an entity object. I would change FPSPlayer script back to

    if usableentity~=nil then
    
     --Use the object, whatever it may be
     usableentity.script:Use(self)
    

     

    Then change the pickup script to

    Script.battery_power = 50 --int "Battery power"
    
    function Script:Use(person)
    if person.battery_level ~= nil and person.battery_max_level ~=nil then
    if person.battery_level < person.battery_max_level then
    person.battery_level = person.battery_level + self.battery_power
    if person.battery_level > person.battery_max_level then
    person.battery_level = person.battery_max_level
    end
    self.entity:Release()
    end
    end
    end
    

     

    Allright that works as well, thanks hankinator!

     

     

     

    I think some of these features would be best to be broken out into their own classes. Flashlight seems like a prime candidate for this. The FPS player script is already a big mess. Plus integration/distribution/understanding/modification will be much easier.

     

    I think a great deal of things in the FPS player script could benefit from this and be much easier to manage and read.

     

    I completely agree with you here, it's such a pain to change code in the FPSPlayer script sometimes, maybe it's time for an FPSPlayer script overhaul.

  11.  

    What part of it is throwing you off?

     

    I went ahead and changed the battery pickup script to this:

     

    Script.battery_power = 50 --int "Battery power"
    function Script:Use(person)
    if  person.script.battery_level ~= nil and person.script.battery_max_level ~=nil then
    if  person.script.battery_level < person.script.battery_max_level then
    person.script.battery_level = person.script.battery_level + self.battery_power
    if person.script.battery_level > person.script.battery_max_level then
    person.script.battery_level = person.script.battery_max_level
    end
    self.entity:Release()
    end
    end
    end
    

     

    And I also changed something in my FPSPlayer script this is around line 445

    if usableentity~=nil then
    
     --Use the object, whatever it may be
     usableentity.script:Use(self.entity)
    

     

    I changed the "Use(self)" to "Use(self.entity)" and this makes it so that the flashlight pickup has to be actually picked up, aka, pressing E on it.

×
×
  • Create New...