Jump to content

Scott Richmond

Members
  • Posts

    422
  • Joined

  • Last visited

Everything posted by Scott Richmond

  1. Would have thought someone would have brought this up but apparently not (I gave it a good search). How does one animation models via LUA?
  2. Wow, that is an incredibly pretty TODO list. Seriously.
  3. You can use whatever editor you wish. Only catch is that you'll need to setup Dev C++ on your own, while the LE wizard generates the required project files for VS automagically.
  4. Its a fair enough point I guess. I like to call playing games 'research' though haha.
  5. You might want to take a look at the DoF video Josh made on his blog/the wiki.
  6. I'm all for the throwing away of CD burners. But DVD drives? How can you exist without one? All games and applications come on them. A top of the line DVD/CD combo burner costs like $90AUD tops. Its like the most bang-for-buck component in a new PC hah.
  7. Unfortunately Josh has yet to implement volume triggers in LE, otherwise it'd be as simple as creating a LUA script attached to a volume trigger.
  8. ...wait...what? You don't have a CD/DVD reader in any shape or form?
  9. I believe the old stuff works fine, you just have to integrate it yourself. Do a search on the forum - I swear someone asked about this already.
  10. The lights or buttons won't fry, so slot away. Worst that can happen is that it won't work or the lights will be on when they're meant to be off, etc.
  11. Ah, two birds with one stone Macklebee, impressive (Or just average as compared to my stupidity ). Thanks a lot.
  12. Ah fantastic! Thanks for your efforts Josh, I'm sure this'll be an invaluable resource for many of us. Uh oh, this script crashes my editor.
  13. While C++ can, by nature, do everything under the sun, GUIs aren't the easiest things to code up from scratch. I'd strongly recommend one of the many free widget libraries for whatever programming language you choose. For example I've had great success with wxWidgets. Its very well documented so you should find out pretty quickly how to do what you want.
  14. *shrugs* I figured the updater only pulls items from one repository.
  15. Ahh, I see. No problems then. Thanks Rick.
  16. But why create another Update function? Why not just put the code under the default Update function?
  17. Take a look at windmill.lua: --Include the base script for all classes dofile("Scripts/base.lua") --Some global sounds we will use for all instances squeak={} squeak[0]=LoadSound("abstract::squeak_1.ogg") squeak[1]=LoadSound("abstract::squeak_2.ogg") --This function builds the interface for the properties editor function InitDialog(grid) <SNIP> end --Spawn function for creating new instances function Spawn(model) local entity=base_Spawn(model) --Retrieve a few limbs we will use later entity.blades=model:FindChild("windmill_blades") entity.base=model:FindChild("windmill_housing") entity.model:SetKey("spinspeed","1") --An update function for one instance. Declaring the function as part of the entity table allows us to use "self" for the table function entity:Update() <SNIP> end end --Update function, called during every UpdateWorld() function Update(world) if world==world_main then local model,entity for model,entity in pairs(entitytable) do if model.world==world then entity:Update() end end end end Now I understand that the Update(world) function is run at every tick automatically by LE. What I don't understand is why this script redirects the Update() function to this custom entity:Update() function. Is there a specific reason for this?
  18. Haha. So, I think the Dbol() function makes your controller much more responsive. You need to use it in conjunction with the Consume() and GenitalShrinkage() functions.
  19. What I want to do is set some custom entity keys in C++ (easy) and than retrieve those keys and values in the LUA Update for each entity and do some work. Unfortunately I'm struggling to work out how the LUA Set/GetKey command works: function base_GetKey(model,key,value) local entity=entitytable[model] local intensity,r,g,b,a if entity==nil then return value end if entity.model==nil then return end if key=="position" then return entity.model.position.x..","..entity.model.position.y..","..entity.model.position.z elseif key=="mass" then return entity.model.mass elseif key=="sweptcollision" then return entity.model:GetSweptCollisionMode() elseif key=="rotation" then return entity.model.rotation.x..","..entity.model.rotation.y..","..entity.model.rotation.z elseif key=="buoyancy" then return entity.model.buoyant elseif key=="scale" then return entity.model.scale.x..","..entity.model.scale.y..","..entity.model.scale.z elseif key=="gravity" then return model.usegravity elseif key=="friction" then return model.staticfriction..","..model.kineticfriction elseif key=="color" then intensity=tonumber(entity.model:GetKey("intensity","1")) return (entity.model.color.x*255.0/intensity)..","..(entity.model.color.y*255.0/intensity)..","..(entity.model.color.z*255.0/intensity)..","..(entity.model.color.w*255.0) elseif key=="castshadows" then return entity.model:GetShadowMode() elseif key=="material" then if entity.model.material~=nil then return entity.model.material:GetName() end elseif key=="active" then if entity.active==0 then return 0 else return 1 end elseif key=="enabled" then if entity.enabled==0 then return 0 else return 1 end end return value end I've pulled this from the base LUA file. How do I specify a model and key, and get the value? It sort of looks like this function doesn't really pull down keys that aren't already defined right there. Any help would be great.
  20. It seems so. It looks like Josh only maintains one version of LE (2.3). You get LUA integration and the new WYSIWYG editor. For $50 it really is worth it.
  21. Fantastic Chris - I can't wait to get stuck into it.
  22. Fantastic work Chris! Though I have -NO- idea how that code works.
  23. Ah I see. The bit depth triggers windowed mode. Ok so I've made the move to Framewerk. Its very nice! I'm glad I did.
×
×
  • Create New...