Jump to content

havenphillip

Members
  • Posts

    550
  • Joined

  • Last visited

Everything posted by havenphillip

  1. Maybe you could create a box around the player and use this Enter/Exit code from Aggror? But set it for Collision.Prop or whatever in an "if" statement? Script.enabled = true Script.entered = false Script.exited = false Script.collided = false function Script:UpdatePhysics() if self.enabled then if self.entered then if self.collided == false then System:Print("Exited the trigger") self.exited = true self.entered = false end end self.collided = false end end function Script:Collision(entity, position, normal, speed) if self.enabled then self.collided = true if self.entered == false then System:Print("Entered the trigger") self.entered = true self.exited = false end end end
  2. Ok so you just attached a pivot to the neck. I think the texture of the light rotates with the player but I don't think the light itself does? Maybe I'll try working with that to see if I can get that rotating correctly.
  3. You want to stop the player from rotating too far?
  4. Does that work on all sides? How did you fix that?
  5. You can easily recreate this by creating a box brush in a scene and walking around it with the flashlight on. It only shows up correctly on one surface. Then does weird half circles on the sides and none at all on the back. I'm using diffuse+normal+specular on my material but the standard diffuse doesn't seem to work either.
  6. I have a camera pick I'm using the pickInfo.entity mode to signal the counter to add a kill but it doesn't stop at 1. I tried a table but it just reiterates the table until the camera moves away from the entity. What's the best way to count just 1 kill per enemy? This is my current: function Script:UpdateWorld() local pickInfo = PickInfo() self.proj = window:GetMousePosition() if self.camera:Pick(self.proj.x, self.proj.y, pickInfo, self.pickradius, true,2) then if pickInfo.entity:GetKeyValue("type") == "enemy" then if pickInfo.entity.script.mode ~= "dying" and pickInfo.entity.script.mode ~= "dead" then self.camPick = true elseif pickInfo.entity.script.mode == "dying" then --this is the problem. But what do I reference that will count just once? for i = 1,1,1 do self.kills = self.kills + i System:Print(i) end end end else self.camPick = false end end
  7. Nice. If it's not interacting the only things I can think of is whether the model has any physics set on it, and if Nav obstacle is set to true, and I think mass affects it, too.
  8. What's happening, specifically? Is it not even picking prop types? Or is it not allowing you to lift them on the mouse click, or what? Maybe there's something funky about using Vec3 p or something like the p.z needs to be greater or something? The index example just uses "GetMousePosition." If it's not picking prop types I've sometimes seen it written like: if (camera:Pick(p.x,p.y,pickinfo,pickradius,true,Collision.Prop)) then... local p = window:GetMousePosition() if (camera:Pick(p.x,p.y,pickinfo,pickradius,true)) then
  9. lol Yeah double post. I typed out a whole other bit of "helpful" nonsense but for some reason...
  10. I don't know C++ really well but if it's similar to Lua it looks like you have your pick radius set to 0? (cam->Pick(p.x, p.y, pickinfo, 0, true))
  11. I don't know C++ really well but if it's similar to Lua it looks like you have your pick radius set to 0? (cam->Pick(p.x, p.y, pickinfo, 0, true))
  12. I'm getting an error "txt" not allowed. I don't know what that's about.
  13. Those were pretty good. I did get that far.
  14. I looked for it I think maybe its been removed. Cool looking shader, though. Where do I go to learn how to make something like that?
  15. Nice little shader tutorial series I found. First four videos are just about setting it up so can skip. The shaders configured for Leadwerks below: Lewis Lepton.zip
  16. havenphillip

    Pawn

    Looks good, man. I dig that skybox, too.
  17. havenphillip

    Pawn

    That's cool, man. I like the lightning bolt. Something in this direction might look cool. I made this battery and wrote this up from an idea I got from a Shadmar post. Battery.zip
  18. havenphillip

    Pawn

    It looks cool but you gotta make a better battery.
  19. This is rad. Do it. I'll buy it.
  20. This is looking pretty cool. I kind of want to join this project.
  21. If you're childing a pivot to a foot, you could maybe add a script to it that uses Cabeza = self.entity:GetParent() and set the collision type etc. from there. Then you could reference it from your script above.
×
×
  • Create New...