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

Scenario Design
Moderated by MosheLevi, Mister SCP

Hop to:    
Welcome! You are not logged in. Please Login or Register.843 replies, Sticky
Age of Empires III Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
Topic Subject:Have a Trigger Request? Post it here!
« Previous Page  1 ··· 10 ··· 20 ··· 32 33 34  Next Page »
Mister SCP
Scenario Reviewer
posted 05-22-09 02:11 AM EDT (US)         
So you have a trigger request?

You can post it here!

    ------------------------------------------------------------ --------------------

    Hello and welcome to the Trigger Request Thread (TRT). This thread's purpose is only to place trigger requests and discuss them.

    ------------------------------------------------------------ --------------------

    Before posting your request, it's always good to read the so-called FAQ.

    How do I install a trigger?

    When we have finished making your trigger, we'll post the required code here. To install this code you will first of all need to find your way to the AOE§ installation folder. C:\Program Files\Microsoft Games\Age of Empires3 by default).
    Now open the trigger folder if you use vanilla -trigger1, if you use TWC -trigger2, and finally if you use TAD go to -trigger3.
    Next, open the file called typetest.xml. The only thing left to do is copy the code at the right position and save. If you requested a condition, then place the line above ,
    if you requested an effect paste it right above . Note the "s" at the end of both tags.


  • When copying the trigger from someone please click first and only then copy the required code.

  • If you're still uncomfortable with installing triggers please backup the original typetest file, i.e. copy the original to another folder.

    How do I uninstall a trigger?
    If a trigger happens to be faulty or if it generates errors you better remove it. Just do as if you were installing a new trigger, but instead of copy-pasting new code, remove the code corresponding with the chosen trigger. Make sure to remove it completely, including the starting < effect > or < condition > tag and the corresponding < /effect > or < /condition > closing tag. Failure to do so properly will cause XML errors in the file making ALL triggers in that file inaccessbile for AoM.

    Help! My triggers have stopped working! If this doesnt help you can send an email including your scenario to

    ------------------------------------------------------------ --------------------

    Recommended Downloads:
    -Advanced Trigger Set
    -My Trigger Set
    -Gunner`s Trigger Set
    -Random22`s Trigger Set
    -Hedanito`s Trigger Set
    -Kolt`S Trigger Set
    -SH Trigger
    -M925's Trigger Set

    ------------------------------------------------------------ --------------------

    Posting a Request

    So you have read the FAQ and want to post a request? OK, go for it, just be sure to use the following format:

    Name - This should be as straightforward as possible. Try to comply with today's standards.Description - Always describe the actions that you want the trigger to perform. An example can be a great help when requesting complex triggers.

    (A List of Params. If you are pretty nice you set them in the context with your request.)

    Unfinished Requests

    -a lot

    Finished Requests
    -even more (list isnt up to date)

    Not Possible:
    -Fixing Modify Protounit
    -Fixing Chat Contain
    -Change name of the protounit which affect also the name when you train it
    ------------------------------------------------------------ --------------------
    Additional: XS - Basics (mostly based on pftq's guide for XS - Effects + Conditions)

    XS - Triggers are a bit different from other triggers, since they use strings instead for e.g. PlayerID, Unit Select...
    The key highlight of these effects/conditions is to allow Unit Selections to be specified by number or QV. This makes great use of the effects which set QV to an OBJECT ID and opens up a whole new world of possibilites.

    This includes all original and new effects/conditions with ALL appliable fields set to use ANY form of data, including but not limited to:
  • -- Quest Var Code: enter trQuestVarGet("QVNAME")
  • -- Player Stats: enter trGetStatValue(PLAYER, STATID_NUMBER) e.g. trGetStatValue(1, 2)-> count "Enemy Units Killed" for Player 1
  • -- Math Operations: (5*PlayerStat) ...allowed are + - * / as Math Operations
  • -- Any XS Code: (just open the typetest.xml and start digging!)

    typical strings: (strings with * have additional informations on the bottom)
  • Amount (of resources), Radius, Headings, Duration, Damage Percent, Count (e.g. in Army Deploy), Rate (e.g. of Construction), Value
  • the table of PlayerID´s is a string
  • Operators* (don't use any numbers for them!)
  • Center Unit OBJECT ID/Source Unit OBJECT ID/Target Unit OBJECT ID **
  • Unit Type ID /ProtounitID ***

  • *Operators you can use are:
    == equal to
    >= equal to or higher
    <= equal to or lower
    > higher
    < lower
    != is not equal to

  • **The Unit Selections require an OBJECT ID. This is NOT the same as a NAME ID (like in Reyk's triggers). To find an OBJECT ID, use the supplied "QV Set.. OBJECT ID" effects OR select a unit and open the "Object Info" window. Open the Object Debug Info Window if you are using Age of Empires III and the ID is not readily available in the "Object Info".

    The first amount show you the Unit ID, every unit have a unique one. The third amount show you the Unit Type ID/ Protounit ID. Every MercJaeger have the ProtounitID -387-. Note that you can select ALL Units with Unit ID's but not even all with Protounit ID like cinematic blocks.

    1. ***TO USE NAME IDS: If you have the Name ID of a unit, you can convert it to OBJECT ID by using the kbGetBlockID("") function.
    2. ***For string (text) IDs, example: kbGetBlockID("ThisIsMyUnit")
    3. ***For QV, example: kbGetBlockID(""+trQuestVarGet("ThisIsMyQV"))
    4. ***For # NAME ID, example: kbGetBlockID("NUMBER")
      *** Generally, you can use kbGetBlockID(""+ID) for all, except text. As said above, enclose the text entirely with the quotes.


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 08-21-2011 @ 03:07 AM).]

posted 05-27-16 08:16 PM EDT (US)     826 / 843       
This trigger is exactly what i need,thank you very much.
Do you have any ways to set name for the units those be trained by the the building?If this effect can be achieved, your trigger can also make units work on the training units.

[This message has been edited by ChinaBurgerMaker (edited 05-27-2016 @ 08:37 PM).]

posted 06-01-16 01:36 AM EDT (US)     827 / 843       
I got a new problem with this trigger"Move from area to near unit"
The problem is whatever i type on the approx radius of target unit,when i test it,the approx radius of target unit is the same as the radius of the center unit.
I think this trigger should be wrong somewhere,can you help me to fix it please?

<Effect name="Move From Area To Near Unit">
<Param name="RefObject" dispName="Center Unit" varType="unit">default</Param>
<Param name="UnitType" dispName="Type" varType="string">Unit</Param>
<Param name="PlayerID" dispName="Player" varType="string">0</Param>
<Param name="Radius" dispName="Radius" varType="string">10</Param>
<Param name="Object" dispName="Target Unit" varType="unit">default</Param>
<Param name="radius" dispName="Approx. Radius (slightly off)" varType="string">10</Param>
<Param name="edge" dispName="Edge Only" varType="bool">false</Param>
<Command>trQuestVarSet("fhweaohpgpagowhwa", xsGetContextPlayer());</Command>
<Command loop="" loopParm="RefObject">trUnitSelect("%RefObject%");</Command>
<Command>trQuestVarSetFromRand("hwfeoaifop", 0, 1, true);</Command>
<Command>trQuestVarSetFromRand("wagogehmeas", 0, %radius%, true);</Command>
<Command>if(trQuestVarGet("hwfeoaifop")==0) trQuestVarSet("oiwghogwhywhlocx", xsVectorGetX(kbGetBlockPosition(""+1*%Object%))+trQuestVarGet("wagogehmeas"));</Command>
<Command>if(trQuestVarGet("hwfeoaifop")==1) trQuestVarSet("oiwghogwhywhlocx", xsVectorGetX(kbGetBlockPosition(""+1*%Object%))-trQuestVarGet("wagogehmeas"));</Command>
<Command>trQuestVarSet("hwfeoaifopx", 0);</Command>
<Command>if(íge%==true) trQuestVarSet("hwfeoaifopx", (%radius%-trQuestVarGet("wagogehmeas")));</Command>
<Command>trQuestVarSetFromRand("wagogehmeas", trQuestVarGet("hwfeoaifopx"), (%radius%-trQuestVarGet("wagogehmeas")), true);</Command>
<Command>trQuestVarSetFromRand("hwfeoaifop", 0, 1, true);</Command>
<Command>if(trQuestVarGet("hwfeoaifop")==0) trQuestVarSet("oiwghogwhywhlocz", xsVectorGetZ(kbGetBlockPosition(""+1*%Object%))+trQuestVarGet("wagogehmeas"));</Command>
<Command>if(trQuestVarGet("hwfeoaifop")==1) trQuestVarSet("oiwghogwhywhlocz", xsVectorGetZ(kbGetBlockPosition(""+1*%Object%))-trQuestVarGet("wagogehmeas"));</Command>
<Command>trUnitMoveFromArea(trQuestVarGet("oiwghogwhywhlocx"), xsVectorGetY(kbGetBlockPosition(""+1*%Object%)), trQuestVarGet("oiwghogwhywhlocz"), -1, false, %PlayerID%, "%UnitType%", %Radius%);</Command>
Mister SCP
Scenario Reviewer
posted 06-01-16 02:56 PM EDT (US)     828 / 843       
are you sure it is case sensitive (radius/Radius)?
check ..../user/documents/my games/Age of Empires 3\Trigger3/trigtemp.xs to find out how your code is interpreted

trQuestVarSetFromRand("wagogehmeas",-%radius%,%radius%, true);

storing the ContextPlayer is unnecessary and a old AOM behaviour

<Command>trQuestVarSet("fhweaohpgpagowhwa", xsGetContextPlayer());</Command>

Is this the correct Player?


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 06-01-2016 @ 03:00 PM).]

posted 06-02-16 04:33 AM EDT (US)     829 / 843       
Here is the result in the trigtemp.xs,but i don't know what it means.
Maybe it isn' case sensitive.This trigger is not written by me.I don't know how to fix it.
I request for your help.

void main(void)

rule _Trigger_0
bool bVar0 = (true);

bool tempExp = (bVar0);
if (tempExp)
trQuestVarSet("fhweaohpgpagowhwa", xsGetContextPlayer());
trQuestVarSetFromRand("hwfeoaifop", 0, 1, true);
trQuestVarSetFromRand("wagogehmeas",-4,4, true);
if(trQuestVarGet("hwfeoaifop")==0) trQuestVarSet("oiwghogwhywhlocx", xsVectorGetX(kbGetBlockPosition(""+1*1))+trQuestVarGet("wagogehmeas"));
if(trQuestVarGet("hwfeoaifop")==1) trQuestVarSet("oiwghogwhywhlocx", xsVectorGetX(kbGetBlockPosition(""+1*1))-trQuestVarGet("wagogehmeas"));
trQuestVarSet("hwfeoaifopx", 0);
if(true==true) trQuestVarSet("hwfeoaifopx", (4-trQuestVarGet("wagogehmeas")));
trQuestVarSetFromRand("wagogehmeas", trQuestVarGet("hwfeoaifopx"), (4-trQuestVarGet("wagogehmeas")), true);
trQuestVarSetFromRand("hwfeoaifop", 0, 1, true);
if(trQuestVarGet("hwfeoaifop")==0) trQuestVarSet("oiwghogwhywhlocz", xsVectorGetZ(kbGetBlockPosition(""+1*1))+trQuestVarGet("wagogehmeas"));
if(trQuestVarGet("hwfeoaifop")==1) trQuestVarSet("oiwghogwhywhlocz", xsVectorGetZ(kbGetBlockPosition(""+1*1))-trQuestVarGet("wagogehmeas"));
trUnitMoveFromArea(trQuestVarGet("oiwghogwhywhlocx"), xsVectorGetY(kbGetBlockPosition(""+1*1)), trQuestVarGet("oiwghogwhywhlocz"), -1, false, 1, "Unit", 4);
trEcho("Trigger disabling rule Trigger_0");
Mister SCP
Scenario Reviewer
posted 06-02-16 02:41 PM EDT (US)     830 / 843       
replace all instances of Radius (not radius) by another string like targetradius or Radius2

ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 06-02-2016 @ 02:42 PM).]

posted 06-21-16 03:21 PM EDT (US)     831 / 843       
Check to see if a player has at least one town center
Mister SCP
Scenario Reviewer
posted 06-21-16 03:44 PM EDT (US)     832 / 843       
you may want to use the "units in area"-condition with a large radius and set the towncenter as counted unit

ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
posted 08-27-16 03:21 AM EDT (US)     833 / 843       
Can I (and how do I) use the condition 'tech status equals' in a custom trigger?

I want to activate another trigger when a tech (age) has become active
posted 08-27-16 05:05 AM EDT (US)     834 / 843       
Not sure why you would need a custom trigger for that, just add a condition manually?
if(trTechStatusCheck(<player>, <techid>, <0=Unobtainable,1=Obtainable,2=Active>)){


You need to be careful when adding conditions to custom effect triggers, though... the condition in the trigger editor takes priority before any conditions in the effect are checked.

Retired content creator. Experience in custom triggers, xs injection, UI modding, aoe3 in general. I'll probably be back for AoE3: DE if they lack a good observer mode.

The work I'm proudest of:

An advanced observer mode for AoE3 made entirely from a combination of UI modding and xs injection
link to thread
Mister SCP
Scenario Reviewer
posted 08-27-16 01:29 PM EDT (US)     835 / 843       
posted 10-12-16 02:21 AM EDT (US)     836 / 843       
Can you let your trigger"Protounits work on Unit *TL*" be able to set the range of the working units?I want to make the unit type in area working on the unit,not all the same unit type in the map.
When i set the unit type for seltter,target unit for the mill,it makes all the seltters in the map working on the mill.I think it needs a range limit.

[This message has been edited by ChinaBurgerMaker (edited 10-14-2016 @ 01:51 AM).]

posted 11-02-16 10:38 PM EDT (US)     837 / 843       
I got two problems with my personal modified trigger"Units in area work on unit2"
I have added the function to modify the radius but there are still some small problems.
First problem is when the center unit is dead, the units in death center unit area are still be able to work on the unit,I don't know how to make units in area don't execute when the center unit is dead.
The second problem is I don't know how to set inclube center unit or not.I saw your trigger has this function but I don'know how to set, I need your help.
Here is my trigger:

<Effect name="Units in area work on unit2">
<Param name="PlayerID" dispName="$$22444$$From Player" VarType="player">1</Param>
<Param name="UnitType" dispName="Source Unit Type" VarType="unittype">Unit</Param>
<Param name="SrcObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
<Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
<Param name="DstObject" dispName="Target Unit" VarType="unit">default</Param>
<Command>for (all=1800;>-1){ if (kbGetUnitTypeName(all)=="%UnitType%") break;}</Command>
<Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%, true);</Command>
<Command>kbUnitQuerySetUnitType(Qid, all);</Command>
<Command>kbUnitQuerySetPosition(Qid, kbGetBlockPosition("%SrcObject%"));</Command>
<Command>kbUnitQuerySetMaximumDistance(Qid, %Dist%);</Command>
<Command>kbUnitQuerySetAscendingSort(Qid, false);</Command>
<Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>

[This message has been edited by ChinaBurgerMaker (edited 11-02-2016 @ 10:41 PM).]

posted 01-28-17 08:26 PM EDT (US)     838 / 843       
Erherm. Just linking to this post from the downloads section...
     <Effect name="Unit Set Tactic Artillery">       <Param name="PlayerID" dispName="Player ID" VarType="string">1</Param>       <Param name="Obj" dispName="$$22295$$Source Units" VarType="unit">default</Param>   <Param name="Note" dispName="Note" VarType="string">Because of the nature of this trigger, it can only change the Tactic of one Unit at a time. </Param>   <Param name="A" dispName="Bombard" VarType="bool">true</Param>   <Param name="B" dispName="Limber" VarType="false">false</Param>       <Command>trUnitSelectClear();</Command>       <Command>uiClearSelection();</Command>       <Command>trBlockAllSounds(true);</Command>         <Command>for(FP=0;>1){}</Command>                <Command>FP=trCurrentPlayer();</Command>       <Command>trackInsert(); trackAddWaypoint();</Command>       <Command>if(FP==%PlayerID%) {</Command>       <Command>trPlayerSetActive(%PlayerID%);</Command>       <Command>trUnitSelect("%Obj%");</Command>          <Command>for(oldPlayer=xsGetContextPlayer();>99){}</Command>       <Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>       <Command>for(err=0;>1){} for(id=0;>1){} id = kbGetUnitBaseTypeID(kbGetBlockID("%Obj%")); </Command>       <Command>if(trUnitIsOwnedBy(%PlayerID%)){if(trUnitAlive()){</Command>       <Command>while(trUnitIsSelected()!=true) {err=err+1; </Command>       <Command>uiFindType(kbGetProtoUnitName(id));</Command>       <Command>if(err>200) {break;}}}}</Command>       <Command>xsSetContextPlayer(oldPlayer);</Command>       <Command>trPlayerSetActive(FP);}</Command>       <Command>trackPlay(1,-1);</Command>          <Command>trUnblockAllSounds();</Command>       <Command>if (%A%==true) unitSetTactic("Bombard");</Command>       <Command>else if (%B%==true) unitSetTactic("Normal");</Command>       <Command>uiClearSelection();</Command>     </Effect> 
This doesn't work if the trigger/effect happens on a non-human controlled player.

[This message has been edited by DjReplica (edited 01-28-2017 @ 08:26 PM).]

posted 05-29-17 11:06 AM EDT (US)     839 / 843       
Hello guys !
This is my request :

I want to make a trigger similar to Dullahan's AI (by musketeer925) in War of the triple alliance.
Details :
* I select the unit with center unit inside editor.
* When playing the scenario, the unit scouts firstly. Then it looks for an enemy unit and attacks it when it is found and close enough, but if it is out of range, the unit does a simple attack move. When the attacker has less than 35 percent of its maximum hitpoints, make it to runaway and looking for a healing area (let's take a field hospital as example). If that area exists, go there but if not, runaway farther. When the unit has restored +75 percent of its hitpoints, redo scouting and attacks.
The idea is to make an AI for a single unit instead of a complete AI which controls a whole settlement. Do you have any suggestion to improve it (hit and run, taking inventory objects,... in other words: making a certain variable or whatever stuff which can be used to stop the "controller-trigger" so that the unit can do another stuff instead of constantly scouting and attacking, and another thing which can be used to use "controller-trigger" again)

I hope I will get a response very soon. Thank you very much !
posted 06-08-17 09:09 PM EDT (US)     840 / 843       
Hi SkyOne,

I have to admit that request is pretty complicated. I don't really do much trigger development any more, and probably don't have time to do it for you. Maybe you could take a shot at modifying my old Dullahan trigger yourself?

I'd be happy to give some direction on that if you need further help.
posted 06-10-17 03:13 AM EDT (US)     841 / 843       
Hello musketeer,

I am happy that you replied to my request yourself. Indeed I have already modified your trigger myself. But sometimes it doesn't work : the unit goes to the bottom of the map, the unit tries to attack enemy units when it runaways,... I am wondering what I have done wrong. Maybe I can write here the codes ? I will check it and return here after a few minutes.

So here are the codes, partly modified from yours:

//first, create useful variables and functions

vector v1 = cInvalidVector;

vector v2 = cInvalidVector;

int tempInteger = -1;

int getUnit(int unitTypeID = -1, int playerID = 1, vector center = cInvalidVector, int pos = 0)


          int ret = -1;




          kbUnitQuerySetPlayerID(unitQueryID, playerID);

          kbUnitQuerySetUnitType(unitQueryID, unitTypeID);

          kbUnitQuerySetState(unitQueryID, cUnitStateAlive);

          if (center != vector(-1,-1,-1))


                    kbUnitQuerySetPosition(unitQueryID, center);

                    kbUnitQuerySetAscendingSort(unitQueryID, true);



          if (kbUnitQueryExecute(unitQueryID)>0)

                    ret=kbUnitQueryGetResult(unitQueryID, pos);





//then load ID of certain units

for (target=100000;>=-1){if(kbGetUnitTypeName(target)=="All") break;}

trQuestVarSet("AllUnitsQV", target);

for (fieldhospital=100000;>=-1){if(kbGetUnitTypeName(fieldhospital)=="FieldHospital") break;}

trQuestVarSet("FHQV", target);

//now make unit to attack

<Param name="DstPoint" dispName="X" varType="area">0</Param>

<Param name="Attacker" dispName="Attacker" varType="unit">default</Param>

for(i=8;>=1){if(((kbIsPlayerResigned(i)==false)||(kbHasPlayerLost(i)==false)) && (kbIsPlayerEnemy(i)==true) && (kbIsPlayerNeutral(i)==false) && (kbIsPlayerValid(i)==true)){break;}}

for(j=getUnit(trQuestVarGet("AllUnitsQV"), i, vector(%DstPoint%), 0);>=99999999){}






                              j=getUnit(trQuestVarGet("AllUnitsQV"), i,vector(%DstPoint%),k);




          if(kbUnitGetCurrentHitpoints(%Attacker%) >= kbUnitGetMaximumHitpoints(%Attacker%)*0.333333)





                    if (trUnitDistanceToUnit(""+j) > 15)

                              trUnitMoveToPoint(xsVectorGetX(v1),0,xsVectorGetZ(v1), -1, true);






                    trQuestVarSet("AttackerPlayerID", kbUnitGetPlayerID(%Attacker%));

                    v2 = kbUnitGetPosition(%Attacker%)-xsVectorGetX(kbUnitGetPosition(j));

                    trQuestVarSet("AttackerPosX", xsVectorGetX(kbUnitGetPosition(%Attacker%)));

                    trQuestVarSet("AttackerPosZ", xsVectorGetZ(kbUnitGetPosition(%Attacker%)));

                    trQuestVarSet("TargetPosX", xsVectorGetX(kbUnitGetPosition(j)));

                    trQuestVarSet("TargetPosZ", xsVectorGetZ(kbUnitGetPosition(j)));

                    trQuestVarSet("DistanceAttTar", xsVectorLength(v2);

                    //runaway move symmetrically

                    if(trQuestVarGet("AttackerPosX") > trQuestVarGet("TargetPosX"))

                              trQuestVarSet("DestinationPosX", trQuestVarGet("AttackerPosX") + trQuestVarGet("DistanceAttTar"));

                    if(trQuestVarGet("AttackerPosX") == trQuestVarGet("TargetPosX"))

                              trQuestVarSet("DestinationPosX", trQuestVarGet("AttackerPosX"));

                    if(trQuestVarGet("AttackerPosX") < trQuestVarGet("TargetPosX"))

                              trQuestVarSet("DestinationPosX", trQuestVarGet("AttackerPosX") - trQuestVarGet("DistanceAttTar"));

                    if(trQuestVarGet("AttackerPosZ") > trQuestVarGet("TargetPosZ"))

                              trQuestVarSet("DestinationPosZ", trQuestVarGet("AttackerPosZ") + trQuestVarGet("DistanceAttTar"));

                    if(trQuestVarGet("AttackerPosZ") == trQuestVarGet("TargetPosZ"))

                              trQuestVarSet("DestinationPosZ", trQuestVarGet("AttackerPosZ"));

                    if(trQuestVarGet("AttackerPosZ") < trQuestVarGet("TargetPosZ"))

                              trQuestVarSet("DestinationPosZ", trQuestVarGet("AttackerPosZ") - trQuestVarGet("DistanceAttTar"));

                    trUnitMoveToPoint(trQuestVarGet("DestinationPosX"), 0, trQuestVarGet("DestinationPosZ"), -1, false, false, 0.0);

                    if(trPlayerUnitCountSpecific(trQuestVarGet("AttackerPlayerID"), "FieldHospital") >= 1)


                              trQuestVarSet("FieldHospitalPosX", xsVectorGetX(kbUnitGetPosition(getUnit(trQuestVarGet("FHQV"), trQuestVarGet("AttackerPlayerID"), vector(%DstPoint%), 0))));

                              trQuestVarSet("FieldHospitalPosZ", xsVectorGetZ(kbUnitGetPosition(getUnit(trQuestVarGet("FHQV"), trQuestVarGet("AttackerPlayerID"), vector(%DstPoint%), 0))));

                              trQuestVarSet("DestinationPosX", trQuestVarGet("FieldHospitalPosX"));

                              trQuestVarSet("DestinationPosZ", trQuestVarGet("FieldHospitalPosZ"));

                              trUnitMoveToPoint(trQuestVarGet("DestinationPosX"), 0, trQuestVarGet("DestinationPosZ"), -1, false, false, 0.0);



[This message has been edited by SkyOne578 (edited 06-10-2017 @ 10:23 AM).]

posted 02-26-18 11:35 PM EDT (US)     842 / 843       
@Mister SCP@Aizamk
Could someone help me to write the effect "Units in Area Work Units in Area"?
I don't know how to write the commands so I just write the param name.
I think this effect can be achieved because trUnitWork can work on the units those be created by Unit Create triggers.

<Effect name="Units in Area Work Units in Area">
<Param name="Player1" dispName="Source Player" VarType="string">1</Param>
<Param name="UnitType1" dispName="Source Unit Type" VarType="unittype">Unit</Param>
<Param name="SrcObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
<Param name="Dist1" dispName=" SourceRadius" VarType="string">10</Param>
<Param name="Player" dispName="Target Player" VarType="string">1</Param>
<Param name="UnitType" dispName="Target Unit Type" VarType="unittype">Unit</Param>
<Param name="TargetObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
<Param name="Dist" dispName="Target Radius" VarType="string">10</Param>
posted 06-28-18 03:30 AM EDT (US)     843 / 843       
Hi all, so I'm stuck on a function that aoe and any of the added scanerio editors don't offer.. Its actually quite simple but I can't find the value.

I want a simple trigger that "condition" = if player free units is more than 0, or more than anything, then "effect" do something..

The free units variable is actually kept track by something in the game because POST GAME charts show that in the resource section, its at the end "free units"

So something has to keep track of this. Free units are anything you recieve from treasures, home city shippments, or yes, the moesbar hack which I'm trying to detect by implementing this code.

I went through the game files I cannot find the ID of this value that keeps track of shit which is more so annoying. Can anyone help?

Free Unit Count
Show how many free units a player recieved during live game
greater than or less than or equal to

Thanks so much if someone can just include the code snippet I can just copy and paste it into my scnaerio tool files
« Previous Page  1 ··· 10 ··· 20 ··· 32 33 34  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires III Heaven | HeavenGames