31
Miscellaneous / Re: [Question] Items that spawn temporary objects.
« on: July 30, 2015, 12:14:18 am »
GOMove is just stabbing the existing systems.
The temporary object guids are hacked into the system so that the high part is used as the spawn ID even if that is not intended. The objects are saved to some gameobject storage system used by spells.
Would probably code it a bit differently on the spell storage part now..
Yeah, tested and you should be able to use the guid:
ps. even though I wrote this for creaturem same code works with gameobjects except gameobjects cant say stuff
The temporary object guids are hacked into the system so that the high part is used as the spawn ID even if that is not intended. The objects are saved to some gameobject storage system used by spells.
Would probably code it a bit differently on the spell storage part now..
Yeah, tested and you should be able to use the guid:
Code: [Select]
local x,y,z,o = plr:GetLocation()
local tar = plr:SpawnCreature( 36, x, y, z, o )
-- save guid somewhere, I save it to global variable GUIDL, but then again this is just an example code
GUIDL = tar:GetGUID()
-- Later access the creature by the saved guid:
local creature = plr:GetMap():GetWorldObject( GUIDL )
creature:SendUnitSay("asd", 0)
ps. even though I wrote this for creaturem same code works with gameobjects except gameobjects cant say stuff