Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

wildcherrii

Members
  • Content Count

    27
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. wildcherrii

    physic

    I have two box models set to box rigid body collision. I place both boxes on my map about 10 units above the terrain. When I run the map the first box falls and lands on terrain but the second box falls and goes through. This is the same prefab I'm using so the setup is identical. I've also spaced them apart so they dont initiated in the same space when created. How can I get this working properly ?
  2. Is local ent = (camera:Pick(p.x,p.y,pickinfo,pickradius, true, 0)) To expensive to call per frame ? I notice a little lag spike when doing so, but how else can we detect when mouse is over an object? I cant have the mousehit(1) checked then do a pick in my situation.
  3. Is there a way to make sure an animation sequence starts from the first frame of the sequence? I notice leadwerk like to pick up an animtion from the last stoping place, i need to assure my sequece gets starts from the first frame.
  4. how to make my character control NOT collide with and vice versa with another entity, not all entites, just a few I put on the map. My player is walking into his own land mines and blowing up, in the real world that is true but not in this game hehe.
  5. My project has a Main.lua which acts as the controller for the game loop. I have a import("scripts/pre-cache.lua") which I use to load up imgs, sounds and other prefabs that each and every map uses. But theres a serious flaw. For example : This is the pre-cache.lua that is imported from the main.lua script. It's attached to no entity or map object, it just holds the assets in a table for when they are needed. debris ={} debris.box = Model:Load("Models/Props/Land/box_01.mdl") Now, I have a box entity that is placed on the map via the editor, a simple script attached
  6. Since my last few problems went unanswered, i assume no one knows the answer or its just some broke stuff in le, who knows. Im faced with a new problem now, possibly my last problem if I cannot get it solved. Im try to place an object, in this case a beach ball, on the map in my player hand. The beach ball is a prefab with a phycs rigid body since I need the collision data. Everything so far I described is fine, but here what I cannot figure out. Once i get the ball into the scene how do I rotate the ball to match my players rotation. If i use standard setrotation then i break physics. I
  7. I got a pivot in the world , I've attached a script to it, emit.lua function Script:Start() --small box self.box=Model:Box() end function Script:UpdateWorld() self.MonitorBox() end Function Script:MonitorBox() self.box:Turn(0,1,0) end ------------------------------------------------------------------------------------- Please for the love of God, explain to me why this returns a " attempt to index field "box" a nil value. Is it perhaps because Im using a custom named function? Am i not allowe
  8. how to get a neg random number? Math:Random(-10,10) produces error for me
  9. It seems creating or instacing or copying a prefabbed emitter inside a Start() script of an entity causes everything to shut the hell down on loading a new map up. self.dust = tolua.cast(emitcache.dust:Instance(),"Emitter") If I comment this line out the map change goes through. I guess Im just not suppose to have particles in my project. 2 months solid trying different routes to get them 100% working and always a failure.
  10. In my code, I'm trying to go from one map to another map ( zones ). I have it setup as so : local mapfile = System:GetProperty("map","Maps/"..fname ..".map") if Map:Load(mapfile)==false then emsg("error, no map file") ; return end Where fname is a variable passed to my MapLoad function. No matter what I try I continue to load the same map over and over. It always seems to be the same map thats loaded in the editor. My question is, is it possible to change maps from code once you start an initial map in the editor. My project loads map1.map then if I hit f12 in
  11. Perfect, okay one last question and I think I can solve all my map changing woes. I load several prefabbed particle emitters throughout my map at certain times. ( via lua code ). Do these emitters die and release once they run out ? or do I need to track them as well and release them on map clear?
  12. OKay thank you both for the answers., If I'm loading some assets in a Script:Start() function for an NPC like this - self.footsteps = Sound:Load("Sound/footsteps/running.wav") Do I need to manually remove these assets when Im changing map files even though world:Clear() is being called?
  13. I'm wondering, if I have a map entity that loads in with a script, then the Function Start() of that entity script loads a Sound File, do I need to keep track of these additional loads for when I do a clearmap(0 and load a new level ? or does these extra resources get removed on a new map load? What exactly gets removed from a world:Clear() ??? Im stuck on one major problem, I have entity:EmitSound() playing some footstep sounds as the enemy approach me. I want to kill the looping footstep sound when he gets close to me then stops. I've done intense reading on the for
  14. wildcherrii

    speed

    I would like to know why this happens to me for no reason at all. In the Start() script for my monster I give him a point to travel to with the default speed. self.ai.piv:GoToPoint(pos.x, pos.y, pos.z, 1.4, 1.0) later on in side the Updatephysics() loop I have need to change the monster speed. So i issue a new : self.ai.piv:GoToPoint(pos.x, pos.y, pos.z, 2.8, 2.0) But oh NO!!!! nothing happens, he traverses at the same speed. How stupid. Is this the normal way to increase and or decreases moving speed when using a gotopoint() command. If so why do
  15. How do I stop an entity that is going to a point via ent:GoToPoint(x,y,z) I wan to break him off his route if something else happens, but he still keeps trying to make it to the goto point.,
×
×
  • Create New...