Re: Functions request
Add already function spawn! Is it so difficult??? Something like these:
spawnEntity("file path") or loadMesh("file path")
Pleeeease!
You are not logged in. Please login or register.
Add already function spawn! Is it so difficult??? Something like these:
spawnEntity("file path") or loadMesh("file path")
Pleeeease!
Well, if you want to spawn an entity, make a single instance of the entity you want to spawn (with all the properties) and create a table for all the clones. Then use getClone(parent), which will create a clone of the parent entity and return it, and just put that in the table. Then you can just use a for loop to cycle through all the clones and make them do stuff.
So I do. But it's not comfortable.
An isSoundOver() function would be useful to me right now, hehe. Also, just more sound functions in general (lua side). Or even being able to adjust the pitch of the sound or all the other parameters that are in the editor through script. This really goes for all editor parameters really.
Last edited by Tutorial Doctor (2013-10-17 15:53:27)
1. debug (text) - write "text" on screen/console. If lua file contains errors then error text display on same place.
2. dostring (str) - execute lua string, e.g. dostring("On"..<getObjectUnderCursorName>.."Click()")
3. I think that GetSystemTick is not necessary function and can be replaced by os.clock() (standard lua function).
4. timer(msDelay, AfterDelay_LuaStringToDo). It's can be realized as lua-library throught "dostring".
5. if <smth>.lua is not-correct then dofile(<smth>.lua) must return error.
In MScript.cpp -> doFile change luaL_dostring(L, text); to
int result = luaL_dostring(L, text);
if (result != 0)
printf(lua_tostring(L, -1));
Last edited by Aikon (2013-12-19 20:21:10)
A suggestion for scene switching :
Right now i don't see a good way to make use of scene switching or level switching as
you can't import/keep objects from the previous scene/level.
while i was searching on the subject, i found this :
DontDestroyOnLoad from unity, which is preserving the objects you want for the next scene
Something similiar would be great !
Can't you duplicate the level file and change the name? This would be a temporary fix. A good way for this to be added is to have a groping system.
That would be an important function.
I posted a link to LuaSQL in the General category, which is a Lua-based persistent store that can utilize multiple database types.
You would simply write the needed data to the database and then load it in your next scene. This would supplement the modular design paradigm that the engine currently uses.
------
LuaSQL post: http://forum.maratis3d.com/viewtopic.php?id=945
Last edited by sunnystormy (2014-03-07 21:26:29)
My requested functions would be (adopted from the Blender Game Engine):
1.) getAverageFrameRate() -> framerate
2.) getMaxLogicTic() -> ticrate
3.) getMaxPhysicsTic() -> ticrate
4.) getMaxLogicFrame() -> framerate
5.) getMaxPhysicsFrame() -> framerate
6.) setMaxLogicTic( ticrate )
7.) setMaxPhysicsTic( ticrate )
8.) setMaxLogicFrame( framerate )
9.) setMaxPhysicsFrame( framerate )
Hey ReubenUnicruz!
I think all logic and physics runs at 60Hz so getting the framerate would be quite useless.
What in fact is useful is the average frame rate of the graphics.
I already implemented this feature in my game plugin and will port it to the standard engine.
Sponk
My Lua functions request:
->SendMessage()
->Material.color(r,g,b) - To add highlights on selected objects or when mouseover them.
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.