flachdrache Posted June 16, 2011 Share Posted June 16, 2011 Moin, i like to have all "fire an forget" effects handled client side alone e.g. decalTime and other time based effects. So far i think following objects would be needed a global timer message dispatcher eventSystem basically the idea is to set entity keys on new effects ( like a decal ). Like ... spawn decal, set timer, if decalTime over send message to free itself. I want to solve that in the OOP way but iam somewhat puzzled where to start ?! How do i collect / record new entitys added to the world from given moment ? any help appreciated Quote AMD 64 X2 Dual 5k - 4GB - XFX GForce9800GT - nv196.21 - WinXP Sp3 zBrush4R2 - Silo2Pro - Unwrap3DPro - Gile - MaPZone2.5 Xxploration FPS in progress ... Link to comment Share on other sites More sharing options...
TylerH Posted June 16, 2011 Share Posted June 16, 2011 Assuming you made some kind of EntityFactory script in Lua, and just hooked in the base.lua entity:Spawn function to log in your factory that an entity was created you could do that. Assuming you are going for an all Lua approach. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
flachdrache Posted June 16, 2011 Author Share Posted June 16, 2011 Hey Tyler - in fact my assumptions are partially based on some of the lua classes you posted. This event message dispatcher might work in the lua world alone, setting postprocessing fx and other client behavior might be controlled in source code. However, if the player steps on the firepit i dont see a reason why it shouldnt controll timing a fire emitter and such. I basicall want to put a timer entity in the scene which counts the seconds the game is running and if a behavior is at hand ( a new decal is spawned ) the message dispatcher class notes the event system that it should free this decal in 15 seconds ... how do i collect those data ? PS: The non-OO approach would be to "simply" have the entity send a message to itself - which free`s itself after a delay. Quote AMD 64 X2 Dual 5k - 4GB - XFX GForce9800GT - nv196.21 - WinXP Sp3 zBrush4R2 - Silo2Pro - Unwrap3DPro - Gile - MaPZone2.5 Xxploration FPS in progress ... Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.