Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. where are you trying to do this? in a program or the editor? for a lua program, this gives me the position of a pick for any entity class including terrain: pick=CameraPick(camera,Vec3(GraphicsWidth()/2,GraphicsHeight()/2,1000.0),0,0) if pick~=nil then pick_posX=pick.position.x pick_posY=pick.position.y pick_posZ=pick.position.z end it should also work for bmax as well
  2. macklebee

    2.3 Sync

    hmmm... weird. if i take out the skybox it seems to load the firepit without the error, but the fire and heathaze are missing and the fire sound only plays one loop. If I have a skybox then I get the error. ok... must have been an issue with my update... I performed a clean install and the firepit loads with the skybox now. I still do not have heathaze or fire, but I assume I will have to edit the firepit.lua to perform a GetGlobalObject for the transparency world...
  3. macklebee

    2.3 Sync

    hey i got something right! yay! just doing some initial testing with the single state lua with bmax... and came across some other things... with the firepit in a scene loaded from bmax, i now get a 'Unhandled exception:GL_INVALID_VALUE' with the locker in a scene loaded from bmax, i see in the log: and its about 50/50 whether or not the door is there... and if it is there and my controller touches the door, it goes flying across the map... what do i need to do to get the 'joint' to be recognized?
  4. macklebee

    2.3 Sync

    ok... i noticed that the error occurred not when I placed the waterplane object in the scene, but if I tried to move it afterwards... then i noticed that if i moved the position by the properties selection, no error occurred. So replace this line in the function object:UpdateMatrix(): self:Update() with this: self:Refresh() and it seems to have resolved the issue...
  5. macklebee

    2.3 Sync

    ok... thought it might have something to do with it since it was failing at self.Update()... and i assumed i would have to uncomment the Update so whats the fix to the error then?
  6. macklebee

    2.3 Sync

    where does this go? in the class.lua? just wondering because I get an error whenever I put a waterplane into the editor... fails at this line: self:Update() inside the function object:UpdateMatrix()... the error is 'attempt to call method Update (a nil value)'
  7. yes, unless you have a registered 2.3 SDK you will not be able to...
  8. what are your computer specs... it would help if people started posted these specs as their signature... this used to be standard on the old forum
  9. it looks like its SetLayerScale in bmx and SetTerrainTextureScale in lua if I had to guess... and it looks like SetLayerScale may be removed shortly if what the wiki says is true... but currently bmax in 2.3 still recognizes it.
  10. macklebee

    LinePick

    ok... of course the above code wouldn't return anything for position if the entity class wasn't equal to a terrain... if all you are wanting is a position for your pick no matter what the entity class is: pick=CameraPick(camera,Vec3(GraphicsWidth()/2,GraphicsHeight()/2,1000.0),0,0) if pick~=nil then pick_posX=pick.position.x pick_posY=pick.position.y pick_posZ=pick.position.z end
  11. why does the math have to be an entity? why not just a script thats loaded with an actual entity? and if the filter function parameter exists in lua, then this would take care of your issue...
  12. true... but typically lights won't be just sitting in the middle of your map without something else around it... if you had something pickable next to it, you would probably wouldn't even notice in game... as for the other 'logical entities', just make the invisible model for it smaller if its getting in the way... there are a several ways to get around this issue that don't require anything to be changed from the way it is currently. All of which just means you have to use common sense when laying out your scene if you expect a certain interaction. and... there's always the filter function parameter... assuming that it does exist in lua, perhaps Josh or someone could give an example in lua...
  13. this would be a nice addition to framewerk in the coming update or if too late to get in this one, then a future one...
  14. you have to do what is listed in this post. also you will need to send josh an email to let him know when you purchased the upgrade with relevent info like your name, LE 2.0 registration key, your forum name, the email that you are using in the forum if different than the one you are sending that email from... etc...
  15. you can just filter out the lights by either checking for the classname or by the model's entitytype by using GetEntityType... since all lights have an entity collision type of 0. you would just have to make sure everything else that you want to be pickable have a different value than the lights... if pick~=nil then if GetEntityType(pick.entity)~=0 then DoSomething()... end end anything else you are wanting to have collision with but don't want it pickable, you just need to filter that out as well... there's no reason why everything in a scene shouldn't be pickable if needed to be... its up to the programmer to decide how the resulting interaction should be handled not something that should be built into the editor or the engine funny that in your post LinePick, you state "I need it to collide with anything and everything" with regards to picking... but since it actually does, you complain that it shouldn't?
  16. looks nice... glass is very nice effect...
  17. macklebee

    LinePick

    the terrain is a pickable entity, you just have to filter the results of the pick correctly because not everything you can do to or evaluate with a picked model/mesh can work on a terrain... if pick~=nil then if pick.entity:GetClass()==ENTITY_TERRAIN then terrain_posX=pick.position.x else name = GetEntityKey(GetMeshModel(pick.entity),"name") end end look at the scripts/constants/engine_const.lua for entity class values
  18. huh?? the script editor has intellisense? how is that feature enabled? as for your crash... i haven't had any crashes yet that weren't my fault because my code was either really messed up and tried to run it or i tried to run multiple scripts at the same time without exiting the first one... so more than likely you did something and didn't realize it.
  19. if you type it into the lua script editor you will see that it is there...
  20. need more code than that to troubleshoot... where are you setting entity.hidden to a 1 after you turn off the light? that if-statement is looking for entity.hidden==1 to turn on the light...
  21. for the player, you are setting the position of the pivot first then the cube position based on the pivot. for the camera, you are setting the position of the cube to the pivot, then setting the camera to the pivot... so how is this making the cube follow the camera? shouldn't you set (better yet parent it) the pivot to the camera's position, and then set the blue cube to the pivot position... its hard to tell with out actually seeing this in action and just guessing on how your camera is being controlled...
  22. do we have a decent way of locking down our assets yet? because you know better than anyone here, the moment that gmf2-whatever converter gets released it will be all over the internet... just making it even easier for people to steal models. what are you using for the private folder models?
  23. perhaps you should try parenting the cubes to their pivot in the spawn instead of trying to update the position...
  24. look at how the lights are done: function Kill(model) local entity=entitytable[model] if entity~=nil then if entity.light~=nil then entity.light:Free() entity.light=nil end end base_Kill(model) end
  25. you should take a look at the firepit example model that comes with the Editor... has heat haze and fire built in via lua script... makes all of these things basically a part of a object now that gets created when loaded...
×
×
  • Create New...