Jump to content

xtreampb

Members
  • Posts

    321
  • Joined

  • Last visited

Posts posted by xtreampb

  1. also just a shot out in the dark, it appears (i'm don't know for sure) that anything that has to do with lua objects require the Script:delete() function as the world:clear calls this function (maybe recursively) until all entities are removed. if an entity doesn't have the delete function then it isn't removed from the world. Just an observation and thought I have.

  2. so for each of your features, this is something i'm having to force myself to do, is to explain how you expect each of these features to work in your game. You may think that this sounds self explanatory but you need to be specific. Lets take bullet penetration, What can bullets penetrate, how thick of what material, how do you plan on calculating this, how much, if any, damage dealt/velocity will be loss. how does that relate to thickness of each material. This is just a few examples off of the top of my head, for questions that need to be answered just for your bullet penetration idea.

  3. I was doing this in my castle demo with that brick wall i posted a while ago using LE 2.5 If you want it to fall set the unbroken to a mass of 0. This will set it so that it isn't affected by gravity. In your object class, set the collision callback function to react to the unbroken model. have it call a break function that will move all the broken children to the location of the full model, set the velocity of the full model to each broken piece, show them and set their mass to 1. Keep in mind i was having some performance issues with 3.0 but i've been told that the cause of these issues have been resolved in 3.1.

  4. So I have a script attached to my entity. I'm trying to access the same script attached to another entity, but it keeps on saying what i have a null value when trying to access it. I am using LE 3.0 Attached is the script:

     

    require "Scripts/Animation/AnimationManager.lua"
    require "Scripts/Functions/GetEntityNeighbors.lua"
    Script.teamID=0 --choice Team "Good, Bad, Neutral"
    Script.enabled=true --bool
    Script.takeDamage=true --bool
    Script.attackRng=1.5 --float
    Script.sightDist=10 --int
    Script.target="" --entity
    Script.maxHealth=30 --int
    Script.health=30 --int
    
    function Script:Start()
    
    --create the animation manager to handle all animations
    self.animationManager=AnimationManager:Create(self.entity)
    end
    
    --[[
    function Script:UpdateMatrix()
    
    end
    ]]--
    --[[
    function Script:UpdateWorld()
    
    end
    ]]--
    --function Script:UpdateAnimations(int newState)--used to update the animations to the new state
    --end
    function Script:CanTakeDamage()
    return self.takeDamage
    end
    function Script:UpdatePhysics()
    if self.target ~= nil then
    System:Print(self.entity:ToString() .." has a target")
    self:Attack()
    else
    System:Print(self.entity:ToString() .." has no target")
    end
    end
    function Script:Attack()--used to handle the attack routinue
    
    --this check should be done when acquiring targets//JCT
    if self.target.takeDamage==true then --if our target can take damage --[[this always results to false if i try self.target:CanTakeDamage() or self.target.entity:CanTakeDamage() or self.target.entity.script:CanTakeDamage() it always says that this is trying to evaluate a nil value.--]]
    local targetPos=self.target.entity:GetPosition(true) --get the position of our target
    local position=Transform:Point(targetPos.x, targetPos.y, targetPos.z, nil, self.entity)--transform the point from global space to local space to our perspective
    
    --rotate to face the target
    local p0=self.entity:GetPosition(true)
    local p1=self.target.entity:GetPosition(true)
    local yaw=Math:ATan2(p1.x-p0.x, p1.z-po.z)-180
    yaw=Math:CurveAngle(self.entity:GetRotation().y, yaw, 2)
    self.entity:SetInput(yaw,0,0,0,false,0) --disable all movement and turn ourselves to face the target
    
    --[[
    not sure what this does so leaving out for testing//JCT
    pos=pos * self.entity:GetScale()
    pos.z=pos.z*-1
    ]]
    if pos.z>0 and pos.z<self.attackRng then
    --[[
    not sure why the bellow test case is revelant//JCT
    if pos.z>math.abs(pos.x) and pos.z>math.abs(pos.y) then
    --]]
    self.target:TakeDamage(10)
    System:Print(self.target .. " Took Damage")
    end
    end
    end
    function Script:TakeDamage()--used as a way for this entity to take damage from outside sources
    
    
    end
    --[[
    function Script:Collision(entity, position, normal, speed)
    
    end
    ]]--
    
    function Script:Draw()
    --update animations
    self.animationManager:Update()
    end
    
    --[[
    function Script:DrawEach(camera)
    
    end
    ]]--
    --[[
    function Script:Release()
    
    end
    ]]--
    --[[
    function Script:Cleanup()
    
    end
    ]]--
    

  5. Hello all,

     

    So I've been gone a while. I did a quick search for Visual Studio 2013 and I didn't find what I was looking for. My question is, has Visual Studio 2013 tools support been added while I was away or are we still limited to the 2010 tool set (v100).

  6. this is in C++. If it was a pointer or written outside of bounds issue wouldn't it also crash in the debug mode, or at least launch the debugger. It is only throwing any run time errors when i run the release version of the exact same source code.

  7. Hi all. I just attempted to publish a prototype to windows. I'm running win 8.1 64 bit. My debug runs fine from the IDE. When i tried to run in the release configuration, it threw a runtime error once the map was loaded. the error was an access violation error. Can anyone help provide guidance on this matter

     

    Thanks,

     

    ~xtreampb~

  8. just so that i know how it is done calculated. I'm assuming that you are using the setforce function and applying it to the negative y axis. Is that value being increased every second? what is the equation you are using if you don't mind me asking?

  9. If you really want so many boxes to collide then implement your own physics engine, or write openCL code to send your calcs to you GPU, but your GPU does floating point calculations so then you mights start to see inaccurate results. Like everything else in the technology industry, there is a tradeoff. more accurate, but a little slower results, or faster results that are less accurate. It is possible to interchange the physics engine if you really want to support more bodies at once. I think you should try to come up with some alternatives when talking about a completely interactive/destructive environment. you should think about how you would implement that, would things break and bodies made on collisions. will the body dimensions be determined by the characteristics of the impact. I feel as though everyone keeps asking josh to make a collision object that stores your model, and upon collision, will automatically break the model and do all the thinking for the programmer. That may or may not be the case but that is how i see it coming across as.

  10. due to demands from school, and the possibility of me being able to sell my business software, i'm going to have to humbly forfeit from this competition. I didn't even get a chance to sit down and brainstorm an idea. Look forward to seeing the results in the asset store :)

×
×
  • Create New...