Jump to content

AggrorJorn

Members
  • Posts

    4,816
  • Joined

  • Last visited

Everything posted by AggrorJorn

  1. Use the SetInput() function to rotate the player to the direction you want. First parameter is the Y axis. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitysetinput-r706
  2. I can't see anything out of the ordinary. Sometimes the referenced items are not correctly displayed. One thing I want to suggest is emptying the referenced inventory for all items and relink the inventory manager. Also, I assume the inventory manager item has the inventorymanager script attached? If that doesn't work you can send me the map in pm, and I will have a look tonight.
  3. I mean for the inventory items. That is where the script is attached. Do all items have the inventory manager linked?
  4. Can you show a screenshot of what you have linked in and what scripts are attached to it?
  5. Put this line: local pickInfo = PickInfo() Above the if self.canLookAround then
  6. CSG brushes are automatically having a physics shape which is exactly like their appearance. For models you need to specify a shape (.phy) or a csg brush.
  7. Nice information. Added to the Articles section of the wiki. http://leadwerks.wikidot.com/wiki:articles
  8. I have the same minimalistic microsoft keyboard. it is a really good one.
  9. I don't think that the current particle system works like you want. If I had a emitter simulating a valve where water is comming out of and I would increase the velocity, I wouldn't want the particles that have already spawned, getting that new velocity as well.
  10. Choice is a fixed list. With choiceedit, you can fill in other values besides the available list.
  11. While playing with the emitters in the editor I notice the following: Velocity is local. So if you rotate the emitter, the particles are changing in direction. Accelaration is global. No matter the rotation of the emitter, the particles do not change direction. In the editor look for the checkbox: Rotate by velocity. By script: SetRotationByVelocityMode(1)
  12. Do you mean the flying speed during Flyingmode or spectatormode? First step you can take is applying the invisible material to your sphere, so that you don't see it. Ofcourse this doesn't solve the problem of the camera actually being at the wrong place.
  13. I don't know really. Maybe there are more guidelines that we don't know about. I do recall a statement on that allowing 'require' could form a security threat. For that reason sandbox is enabled. Downside to that is savegames etc. Perhaps we are even worrying about nothing. Best to leave it up to an official statement from Josh.
  14. Unless this has changed, there will be only Lua games (so no C++ .exe games) and Sandbox mode is enabled. That means no loading (using Require) of external libraries or packages. That would mean no save games. The reason for that that lies with Steam´s security policy btw and not with Leadwerks. Steam simply states that Leadwerks is not allowed to distributed other executables other then the ones that are part of the Leadwerks itself. So running lua files via the leadwerks.exe is allowed.
  15. The Camera:Project function converts 3d points to 2d. It doesn't have to be send from a camera to work, so drawing a line can be from any two point in space.
  16. These are 2d lines rather than 3d, but still useful to see the raycasts: p1 = camera:Project(point1) p2 = camera:Project(point2) self.context:DrawLine(p1.x, p1.y, p2.x, p2.y) See the raycasting tutorial for a complete lua script. http://www.leadwerks.com/werkspace/page/tutorials_legacy/_/introduction-to-raycasting-r13
  17. Carrying objects is one of those physics things that requires very tedious and hacky programming. If you look at the source of penumbra you can see one big mess of code, simply because those physics are highly finetuned. That doesn't mean it is not possible, it just takes a lot of trial and error programming wise. There is no out of the box solution that works with a few lines of code.
  18. Emitters will be part of future Saturn tutorials. That said, explosions exist out multiple emitters. Studying the effect of explosions in game really helps to see what is going on. Light for temporary brightness 1st emitter: fire 2nd emitter smoke 3rd emitter: sparks
  19. Just do a check on whether self.emitter[0] ~= nil and then release it.
  20. This is not something I have written, as it is part of the deafult FPSscript. There is no model/prefab being loaded. The corpse is just a shape (.phy) which is set to the pivot. The pivot is placed at the position of the player. By the looks of it, hiding an entity, does not disable the physics of the object (right away), because other objects are interfering with it. I have to try out if this is actually the case in other scenarios.
  21. The FPS script loads a lowpoly shape to a pivot (not a model/prefab) that is used as corpse. self.corpse = Pivot:Create() local shape = Shape:Load("Models/Characters/Generic/corpse.phy")--this shape is made from a low-poly CSG sphere, so it will roll around a bit but come to a stop quickly self.corpse:SetShape(shape) self.corpse:SetCollisionType(Collision.Prop) The loaded shape (corpse) behaves as intended, it is the hitbox that causes the issue. It should not cause collisions or collision twitching since it is hidden (and/or) collisiontype gets set to none.
  22. I have a hitbox on the players location. When the player dies it loads in a lowpoly shape (default script of the FPS player script.) However the loaded shape, is now intersecting with the hitbox, which causes the lowpoly shape to start twitching around. To resolve this issue I first thought that simply hiding the hitbox entity would solve the problem, since hidden entities no longer have physics interaction. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entityhide-r181 However this didn't help at all. The loaded shape was stil flipping around like it was intersecting with the hitbox. Releasing the hitbox resolves the problem, but that is not what I want to do, since I want to restore the hitbox. --This script works, since the hitbox is released. hitbox:Release() shape: Load() --This script doesn't work, even though the hitbox doesn't have any collision. hitbox:Hide() shape: Load() Other things I tried: Setting the collision type of the hitbox to NONE. Things I haven't tried yet: Loading the lowpoly shape 1 frame later after hiding the hitbox. Repositioning the hitbox to a different location. Any thought on what this could be?
  23. When setting values for physics options, you don't have to multiply with Time:GetSpeed() Since physics are already updated a fixed amount of times per second.
  24. Updated, thanks. Wiki equivalent also updated: http://leadwerks.wikidot.com/wiki:faq
×
×
  • Create New...