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.847 replies, Sticky
Age of Empires III Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
Bottom
Topic Subject:Have a Trigger Request? Post it here!
« Previous Page  1 2 3 ··· 10 ··· 20 ··· 30 ··· 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.

    Notes:

  • 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 mister.scp@gmail.com.


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

    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.

    [b]Name[/b]
    [b]Description[/b]
    [b]Params[/b]
    (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.


~MisterSCP


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).]

AuthorReplies:
Hoplite_Fighter1
Skirmisher
posted 05-22-09 08:20 PM EDT (US)     1 / 847       
how about a trigger that changes the name of all of a certain unit. Ex: Every Longbowman is now an archer. Even when you look at it in the buildings at the training window
Mister SCP
Scenario Reviewer
posted 05-23-09 02:49 AM EDT (US)     2 / 847       
Even when you look at it in the buildings at the training window
That require modding stringtabley and techtreey. ES gave us no Effect which is useable in trigger to do that. For all existing units we use:
   <Effect name="Change Name in Area (Center Unit)">
<Param name="Object" dispName="Center Unit" varType="unit">default</Param>
<Param name="Dst" dispName="Radius" varType="string">10.0</Param>
<Param name="UnitId" dispName="Unit Type ID (Optional)" varType="string">-1</Param>
<Param name="FromPlayer" dispName="From Player or 99 for ALL" varType="string">99</Param>
<Param name="Namer" dispName="Change Display Name" varType="string">Insert Name Here</Param>
<Param name="Booler" dispName="Include Center Unit" varType="bool">false</Param>
<Command>trQuestVarSet("convarea", 0);</Command>
<Command>trQuestVarSet("ffweho",0);</Command>
<Command>if(%FromPlayer%!=99) trQuestVarSet("vroom", %FromPlayer%);</Command>
<Command>trQuestVarSet("warthog", 0);</Command>
<Command>trQuestVarSet("zeep", 0);</Command>
<Command>if(%UnitId%>=0) {</Command>
<Command>trQuestVarSet("zeep", %UnitId%);</Command>
<Command>}</Command>
<Command>if(0>%UnitId%) {</Command>
<Command>while(kbGetUnitTypeName(trQuestVarGet("zeep"))!="All") {</Command>
<Command>trQuestVarSet("zeep", trQuestVarGet("zeep")+1);</Command>
<Command>}}</Command>
<Command>trQuestVarSet("lastpl", xsGetContextPlayer());</Command>
<Command>xsSetContextPlayer(0);</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>if(%FromPlayer%!=99) trQuestVarSet("blarg",%FromPlayer%);</Command>
<Command>if(%FromPlayer%==99) {</Command>
<Command>trQuestVarSet("blarg",0);</Command>
<Command>trQuestVarSet("vroom",8);</Command>
<Command>}</Command>
<Command>trQuestVarSet("i",trQuestVarGet("blarg"));</Command>
<Command>while(trQuestVarGet("vroom")>=trQuestVarGet("i")) {</Command>
<Command>trQuestVarSet("convarea", kbUnitQueryCreate("convarea"));</Command>
<Command>kbUnitQuerySetPlayerID(trQuestVarGet("convarea"), trQuestVarGet("i"));</Command>
<Command>kbUnitQuerySetUnitType(trQuestVarGet("convarea"), trQuestVarGet("zeep"));</Command>
<Command>kbUnitQuerySetPosition(trQuestVarGet("convarea"), kbGetBlockPosition(""+1*%Object%));</Command>
<Command>kbUnitQuerySetMaximumDistance(trQuestVarGet("convarea"), %Dst%);</Command>
<Command>kbUnitQuerySetAscendingSort(trQuestVarGet("convarea"), true);</Command>
<Command>kbUnitQueryResetResults(trQuestVarGet("convarea"));</Command>
<Command>trQuestVarSet("warthog", kbUnitQueryExecute(trQuestVarGet("convarea")));</Command>
<Command>while(trQuestVarGet("warthog")>0) {</Command>
<Command>trQuestVarSet("warthog", trQuestVarGet("warthog")-1);</Command>
<Command>trQuestVarSet("ffweho", kbUnitQueryGetResult(trQuestVarGet("convarea"), trQuestVarGet("warthog")));</Command>
<Command>trQuestVarSet("ffweho2", trQuestVarGet("ffweho"));</Command>
<Command>if(%Booler%==true) {</Command>
<Command>if(trQuestVarGet("ffweho2")==kbGetBlockID(""+1*%Object%)) {trQuestVarSet("ffweho2", trQuestVarGet("ffweho")+1);}}</Command>
<Command>if(trQuestVarGet("ffweho2")!=kbGetBlockID(""+1*%Object%)) {</Command>
<Command>trUnitSelectClear();</Command>
<Command>trUnitSelectByID(1*trQuestVarGet("ffweho"));</Command>
<Command>trUnitChangeName("%Namer%");</Command>
<Command>}}</Command>
<Command>trQuestVarSet("i", trQuestVarGet("i")+1);}</Command>
<Command>xsSetContextPlayer(trQuestVarGet("lastpl"));</Command>
</Effect>


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
Hoplite_Fighter1
Skirmisher
posted 05-23-09 10:36 AM EDT (US)     3 / 847       
ok, thanks. ES really doesnt give us much for editor eh, oh and what does QV mean?
KevTheGreat
Scenario Expert
posted 05-23-09 12:58 PM EDT (US)     4 / 847       
Quest Variable

You basically use it like algrebra, make a variable, then you can give it a number, and make certain conditions change it.

AGE OF EMPIRES 3 USERNAME - KevTheGreat :::: DAWN OF WAR 2 USERNAME - KEVTHEGREATEST :::: STEAM USERNAME - 何健龍
Some of my aoe3 scenarios here,
Most Popular: The Race 2 4.7/5.0 Global Wars 4.4/5.0 The Great Colosseum 4.6/5.0 Arab Desert 4V2 3.9/5.0 The Race 4.2/5 Fort of War 3.9/5.0
don't click this?
Follow me on Twitter
我知廣東話, 你知唔知廣東話?? 如果你知 contact me !!

[This message has been edited by KevTheGreat (edited 05-23-2009 @ 01:02 PM).]

Mister SCP
Scenario Reviewer
posted 05-23-09 02:26 PM EDT (US)     5 / 847       
yes Quest Vars are very powerfull. We use them to:
  • randomize events
  • if the disable trigger dont work
  • if we need to loop a trigger e.g. for 30 times
  • 1 kill 1 gold trigs
  • show states/Counters from Resources...
  • many more like my Anti-Thief Triggers,XS - Stuff...

    small explanation on how to use them http://wiki.heavengames.com/age/Quest_Var

    A possible way to finally fix your problem could be a string manipulation but i ve no experience (even dont know if it's possible to manipulate strings in AOE3)and must ask invent00r to help me.


    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
  • Mitoe
    Skirmisher
    posted 05-27-09 01:22 AM EDT (US)     6 / 847       
    Quick question, if I make a scenario using triggers that do not originally come with the game, do other people who download it need to have the same triggers installed to be able to run the scenario?
    Mister SCP
    Scenario Reviewer
    posted 05-27-09 11:17 AM EDT (US)     7 / 847       
    short answer: No they needn't install

    long answer: your scenario autmoaticly create a file called typetest while loading time(My Documents\My Games\Age of Empires 3\trigger3). Since we only can use Commands ES gave us the typetest can be interpreted by other users as well since every AOE3 Game knows how to interpret these commands.


    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 05-27-2009 @ 11:23 AM).]

    Mister SCP
    Scenario Reviewer
    posted 06-02-09 10:10 AM EDT (US)     8 / 847       
    at the moment I am working with the Console. I get really nice commands like one where you can send your current selected units into stealth mode

    therefore you need to make
    Send Chat1:
    "); /*
    Send Chat2:
    */unitToggleStealth();/*
    Send Chat3:
    */ //
    (all units with this ability go to stealth mode) for other formations it xists as well
    instead unitToggleStealth(); you can aswell type in commands like

    • uiDeleteSelectedUnit(); (delete current selected unit nice AS-Effect)

    If there is a interest I can write therefore trigger. Maybe also for select the unit first.


    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-2009 @ 03:34 PM).]

    CrazyEngineerKid
    Skirmisher
    posted 06-05-09 03:31 PM EDT (US)     9 / 847       
    Yo.
    I am working on a scenario called Urban Combat (you may remember the first failure of this game but I assure you this version is much better) and I want one trigger to just handle the largest aspect of the game.

    When you "takeover a building" you have to make one of your guys stand next to a flag surrounded by walls to look like a room. Every X seconds, you get coin for every flag you have a guy near. I have a trigger that works that you could put on every flag individually that I wrote just for this purpose:
      <Effect name="UrbanCombatGoldFlags(per flag)">
    <Param name="DstObject" dispName="Center Flag" VarType="unit">default</Param>
    <Param name="QuestVarDist" dispName="QV(Distance)" varType="string">DistanceQV</Param>
    <Param name="QuestVarNum" dispName="QV(LowestNumOfUnits)" varType="string">DistanceQV</Param>
    <Param name="QuestVarGrant" dispName="QV(AmmountOfGold)" varType="string">DistanceQV</Param>
    <Command>if(trCountUnitsInArea("%DstObject%",1,"Unit",trQuestVarGet("%QuestVarDist%")) >= trQuestVarGet("%QuestVarNum%")) {</Command>
    <Command>trPlayerGrantResources(1, "Gold", trQuestVarGet("%QuestVarGrant%"));</Command>
    <Command>}</Command>
    <Command>if(trCountUnitsInArea("%DstObject%",2,"Unit",trQuestVarGet("%QuestVarDist%")) >= trQuestVarGet("%QuestVarNum%")) {</Command>
    <Command>trPlayerGrantResources(2, "Gold", trQuestVarGet("%QuestVarGrant%"));</Command>
    <Command>}</Command>
    <Command>if(trCountUnitsInArea("%DstObject%",3,"Unit",trQuestVarGet("%QuestVarDist%")) >= trQuestVarGet("%QuestVarNum%")) {</Command>
    <Command>trPlayerGrantResources(3, "Gold", trQuestVarGet("%QuestVarGrant%"));</Command>
    <Command>}</Command>
    <Command>if(trCountUnitsInArea("%DstObject%",4,"Unit",trQuestVarGet("%QuestVarDist%")) >= trQuestVarGet("%QuestVarNum%")) {</Command>
    <Command>trPlayerGrantResources(4, "Gold", trQuestVarGet("%QuestVarGrant%"));</Command>
    <Command>}</Command>
    </Effect>
    The problem with this is that there are close (if not over) one hundred flags and rooms you can take over. In Labyrinth I used a trigger someone made for me on an AOM forum that would change an object to a random protounit but it would re-randomize for every unit you had selected. (up to 50 at the same time)
    This would make the entire map really easy but if it is possible to do that, it should be possible to make this happen to all of the flags on the map with a single ptfq "units in area" trigger. I looked at that trigger and the only reason that I have not already just stuck the above code into it is that it works by selecting each object in the area, not in a way you can adapt it to work with a "count units in area" condition that has a default argument of %SrcObject%. SrcObject is not a selected object, it is a "unit" variable. How to I create a variable like this from it's ID number (or will it just work with that)

    Can I use the unit's ID number in place of the "%SrcObject%" param?

    ps. the labyrinth trigger works in the same way by selecting, so that will not work

    ..XX......XX.........XXXXX..........The Answer to Life, The
    ..XX......XX.....XX.......XXX.......Universe, And Everything
    ..XX......XX...............XX.............(see left)
    ..XXXXXXX......XXX................Warning Science in Progress
    ............XX.......XXX....................Geeks Rule
    ............XX....XXXXXXXXX.....The current time: NOW
    Mister SCP
    Scenario Reviewer
    posted 06-05-09 04:55 PM EDT (US)     10 / 847       
    okay it's in work.
    i have the idea to make a second query at this unit but this would slow down the game


    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-05-2009 @ 05:11 PM).]

    CrazyEngineerKid
    Skirmisher
    posted 06-05-09 05:19 PM EDT (US)     11 / 847       
    i sort of understand the query stuff, it searches for units under the params you give it, but I don't know the syntax...

    does the "units in area" command actually search like that behind the scenes? I bet it does; it has to search somehow. (i don't think ES would write a completely different subroutine for searching if they already had a command to do so...) If you were to write a second query at each unit, I think it wouldn't slow down the game very much compared to just giving every flag a trigger.

    ..XX......XX.........XXXXX..........The Answer to Life, The
    ..XX......XX.....XX.......XXX.......Universe, And Everything
    ..XX......XX...............XX.............(see left)
    ..XXXXXXX......XXX................Warning Science in Progress
    ............XX.......XXX....................Geeks Rule
    ............XX....XXXXXXXXX.....The current time: NOW

    [This message has been edited by CrazyEngineerKid (edited 06-05-2009 @ 05:22 PM).]

    Mister SCP
    Scenario Reviewer
    posted 06-05-09 06:14 PM EDT (US)     12 / 847       
    i sort of understand the query stuff, it searches for units under the params you give it, but I don't know the syntax...
    if I would know what a syntax is i could be able to answer this however it have a clear structure that u can see either in pftq's/inventoor's or in my triggerpack. While pftq add very many additional stuff to them me and invent00r keep it relative simple.You have generally two operations you do with them after installing there basic triggers


    1. kbUnitQueryExecute(Qid)
      ->count units that fit this conditions (Qid is a variable name (Integer in this case))
    2. and
      kbUnitQueryGetResult(Qid,i)
      which get the current unit ID.

    most times you see sth like
    for(i=kbUnitQueryExecute(Qid)-1;>-1){...}
    if you reduce "i" you gain the next unitID which u call then with
    kbUnitQueryGetResult(Qid,i)
    as an example you can take this trigger which save the QV of units (unit1->QVName1;unit2->QVName2;...)
          <Effect name="QV Set Unit OBJECT IDs">
    <Param name="DstObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
    <Param name="PlayerID" dispName="$$22444$$From Player" VarType="player">1</Param>
    <Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
    <Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
    <Param name="QVName" dispName="QV" varType="string">XY</Param>
    <Command>for(Qid=0;>1){}</Command>
    <Command>for(u=0;>1){}</Command>
    <Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>
    <Command>Qid=kbUnitQueryCreate("QDUA_%PlayerID%_%ProtoName%");</Command>
    <Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%, true);</Command>
    <Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%ProtoName%"));</Command>
    <Command>kbUnitQuerySetPosition(Qid, kbGetBlockPosition("%DstObject%"));</Command>
    <Command>kbUnitQuerySetMaximumDistance(Qid, %Dist%);</Command>
    <Command>kbUnitQuerySetAscendingSort(Qid, false);</Command>
    <Command>kbUnitQuerySetState(Qid,2);</Command>
    <Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>
    <Command>u=u+1;</Command>
    <Command>trQuestVarSet("%QVName%"+u+"",kbUnitQueryGetResult(Qid,i));</Command>
    <Command>}</Command>
    </Effect>
    does the "units in area" command actually search like that behind the scenes? I bet it does; it has to search somehow. (i don't think ES would write a completely different subroutine for searching if they already had a command to do so...) If you were to write a second query at each unit, I think it wouldn't slow down the game very much compared to just giving every flag a trigger.
    We can try it out.
    btw. Normally the %SrcUnit% is translated to an integer (same as unitID) if you select noone it shows "default)...(look in trigtemp.xs if you dont believe). And this is the difficult point. I maybe found currently a kbCommand that convert a ID into the SrcUnit thing but I dont test it out today cause it's 0:15AM


    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-05-2009 @ 06:19 PM).]

    Hoplite_Fighter1
    Skirmisher
    posted 06-05-09 06:23 PM EDT (US)     13 / 847       
    umm, i think it would be good if there was a 'follow unit trigger'
    Mister SCP
    Scenario Reviewer
    posted 06-05-09 06:40 PM EDT (US)     14 / 847       
    use this
    <Effect name="Move to Unit">
    <Param name="SrcObject" dispName="$$22295$$Source Units" varType="unit">default</Param>
    <Param name="DstObject" dispName="$$22296$$Target Unit" varType="unit">default</Param>
    <Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
    <Param name="AttackMove" dispName="$$22416$$Attack Move" varType="bool">false</Param>
    <Param name="Run" dispName="$$35568$$Run" varType="bool">false</Param>
    <Param name="RunSpeed" dispName="$$36895$$Run Speed" varType="float">1.0</Param>
    <Command>trUnitSelectClear();</Command>
    <Command loop="" loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command>
    <Command>trUnitMoveToUnit("%DstObject%",%EventID%, %AttackMove%, %Run%, %RunSpeed%);</Command>
    </Effect>
    It is simple and you can define the conditions yourself (e.g. unit is Not Attacked and Distance to Other unit) The only thing that I could do is to loop the triggercode but It will have defintly disadvantages like no flexiblity of this trigger. I used it aswell in my Broken Empire Scenario


    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-05-2009 @ 06:41 PM).]

    CrazyEngineerKid
    Skirmisher
    posted 06-05-09 07:00 PM EDT (US)     15 / 847       
    so what is that command?
    I could try it out.

    ..XX......XX.........XXXXX..........The Answer to Life, The
    ..XX......XX.....XX.......XXX.......Universe, And Everything
    ..XX......XX...............XX.............(see left)
    ..XXXXXXX......XXX................Warning Science in Progress
    ............XX.......XXX....................Geeks Rule
    ............XX....XXXXXXXXX.....The current time: NOW
    Mister SCP
    Scenario Reviewer
    posted 06-06-09 03:53 PM EDT (US)     16 / 847       
    1. I found today out that the command dont do what I intend that he do
    2. I think it's doable with queries right now just need to debug the code.

    But it's a lot of queries that it have to create in the trigger
    1+4*Number of Flags
    say 50 flags ->201 queries EACH check


    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
    Mister SCP
    Scenario Reviewer
    posted 06-07-09 07:44 AM EDT (US)     17 / 847       
    some News:
    SrcUnit can be replaced by
    ""+%YourCount%
    e.g.
    ""+kbUnitQueryGetResult(Qid,i)
    so it would look like
    if (trCountUnitsInArea(""+kbUnitQueryGetResult(Qid,i), %playerID%, "Unit", %Distance%) >= %amount%) {...
    At the moment I stuck at the point where to choose the correct player. At the moment just the player who controls the "flags" can grant resources. Maybe you wanna check it and can fix it. If not I'll do soon.
             <Effect name="XS - Crazys Trigger">
    <Param name="DstObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
    <Param name="PlayerID" dispName="$$22444$$From Player" VarType="string">1</Param>
    <Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
    <Param name="DST" dispName="Distance" VarType="string">10</Param>
    <Param name="am" dispName="Count" VarType="string">1</Param>
    <Param name="Grant" dispName="Grant Resource" VarType="string">10</Param>
    <Command>for(Qid=0;>1){}</Command>
    <Command>for(pla=1;>1){}</Command>
    <Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>
    <Command>Qid=kbUnitQueryCreate("QDUA_%PlayerID%_%ProtoName%");</Command>
    <Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%, true);</Command>
    <Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%ProtoName%"));</Command>
    <Command>kbUnitQuerySetPosition(Qid, kbGetBlockPosition("%DstObject%"));</Command>
    <Command>kbUnitQuerySetMaximumDistance(Qid, 1000);</Command>
    <Command>kbUnitQuerySetAscendingSort(Qid, false);</Command>
    <Command>kbUnitQuerySetState(Qid,2);</Command>
    <Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>
    <Command>pla=1;</Command>
    <Command>if (kbUnitQueryGetResult(Qid,i) != -1) {</Command>
    <Command>while (4>=pla) {</Command>
    <Command>xsSetContextPlayer(pla);</Command>
    <Command>if (trCountUnitsInArea(""+kbUnitQueryGetResult(Qid,i), pla, "Unit", %DST%) >= %am%) {</Command>
    <Command>trPlayerGrantResources(pla, "Gold", %Grant%);}</Command>
    <Command>pla=pla+1;}</Command>
    <Command>}}</Command>
    </Effect>
    As you can see I replaced your QV's. If you want insert them you have to type in trQuestVarGet("QVName"). If not insert normal Numbers


    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-07-2009 @ 07:45 AM).]

    CrazyEngineerKid
    Skirmisher
    posted 06-07-09 10:21 AM EDT (US)     18 / 847       
    the QVs were just so that i could mod them all at once if i did have to make 100 or so triggers.
    how would I put in only to look for flags?
    just put in SPCFlag as the protounit?

    i found that object type ID was 98 if that helps.


    Thanks for all of your help here.

    ..XX......XX.........XXXXX..........The Answer to Life, The
    ..XX......XX.....XX.......XXX.......Universe, And Everything
    ..XX......XX...............XX.............(see left)
    ..XXXXXXX......XXX................Warning Science in Progress
    ............XX.......XXX....................Geeks Rule
    ............XX....XXXXXXXXX.....The current time: NOW
    Mister SCP
    Scenario Reviewer
    posted 06-07-09 03:40 PM EDT (US)     19 / 847       
    the QVs were just so that i could mod them all at once if i did have to make 100 or so triggers.
    how would I put in only to look for flags?
    just put in SPCFlag as the protounit?
    1.first select any invulnerable protounit (preferable of the player who controls the flags) it is needed for the Query
    2.Choose the player who controls the flag
    3.Choose the unit "spcFlag" in your case
    i found that object type ID was 98 if that helps.

    The object ID is replaced by Protoname

    At the moment the problem is that just a unit that belongs to the player can be used as the center of the area selection no clue why... try out unit convert soon, hopefully I am able to debug.

    The point of XS - Triggers is that u could insert any code so if you need just a defined value u type in a number if you need a QV you type in the trQuestVarGet("QVName")-code or you get a state value. At least this Effect should only be placed one time in scenario and then make the effect for all 4 players...
    I also have a alternative way but therefore you have to place much AITargetBlockWeak-units (4 per flag:P) and then I could seperate the player part of this trigger (so you needs 4 Effects then) and this way it would defintly work...


    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-07-2009 @ 04:15 PM).]

    CrazyEngineerKid
    Skirmisher
    posted 06-07-09 07:21 PM EDT (US)     20 / 847       
    Does the trigger work on gaia flags/units? I think all of them are like that to not give LOS advantage. even if they are different, i can just run a convert in area before running this trigger can't I?

    ..XX......XX.........XXXXX..........The Answer to Life, The
    ..XX......XX.....XX.......XXX.......Universe, And Everything
    ..XX......XX...............XX.............(see left)
    ..XXXXXXX......XXX................Warning Science in Progress
    ............XX.......XXX....................Geeks Rule
    ............XX....XXXXXXXXX.....The current time: NOW
    Darthcast
    Skirmisher
    posted 06-08-09 07:15 AM EDT (US)     21 / 847       
    Yesterday I worked on my scenario again, and noticed (again) how many triggers are broken and don't work.

    So my request is: Some of the official triggers should be fixed.
    E.g., yesterday it would have been easier for me, if the condition "Army is alive" was working. Yes, I know I can use "Army is dead" -> NOT instead, but that's still not the same.

    BTW: Would it be possible to entirely fix the "modify protounit" effect? I guess not, but I still wanted to ask.

    Play my scenarios! You won't believe how much fun they are!
    Mister SCP
    Scenario Reviewer
    posted 06-08-09 10:14 AM EDT (US)     22 / 847       
    @Darthcast
    <Condition name="Army Is Alive Pro">
    <Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
    <Command>trArmySelect("%SrcArmy%");</Command>
    <Expression>trUnitDead()==false</Expression>
    </Condition>
    Your question is answered in the main post. You cannot modify attacks with it SRY
    @Crazy: I ve a good and a bad message for u
    bad: SPCFlag cant be the Center Units of the Areas because it is not selectable by queries (you could have find out if you read my mainpost...->there is explained how
    to know if the unit is selectable (also my guide include it :P)

    good: It works now!!!
             <Effect name="Crazys Trigger">
    <Param name="DstObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
    <Param name="PlayerID" dispName="$$22444$$From Player" VarType="player">1</Param>
    <Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
    <Param name="DST" dispName="Distance" VarType="string">10</Param>
    <Param name="am" dispName="Count" VarType="string">1</Param>
    <Param name="Grant" dispName="Grant Resource" VarType="string">10</Param>
    <Command>for(Qid=0;>1){}</Command>
    <Command>for(pla=1;>1){}</Command>
    <Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>
    <Command>Qid=kbUnitQueryCreate("QDUA_%PlayerID%_%ProtoName%");</Command>
    <Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%);</Command>
    <Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%ProtoName%"));</Command>
    <Command>kbUnitQuerySetPosition(Qid, kbGetBlockPosition("%DstObject%"));</Command>
    <Command>kbUnitQuerySetMaximumDistance(Qid, 1000);</Command>
    <Command>kbUnitQuerySetAscendingSort(Qid, false);</Command>
    <Command>kbUnitQuerySetState(Qid,2);</Command>
    <Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>
    <Command>pla=1;</Command>
    <Command>if (kbUnitQueryGetResult(Qid,i) != -1) {</Command>
    <Command>while (4>=pla) {</Command>
    <Command>if (trCountUnitsInArea(""+kbUnitQueryGetResult(Qid,i), pla, "Unit", %DST%) >= %am%) {</Command>
    <Command>trPlayerGrantResources(pla, "Gold", %Grant%);}</Command>
    <Command>pla=pla+1;}}}</Command>
    <Command>kbUnitQueryDestroy(Qid);</Command>
    </Effect>

    U JUST NEED TO MAKE IT ONE TIME!!!!!!!!!!! (but u should loop it e.g. every 30 secs )
    1.Param: a cinematic blcok
    Filters for Query selection are the 2nd and the 3th Param (must be a query compatible unit->e.g. a Unit ,AITargetBlockWeak->is a invisible unit that can be selected by a query command.
    Cinematic Block, your Flag and many more aren't supported by query commands

    4.Param-6.Param CountUnits Params + the gold amount param. If you need to insert a QV in the editor use
    trQuestVarGet("QVName") or type it by hand in the trigger code


    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-11-2009 @ 11:53 AM).]

    Darthcast
    Skirmisher
    posted 06-08-09 11:11 AM EDT (US)     23 / 847       
    <Condition name="Army Is Alive Pro">
    <Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
    <Command>trArmySelect("%SrcArmy%");</Command>
    <Expression>trUnitDead()==false</Expression>
    </Condition>
    So if I replace the existing one with this one it will work? Thanks!

    Play my scenarios! You won't believe how much fun they are!
    Mister SCP
    Scenario Reviewer
    posted 06-08-09 11:28 AM EDT (US)     24 / 847       
    that is the dead condition just with the "Not" checked


    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
    CrazyEngineerKid
    Skirmisher
    posted 06-08-09 07:54 PM EDT (US)     25 / 847       
    lol, now I need a "create unit(s) at units in area" trigger to create target blocks :P

    hows this? (I can guarantee it needs help.)
        <Effect name="Unit Create Multi at Units in Area">
    <Param name="DstObject" dispName="Center Unit" VarType="unit">default</Param>
    <Param name="PlayerID" dispName="From Player" VarType="player">1</Param>
    <Param name="ProtoName" dispName="ProtoName in Area" varType="protounit">Villager</Param>
    <Param name="DST" dispName="Distance From Center" VarType="string">10</Param>
    <Param name="NewPlayerID" dispName="New Unit Player" varType="player">1</Param>
    <Param name="NewProtoName" dispName="New Unit ProtoName" varType="protounit">Villager</Param>
    <Param name="NewCount" dispName="New Unit Count" varType="long">0</Param>
    <Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>
    <Command>Qid=kbUnitQueryCreate("QDUA_%PlayerID%_%ProtoName%");</Command>
    <Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%);</Command>
    <Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%ProtoName%"));</Command>
    <Command>kbUnitQuerySetPosition(Qid, kbGetBlockPosition("%DstObject%"));</Command>
    <Command>kbUnitQuerySetMaximumDistance(Qid, 1000);</Command>
    <Command>kbUnitQuerySetAscendingSort(Qid, false);</Command>
    <Command>kbUnitQuerySetState(Qid,2);</Command>
    <Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>
    <Command>for (i=0; <%NewCount%)</Command>
    <Command> trUnitCreate("%NewProtoName%", "default", kbGetUnitPosition(Qid, 0,, %NewPlayerID%);</Command>
    <Command>}</Command>
    </Effect>

    ..XX......XX.........XXXXX..........The Answer to Life, The
    ..XX......XX.....XX.......XXX.......Universe, And Everything
    ..XX......XX...............XX.............(see left)
    ..XXXXXXX......XXX................Warning Science in Progress
    ............XX.......XXX....................Geeks Rule
    ............XX....XXXXXXXXX.....The current time: NOW
    « Previous Page  1 2 3 ··· 10 ··· 20 ··· 30 ··· 34  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Empires III Heaven | HeavenGames