this is a really newbie question lol but how do you spawn gameobjects with a lua script? lol
this is a really newbie question lol but how do you spawn gameobjects with a lua script? lol
Is this what you are looking for unit:SpawnGameObject(entry, x, y, z, o, duration, scale) ?
yea that is but is there a way to do it with no duration? like constantly keep it there? and spawn it in diff phases? like spawn it in phase 2 and phase 3? cuz i am trying to make a guild housing system in lua:P
Not sure if this is supported in Lua yet, or even in the database, when you get the ArcEmu SVN it comes with all the Lua commands, take a look in there to see if they have updated it for phases etc.
Set duration to 0 and it should last till a restart, you will need to execute a query into the database to make it stay there forever (just get syntex then get the values you need etc).
Also you can get object on spawn depending on location and then set phase, phase is part of the query when executing into your database.![]()
They added saving to the function sometime ago. Latest rev's syntax would be:
SpawnGameObject(entry, x, y, z, o, duration, scale, phase, save)
Entry, x, y, z, o, scale and phase speak for itself. If a duration of 0 is specified the object will last until a restart. If save is 1 the object will be saved to the DB, too, meaning it'll last forever even after restarts.
Ignorance is bliss.
Ah I didn't know that.Quite helpful actually for something such as guild housing.
thanks guys i will get back to work on the guild housing system through LUA![]()
and stoneharry could you help me with the mysql querys you can use with lua they dont seem to be working when i try to use them
hmm well i havent tried that yet i just put it in my configs but when GZ used those commands for his npc that logged items in the database it worked fine for me for that one so yea lol i am very confused on how to use these commands but i will give that one a try![]()
SpawnGameObject(entry, x, y, z, o, duration, scale, phase, save)
when your where your at type .gps, and then fill in that information.
^
He needs to work out how to execute queries into the database now not how to spawn a object![]()