c++ SetData to Gameobject with guid

Greetings all,

[COLOR=rgb(39,42,52)]I want to set a data (“SetData”) to a gameobject with guid, but I couldn’t find the correct function. I know there is a “GetClosestGameObjectWithEntry” function, but I need something like “GetClosestGameObjectWithGuid”. Someone know if there is a function for this ?


guids are not allowed in c++ scripting

Lol, why not ? The whole core is in c++…

What Malcrom probably meant is that you shouldn’t hardcode your GUIDs in your scripts because they are subject to change. Rather you should find a GO with a specific entry on a specific spot.

With SmartAI you can SetData for GO Guid without C++.