Jump to content

AggrorJorn

Members
  • Posts

    4,816
  • Joined

  • Last visited

Everything posted by AggrorJorn

  1. You can use self.entity:SetScript("Scripts/myScript.lua")
  2. You can use SetFriction() to prevent sliding. Also SetPosition, SetScale and SetRotation break the physics simulation. If you have an object that you want to move by physics, you can only use the Physics variant of the commands I listed in the previous line.
  3. If you use PhysicsSetPosition(), and your models are near each other, one of the models is placed inside the other model. This will result in twitching physics. Instead of using SetPosition(), push the player around with using forces.
  4. If you create an entity and want it to be a child of another entity, you can use the SetParent() command. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitysetparent-r187
  5. Is your question how to make bump maps or to how to apply bumpmaps to your models? In case of the last question, models require a material. This material can have a diffuse textures as well as normal texture. See the material editor http://www.leadwerks.com/werkspace/page/documentation/_/user-guide/material-editor-r8 Via code: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/material/materialsettexture-r184 I would assume diffuse is index 0 and normal is index 1. But I haven't tested this.
  6. You might also want to read up on C++ pointers. http://www.cplusplus.com/doc/tutorial/pointers/
  7. Thanks, Okay try the following: The PlayerModel and Camera have no scripts. The Player has a script attached Script.rotateSpeed = 1.0 --float "Rotatespeed" function Script:UpdatePhysics() if App.window:KeyDown(Key.A) then self.entity:SetInput(Time:GetSpeed() * self.rotateSpeed ,0 ,0) end end [*]Adjust rotation value if needed.
  8. I have no idea how this looks in your scene, can you give us a screenshot of your hierarchy. If you have multiple scripts for the player which both to self.entity:SetInput() things will start to go wrong. If you create a camera in the scene, you need to link it to the FPS player, since that script creates a camera via script. That means you have double camera's.
  9. Okay to clarify, this is your hierarchy: FPSplayer (with modified FPSplayerscript, Character controller, Character Collision Type) Model (no script, not a character controller) If you have a script on your model as well, then this will conflict with the FPS player script attached to the parent. Can you otherwise send a screenshot of your hierachy.
  10. Those are some viscous eagles. Nice work!
  11. You are using the SetInput in both the UpdateWorld and the UpdatePhysics. Try commenting out the one in UpdateWorld.
  12. 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
  13. Use a hitbox for character controllers. I had issues with picking character controllers as well for Project Saturn. Using a simple hitbox solved this for me.
  14. I am running in to a problem where some of my scripts no longer work in update 3.4. They do work in 3.3 and they haven't been changed for several weeks. In the script I try to save the script of an entity so that I don't have to type .script all the time. self.player.script:Hello() --works self.player = self.player.script self.player:Hello() --Error: player is a nill value. However if I try to access it, the scripts variables and functions, it gives me an error. ..\tier1\fileio.cpp (4002) : Assertion Failed: m_nNumRegisteredWriters == 0 Assert( Assertion Failed: m_nNumRegisteredWriters == 0 ):..\tier1\fileio.cpp:4002 I tried replicating this with a small test but there saving a script worked just fine. If I need to upload the project, just let me know.
  15. 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.
  16. I mean for the inventory items. That is where the script is attached. Do all items have the inventory manager linked?
  17. Can you show a screenshot of what you have linked in and what scripts are attached to it?
  18. Put this line: local pickInfo = PickInfo() Above the if self.canLookAround then
  19. 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.
  20. Nice information. Added to the Articles section of the wiki. http://leadwerks.wikidot.com/wiki:articles
  21. I have the same minimalistic microsoft keyboard. it is a really good one.
  22. I thought Josh had already fixed it. perhaps not at all places. http://www.leadwerks.com/werkspace/topic/11889-changing-level/
  23. 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.
×
×
  • Create New...