You must be logged in to post messages.
Please login or register

Modding Discussions
Moderated by Alexastor, MosheLevi, Mister SCP

Hop to:    
Welcome! You are not logged in. Please Login or Register.3 replies
Age of Empires III Heaven » Forums » Modding Discussions » spawnUnits on {currentUnitID}
Bottom
Topic Subject:spawnUnits on {currentUnitID}
MrKoek
Skirmisher
posted 01-29-19 03:28 PM EDT (US)         
Hello all,

I've been reading this forum for quite a while and registered recently.

I have a mod to make it possible to spawn units on a predefined UnitID.

As you can see, there is nothing really special about it:


[removed]

But I would like to use the {currentUnitID} at spawnUnits("Settler",1,here) to spawn in this case 2 settlers near my selected unit (current unit id).

It does not work by simply doing:
spawnUnits("Settler",1,{currentUnitID})

Who can help me?

[This message has been edited by MrKoek (edited 02-02-2019 @ 10:48 AM).]

AuthorReplies:
AlistairJah
Skirmisher
posted 02-01-19 04:25 AM EDT (US)     1 / 3       
Someone sent me a private message in Discord about this very subject. He's a cheater and every modder in the modding server knew that. I wouldn't recommend explaining it. No one wants to help cheaters.

Note: I'm not saying that MrKoek is a cheater, I'm just saying that discussing about this subject could help cheaters.
MrKoek
Skirmisher
posted 02-02-19 10:50 AM EDT (US)     2 / 3       
I wasn't realy worrying about the code, but after your reply i understand this matter.

Removed it so it would be no further help for cheaters
Xiaoyu927067964
Skirmisher
posted 04-05-19 10:37 AM EDT (US)     3 / 3       
If you want to make a mod, you can modify the "protounitcommands.xml", but you can't create a new button("protounitcommand").

spawnunits("Settler",2,%d)

%d=own unit

for example
<protounitcommand>
<name>Stance1</name>
<icon>art\ui\command\stance_aggresive_on</icon>
<command>unitSetStanceAggressive</command>
<rollovertextid>19143</rollovertextid>
<helptopic>stances</helptopic>
</protounitcommand>

modify to
<protounitcommand>
<name>Stance1</name>
<icon>art\ui\xxxx</icon>
<command>spawnunits("Settler",2,%d)</command>
<rollovertextid>00001</rollovertextid>
</protounitcommand>


and use the UICommand or modify the protoy.xml to call this "protounitcommand".

If you want to cheating, this is impossible.

[This message has been edited by Xiaoyu927067964 (edited 04-05-2019 @ 10:39 AM).]

You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires III Heaven | HeavenGames