Majesty Gold HD

Majesty Gold HD

Customize Majesty!
Create and upload new Quests and Mods for Majesty HD!
amantalado 1 25 Jun, 2016 @ 3:56pm
$AddAttribute Cannot Add Agents
The function $AddAttribute currently doesn't allow the adding of an "agent". Whenever it is attempted, the Attribute doesn't pass and it can't be used.

The only workaround I have found thus far is to use a "list" the size of a single object in place of an "agent" attribute.
< >
Showing 1-5 of 5 comments
Alfryd 23 Jul, 2016 @ 5:25am 
Wasn't there an AgentRef data type mentioned somewhere in the documentation? Does that not do the trick?
amantalado 1 23 Jul, 2016 @ 1:01pm 
Originally posted by Alfryd:
Wasn't there an AgentRef data type mentioned somewhere in the documentation? Does that not do the trick?

Oh god, that worked. Thanks a bunch, I had no idea that AgentRef was the attribute I needed. It means that I can smooth out some of the functions I created that desperately needed AgentRef.
Alfryd 23 Jul, 2016 @ 2:28pm 
Glad to help.
Dracoceros 11 11 Dec, 2020 @ 8:10pm 
I'm having the same problem, but don't understand the answer. I want to add an attribute to AIRootAgent, but it always returns false
Dwarfownsu 2 15 Dec, 2020 @ 10:00am 
I think you might be missing the original question. amantalado was wondering why something like the below doesn't work.

$AddAttribute(AIRootAgent, "player2AI_myPalace", "agent", $GetPlayerTwoPalace()); $debugout(911, "My palace agent", AIRootAgent's "player2AI_myPalace");

Alfryd suggested using agentref instead, ex:

$AddAttribute(AIRootAgent, "player2AI_myPalace", "agentref", $GetPlayerTwoPalace()); $debugout(911, "My palace agent", AIRootAgent's "player2AI_myPalace");

If the above doesn't answer your question, you can look at my auto-expanding AI Mod code to see how I handle attributes. Feel free to also reach out to me on discord (I'm Dwarfeh and we're in some of same channels) and I'm more than happy to help
Last edited by Dwarfownsu; 15 Dec, 2020 @ 10:01am
< >
Showing 1-5 of 5 comments
Per page: 1530 50