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

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Have a Trigger Request? Post it here!
« Previous Page  1 2 3 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 60 ··· 70 ··· 80 ··· 90 ··· 100 ··· 101  Next Page »
posted 01 February 2009 11:53 AM EDT (US)   
So you have a question 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. If you have unrelated questions or need help with triggers, please use Azur's thread!



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

  1. What is a FAQ?
    The term "FAQ" (when pronounced, it rhymes with "back") is an acronym for Frequently Asked Questions.

  2. 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 AoM installation folder. C:\Program Files\Microsoft Games\Age of Mythology by default). Now open the trigger folder if you intend to use the trigger in vanilla, or open the trigger2 folder if you use The Titans expansion. 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 < /Conditions>, if you requested an effect paste it right above < /Effects>. Note the "s" at the end of both tags.

    Notes:

    1. When copying the trigger from someone please click first and only then copy the required code.
    2. If you're still uncomfortable with installing triggers please backup the original typetest file, i.e. copy the original to another folder.


  3. 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.

  4. So... How exactly are new triggers made?
    AoM has a built-in engine that can parse XS code. Triggers are programmed and interpreted using this language through a series of existing functions. Since there are over 600 functions, and only a few are used by the default triggers, this leaves plenty of room for a whole new set of advanced, useful triggers.

  5. Can I request anything?
    Although we can do a lot with today's knowledge, there are still limitation we won't ever get around. So if you think of a cool new trigger, make sure to post a request but don't forget you might get a negative reply. Commonly requested triggers that are not possible include (but are not limited to):

    • Modify Unit: change the stats of 1 particular unit.
    • Change Playername
    • Change Major God
    • Transform ALL units on map for player
    • I'll add more when I think of them.


  6. I want to learn trigger scripting, how do I do that?
    It takes quite some time, but if you really want to learn trigger coding, we recommend fully understanding XS language before you start making triggers. Therefore, go here: Master XS (WIP). If you want to skip all that, and you want to be able to create only simple triggers, read this guide.

  7. Help! My triggers have stopped working!
    Triggers Stop Working Guide. Also linking camera tracks, using Run Immediately, sound timers and decimals in conditions like Timer and Distance to Unit effect, might cause this. Moreover, typing an invalid name on the Victory Conditions will cause a trigger block. But post these sort of questions in the Great Question thread.



Resources

Recommended Downloads:
  1. Trigger Loader 2 + Quest Vars (AoM && TT) by invent00r and Mythic_Freak
  2. SomeNewXTriggers 3 (TT) & SomeNewTriggers 4 (AoM) by Reyk
  3. Proactive Triggers (TT & AoM) by invent00r
  4. Advanced Triggers Set (TT) by pftq
  5. New Custom Triggers (TT) by Baseballkid14
  6. Nottud's Latest Triggers by nottud
  7. Conditonal Effects (TT & AoM) by nottud
  8. Angry Levels (TT & AoM) by angryzor
  9. SIMSTools (TT) by angryzor
  10. Target Protounit Query by HailToTheOboe

Miscellaneous:
  1. First TRT by invent00r
  2. Trigger Templates by Mephiles
  3. A list of all guides sorted by Paperfriend




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.
Example - Optional. An example can be a great help when requesting complex triggers.

[b]Name[/b] -
[b]Description[/b] -
[b]Example[/b] -

We might even ignore posts in other formats if we're in a bad mood
Remember that not all triggers are possible but we will try our best.




Unfinished Requests

  • Unit Patrol by Bingo Little
  • Army Wander by Endarron
  • QV Damage Units in QV area by name by mrjonathan0
  • Unit Heading Towards Unit by dwieeb
  • Damage units in Area by % (has been done before?) by Steak And Khan
  • Most Units In Area by Sir_Hans
  • QV Modify x by satansfall
  • Move from area to random area by Mister SCP
  • Set Unit Formation by aZeusDude2
  • Army Deploy Random Myth Unit by bgan
  • QV Randomize Series by Alexgd92
  • Convert all except protounit (or unit) by Joshonator
  • SET Ambient Colour/Sun Colour/Sun Specular/Terrain Ambient Fade Version by andrewv42
  • Damage units near army by AJER
  • QV count units in area with state by AuroraP
  • QV Grant random resources per stat by AuroraP
  • Condition: Random Timer by SwordOfValor
  • Army deploy in line by SwordOfValor
  • Condition: unit (type/in area) worked on other unit. by WinstonShnozwick
  • Gruoup selected by Guard of Olympus
  • Pick Unit by XxXItachiXxX
  • Modify Protounit All Percent by AuroraP
  • Random Forest by Bubble

  • Finished Requests

  • Damage Units near protounit for sneaky_squirrel & mrjonathan0
  • Move units from area to unit for Azur
  • Clear Chat History of Player & Chat Contains Anything for Lewonas
  • QV Change unit type by ID for Yeebaagooon
  • Move to QV Unit for Yeebaagoon
  • QV Modify Protounit for Xzyiothe
  • Player Kill GP Slot for Titanic Kraken
  • Move all player units for Anstar
  • Protounit Change Name for Dimir_Guildmage
  • Shop start/end with max for Mephiles
  • Diplomacy trigger for Yeebaagooon
  • Diplomacy both ways trigger for Yeebaagooon
  • Modify protounit trigger for Yeebaagooon
  • Convert trigger for Yeebaagooon
  • Make all units have no bonuses for Brighty
  • Conditional Army Units in Area for Sneaky_Squirrel
  • GROUP Select 2 for AuroraP
  • Send QV Color Chat for Alexgd92
  • Quest Var xModify for Alexgd92
  • QV Randomize 4 amounts for Alexgd92
  • QV Set Population Count for Beelzebub
  • Units in area of army for SwordOfValor
  • Damage units in area of army for SwordOfValor
  • AG with armies for SwordOfValor
  • Army deploy QV Count for Silicone Ruff Jr
  • Quest Var set rank for gunner1
  • Convert units in area to random player for Zorx
  • Units Change Name By Type for beerad
  • Army deploy where the units facing for SwordOfValor
  • Unit Heading Towards Unit for Noble
  • Convert Random Units In Selection for xEXOLARx
  • QV Set Units in Area (Center Army) for SwordOfValor
  • Move Units from Area (action) for SwordOfValor

  • Enjoy.
    Last updated: 03 september 2009

    If we knew what it was we were doing, it would not be called research, would it? - Einstein, A.
    Master XS - AoM Code Reference - Trigger Loader - Trigger Requests - Chess

    Wow, I never thought that I would actually know something before nottud did... it's actually not all that satisfying ~ Steak

    [This message has been edited by Mythic_Freak (edited 01-16-2010 @ 08:01 AM).]

    Replies:
    posted 01 February 2009 12:02 PM EDT (US)     1 / 2506  
    First post, in your face everyone!

    I'd like to request:

    Name - Damage Units near protounit
    Description - Basically damage anyone near the indicated protounit.

    The Gods have left us, therefore making the old world crumble and turn into ashes...

    But as the gods return, from the ashes of the old world, shall rise a more beautiful and powerful new world, and life will begin once more, if they hadn't closed...dang you ES.
    posted 01 February 2009 12:57 PM EDT (US)     2 / 2506  
    Let's start those stickify negotations again ^_^.


    Edit: TY!

    If we knew what it was we were doing, it would not be called research, would it? - Einstein, A.
    Master XS - AoM Code Reference - Trigger Loader - Trigger Requests - Chess

    Wow, I never thought that I would actually know something before nottud did... it's actually not all that satisfying ~ Steak

    [This message has been edited by Mythic_Freak (edited 02-01-2009 @ 03:40 PM).]

    posted 01 February 2009 03:59 PM EDT (US)     3 / 2506  
    Wow. They gave you sticky. Nice.

    Well. Best luck of on your thread Freak .
    -invent00r

    My Work: 1 2 3 4 5 6 7 8 9 10

    WIP: Master XS Battle Micro AI
    Paused: AI (%4.247)
    Os segredos são de quem os souber guardar.
    posted 01 February 2009 06:38 PM EDT (US)     4 / 2506  
    Name - Damage Units near protounit
    Description - Basically damage anyone near the indicated protounit.
    What kind of protounits do you need this for?
    Will it be things like projectiles or SFXs, or regular units like myths, buildings, or people?
    posted 01 February 2009 08:05 PM EDT (US)     5 / 2506  
    I'm working on the "Unit heading towards Unit" that Dwieeb requested in the old thread, but I've got a problem.

    Why is Math_atan(-1) returning infinity instead of 3/4*Pi?
    (well, I'm using Math_atan2, but at the points where angle should be 135 and 315, it gives me infinity and sets the hedaing to 0)

    Here is what I'm working with:
    <Effect name="Unit Heading Towards Unit TL">
    <Param name="SrcUnit" dispName="Source Unit" varType="unit">default</Param>
    <Param name="TrgUnit" dispName="Target Unit" varType="unit">default</Param>
    <Param name="Shift" dispName="Angle Offset" varType="string">0</Param>
    <Command>trUnitSelectClear();</Command>
    <Command>trUnitSelect("%SrcUnit%");</Command>
    <Command>trUnitSetHeading(%Shift%+Math_atan2(xsVectorGetX(kbGetBlockP osition("%TrgUnit%"))-xsVectorGetX(kbGetBlockPosition("%SrcUnit%")),xsVectorGetZ(kbGetBlockPosition("%TrgUnit%"))-xsVectorGetZ(kbGetBlockPosition("%SrcUnit%")))*180.0/PI);</Command>
    </Effect>

    Needs trigger loader.
    It works except for 2 angles: 135 degrees and 315 degrees.

    [This message has been edited by HailToTheOboe (edited 02-01-2009 @ 08:06 PM).]

    posted 01 February 2009 08:28 PM EDT (US)     6 / 2506  
    Name -move All player unit
    Description - Okay this trigger will move all the unit of a chosen player to one point. So first you choose the player then the area.
    posted 02 February 2009 02:54 AM EDT (US)     7 / 2506  
    Move units from area to unit does not work well at all.

    I have looked at the code in my typetest, but don't understand it at all.

    Is there a different version, or a different trigger, that does the exact same thing, but doesn't mess the units up?

    Ăžųŗ§ƒ¡ŗë
    --------------------
    Scenario Scriptor for Reverie World Studios
    -Forums-
    posted 02 February 2009 02:56 AM EDT (US)     8 / 2506  
    possible fo a trigger dump, or export to txt?

    ||||||||||||||||My Videos||||||||||||||||
    Roxas, his heart was human, yet because of his status as a being his fate was sealed since he was born. How many times must humanity judge others like that as well without giving them a fair chance?

    "It would be very irresponsible of me to give you my thoughts as you are clearly incapable of handling the ones you already have" ~some guy in OD
    posted 02 February 2009 06:41 AM EDT (US)     9 / 2506  
    Why is Math_atan(-1) returning infinity instead of 3/4*Pi?
    (well, I'm using Math_atan2, but at the points where angle should be 135 and 315, it gives me infinity and sets the hedaing to 0)
    Let's see if I can find an error, I won't be able to do much testing now though... -_-"

    @Azur:
    I can't seem to find that effect on my laptop. If you post the code I could check it.
    possible fo a trigger dump, or export to txt?
    I'll try to keep track of new completed triggers in my thread, so I can put them for download later. But I don't feel like searching all triggers in the previous topic. invent00r started collecting them too at first, but quickly gave up.

    If we knew what it was we were doing, it would not be called research, would it? - Einstein, A.
    Master XS - AoM Code Reference - Trigger Loader - Trigger Requests - Chess

    Wow, I never thought that I would actually know something before nottud did... it's actually not all that satisfying ~ Steak
    posted 02 February 2009 07:38 AM EDT (US)     10 / 2506  
    I didn't kept track because they were starting to look very inefficient, and poorly coded.

    But I did use all the ideas from everyone and assembled the Proactive trigger set. No trigger that I've created was just dumped away to TRT. I still have most of them. .
    -invent00r

    My Work: 1 2 3 4 5 6 7 8 9 10

    WIP: Master XS Battle Micro AI
    Paused: AI (%4.247)
    Os segredos são de quem os souber guardar.
    posted 02 February 2009 10:10 AM EDT (US)     11 / 2506  
    I was pulling my hair out (what's left) last night/this morning over this problem that seems it should be a no-brainer:

    I need to be able to create units (whether by trUnitCreate or trArmyDispatch) and be able to select them individually to perform individual tr commands on them.

    I tried this first:
    trUnitCreate and gave them a 'scenario name'
    trUnitSelectclear()
    trUnitSelect('scenario name')
    trUnitConvert(2) (just to test my select command)

    It created the unit with the requested protounit type, location and player number, but the unit didn't convert it so I'm guessing the trUnitSelect didn't work. I playtested, then saved the scenario and loaded it and under object info, the unit had the 'scenario name' I gave it when creating it, so I'm stuck on that idea.

    Next I thought I'd do it through the army system, so I tried creating (kbArmyCreate) an army first with a name like 'test1', then dispatch into that army 'test1' with no luck. I wasn't sure if an army was created at all, so I trChatSend'ed the kbArmyNumber (or whatever that command was that counts existing armies) and it came up zero even when I created armies in the editor (ghost and non-ghost), so I'm also completely baffled about army names. Running an army command on an editor-created army then looking at trigtemp.xs showed the name as "10,1" rather than the name I gave it in the editor, so this was another mystery that also sent me into mass frustration and confusement.

    Once again, I yield to your experience for help because I have already searched 'army' subjects in this forum and the googles but didn't find any technical help on the tr/kb commands related to armies.

    If I could choose, I guess I'd prefer the trUnitCreate method as I can give them names so that I can access them like an array: 'unit101', 'unit102', 'unit103', etc..

    Thanks again and big congratulations on the stickiness and breaking the 2500 post barrier. The work and answers given here have helped create more scenarios than anyone single designer has.


    In all your science of the mind, seeking blind through flesh and bone
    Find the blood inside this stone
    Well, I know I've never shown what I feel, I've always known
    I plan my vengeance on my own - and I was always alone
    posted 02 February 2009 10:26 AM EDT (US)     12 / 2506  
    @:Elrich
    What's really important about armies is the context player. Context player is complicated and differs between AI and triggers. In triggers, the default context is -1, thus it isn't set to any player, whereas on AI the default is the cMyID - which is the player ID in question. With this on your mind, you should see why it's necessary to always define the context player when using kb on triggers, and why it isn't needed on AI. Armies are operated according the context player, and only then, according to the Army ID.

    I can only assumed you didn't set the context player when you used kbArmyCreate, so since context was -1, it probably failed.

    You haven't looked onto my Proactive triggers now have you?
    Quoted from Elrich:
    Running an army command on an editor-created army then looking at trigtemp.xs showed the name as "10,1" rather than the name I gave it in the editor
    Well again.. Proactive triggers would appease your mind. I think it's the other way around - "1,10". The number 10 is the army ID, and the number 1 is the player ID.

    To access them you need some hacky method like this:
    xsSetContextPlayer(xsVectorGetX(vector(%SrcArmy%,0)));
    xsVectorGetY(vector(%SrcArmy%,0));
    Quoted from Elrich:
    Thanks again and big congratulations on the stickiness and breaking the 2500 post barrier. The work and answers given here have helped create more scenarios than anyone single designer has.
    Thank you.

    I think I've proven that this doesn't really need a sticky tho. .
    -invent00r

    My Work: 1 2 3 4 5 6 7 8 9 10

    WIP: Master XS Battle Micro AI
    Paused: AI (%4.247)
    Os segredos são de quem os souber guardar.
    posted 02 February 2009 10:33 AM EDT (US)     13 / 2506  
    Thanks again and big congratulations on the stickiness and breaking the 2500 post barrier. The work and answers given here have helped create more scenarios than anyone single designer has.
    Thanks
    If I could choose, I guess I'd prefer the trUnitCreate method as I can give them names so that I can access them like an array: 'unit101', 'unit102', 'unit103', etc..
    I've always used the army approach, since trUnitCreate() won't work online. But if the units you'll be making are less then 30 you could also iterate over the army units instead of over unit names.

    TBH I would've thought that your approach should work fine, but working with unit names has always been a messy business, so I avoided it as much as possible. Anyway, since you'll be generating the scenario names yourself, you could try to use intkbGetBlockID(string blockName) on the name to get its ID. If you can get that to work, you can proceed as usual with the unit ID (i.e. trUnitSelectByID()).

    About armies, ... invent00r beat me to it...

    If we knew what it was we were doing, it would not be called research, would it? - Einstein, A.
    Master XS - AoM Code Reference - Trigger Loader - Trigger Requests - Chess

    Wow, I never thought that I would actually know something before nottud did... it's actually not all that satisfying ~ Steak
    posted 02 February 2009 11:46 AM EDT (US)     14 / 2506  
    Emergency!

    Name - Conditional Army Distance to Army
    Description - A conditional version of Army Distance to Army, it is vital for my map.

    The Gods have left us, therefore making the old world crumble and turn into ashes...

    But as the gods return, from the ashes of the old world, shall rise a more beautiful and powerful new world, and life will begin once more, if they hadn't closed...dang you ES.
    posted 02 February 2009 11:50 AM EDT (US)     15 / 2506  
    Shame on me, I had looked briefly at the trigger loader and the proactive triggers for the first time recently but I think I wasn't looking for help with armies at the time and forgot how good of a resource they are for army work.

    I will give this a try tonight.

    on a side note, do you know if it is possible to list multiple constants on the case line of a switch statement? I tried a couple of existing styles, but they faild:

    case 1,2
    case 2 to 4

    not a big deal, I just lumped the group into default:, but I was just curious.

    again, thanks for your help.


    In all your science of the mind, seeking blind through flesh and bone
    Find the blood inside this stone
    Well, I know I've never shown what I feel, I've always known
    I plan my vengeance on my own - and I was always alone
    posted 02 February 2009 12:02 PM EDT (US)     16 / 2506  
    Here's the code:
    <Effect name="Move From Area To 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="player">0</Param>
    <Param name="Radius" dispName="Radius" VarType="float">10</Param>
    <Param name="Object" dispName="Target Unit" VarType="unit">default</Param>
    <Param name="AttackMove" dispName="Attack Move" varType="bool">false</Param>
    <Command>trQuestVarSet("fhweaohpgpagowhwa", xsGetContextPlayer());</Command>
    <Command>xsSetContextPlayer(0);</Command>
    <Command>kbLookAtAllUnitsOnMap();</Command>
    <Command>trUnitSelectClear();</Command>
    <Command loop="" loopParm="RefObject">trUnitSelect("%RefObject%");</Command>
    <Command>trUnitMoveFromArea(xsVectorGetX(kbUnitGetPosition(%Object%)), xsVectorGetY(kbUnitGetPosition(%Object%)), xsVectorGetZ(kbUnitGetPosition(%Object%)), -1, %AttackMove%, %PlayerID%, "%UnitType%", %Radius%);</Command>
    <Command>xsSetContextPlayer(trQuestVarGet("fhweaohpgpagowhwa"));</Command>
    </Effect>

    Ăžųŗ§ƒ¡ŗë
    --------------------
    Scenario Scriptor for Reverie World Studios
    -Forums-
    posted 02 February 2009 12:09 PM EDT (US)     17 / 2506  
    @:sneaky_squirrel
    Please look at thread resources before posting.

    Thank you.

    @:Elrich
    No.. I'm pretty sure you can only have one case per number.

    -invent00r

    My Work: 1 2 3 4 5 6 7 8 9 10

    WIP: Master XS Battle Micro AI
    Paused: AI (%4.247)
    Os segredos são de quem os souber guardar.
    posted 02 February 2009 12:29 PM EDT (US)     18 / 2506  
    @Oboe:
    Due to my lack of a working aom I quickly converted the TL code to java and did a quick test there:
    Math.atan(-1.0) = -0.7853981633974483 //calculated by java
    XS.atan(-1.0) = -0.7828982258896384 //used TL algorithm
    Difference = 0.0024999375078098574
    AoM can have problems with ints vs floats, so could you verify that Math_atan(-1.0) works instead of Math_atan(-1)?

    If that's the case we will include the casting automatically in the next update.

    If we knew what it was we were doing, it would not be called research, would it? - Einstein, A.
    Master XS - AoM Code Reference - Trigger Loader - Trigger Requests - Chess

    Wow, I never thought that I would actually know something before nottud did... it's actually not all that satisfying ~ Steak

    [This message has been edited by Mythic_Freak (edited 02-02-2009 @ 12:31 PM).]

    posted 02 February 2009 01:51 PM EDT (US)     19 / 2506  
    Mythic: I will do further testing to see, but the input for the atan2 function were the difference between elements in vectors, which I believe are always floats, and it worked for all angles except for two narrow ranges at around 135 and 315.

    Elrich: I don't know how far you are into developping that trigger of yours, but I've been working on something similar:
    <Effect name="Army Deploy ID array">
    <Param name="SrcArmy" dispName="Army" varType="group">default</Param>
    <Param name="ProtoName" dispName="ProtoName" varType="protounit">Villager</Param>
    <Param name="Object" dispName="Target Unit" varType="unit">default</Param>
    <Param name="Array" dispName="Array name" varType="string">Array 1</Param>
    <Param name="nn" dispName=" " varType="string">Deploys army and stores unit ID in a quest array</Param>
    <Command>for(uuiidd=0;>1) {}</Command>
    <Command>trQuestVarSet("fhweaohpgpagowhwa", xsGetContextPlayer());</Command>
    <Command>xsSetContextPlayer(0);</Command>
    <Command>kbLookAtAllUnitsOnMap();</Command>
    <Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, xsVectorGetX(kbGetBlockPosition(""+1*%Object%)),xsVectorGetY(kbGetBlockPosition(""+1*%Object%)),xsVectorGetZ(kbGetBlockPosition(""+1*%Object%)), 0, true);</Command>
    <Command>xsSetContextPlayer(xsVectorGetX(vector(%SrcArmy%,-1)));</Command>
    <Command>kbLookAtAllUnitsOnMap();</Command>
    <Command>uuiidd=kbArmyGetUnitID(xsVectorGetY(vector(%SrcArmy%,-1)),0);</Command>
    <Command>xsArraySetByName("%Array%", 1.0*(uuiidd)/1000.0, xsArrayGetSizeXByName("%Array%"), 1);</Command>
    <Command>xsArrayResize(xsArrayGetID("%Array%"), xsArrayGetSizeXByName("%Array%")+1, xsArrayGetSizeYByName("%Array%"));</Command>
    <Command>xsSetContextPlayer(trQuestVarGet("fhweaohpgpagowhwa"));</Command>
    </Effect>


    <Effect name ="qaSearch 1D Array Start">
    <Param name="Array" dispName="Array Name" varType="string">Array 1</Param>
    <Param name="nn" dispName=" " varType="string">Include end search effect</Param>
    <Command>int searchID=0;</Command>
    <Command>int itertracker=0;</Command>
    <Command><![CDATA[for(i = 1; < xsArrayGetSizeXByName("%Array%")) {]]></Command>
    <Command>while(xsArrayGetByName("%Array%",i,1)==-1){</Command>
    <Command>xsArrayDelete(xsArrayGetID("%Array%"), i);</Command>
    <Command>}</Command>
    <Command>searchID = 0.5+1.0*xsArrayGetByName("%Array%",i,1)*1000.0;</Command>
    <Command>itertracker = i;</Command>
    </Effect>
    <Effect name ="qaSearch 1D Array End">
    <Command>}</Command>
    </Effect>

    <Effect name ="qKill">
    <Param name="Destroy" dispName="No Corpse" varType="bool">false</Param>
    <Command>trUnitSelectClear();</Command>
    <Command>trUnitSelectByID(searchID);</Command>
    <Command>trUnitDelete(Þstroy%);</Command>
    </Effect>

    <Effect name ="qClear value from array">
    <Param name="Array" dispName="Array name" varType="string">Array 1</Param>
    <Command>xsArraySetByName("%Array%", -1, itertracker,1);</Command>
    </Effect>


    The first effect "Army deploy ID Array" deploys a unit and stores its ID into an array.
    The other effects allow you to search through an array and perform actions on that unit, and you can insert other effects into the middle that use "searchID" as the Unit ID.

    I stuck a q in front for my own use, but maybe other letters would be better so they don't stack up above the QV triggers.


    Sneaky: Here is conditional Army distance to Army. I took "Army Distance to Army" condition from invent00r's proactive triggers and turned it into an effect.
     <Effect name="Conditional Army Distance To Army">
    <Param name="ArmyS" dispName="Army Source" VarType="group">0,0</Param>
    <Param name="ArmyT" dispName="Army Target" VarType="group">0,0</Param>
    <Param name="Op" dispName="$$22297$$Operator" VarType="operator">==</Param>
    <Param name="Dist" dispName="$$22298$$Distance" VarType="float">0</Param>
    <Command>for(result=0;>1){}for(temp=0;>1){}</Command>
    <Command>for(SPid=0; >1){} SPid = xsVectorGetX(vector(%ArmyS%,0));</Command>
    <Command>for(TPid=0; >1){} TPid = xsVectorGetX(vector(%ArmyT%,0));</Command>
    <Command>for(SAid=0; >1){} SAid = xsVectorGetY(vector(%ArmyS%,0));</Command>
    <Command>for(TAid=0; >1){} TAid = xsVectorGetY(vector(%ArmyT%,0));</Command>
    <Command>for(TS=0;>1){} xsSetContextPlayer(SPid); TS = kbArmyGetNumberUnits(SAid);</Command>
    <Command>for(TT=0;>1){} xsSetContextPlayer(TPid); TT = kbArmyGetNumberUnits(TAid);</Command>
    <Command>trUnitSelectClear();</Command>
    <Command>for(i=TT-1;>-1){</Command>
    <Command>trUnitSelectByID(kbArmyGetUnitID(TAid, i));}</Command>
    <Command>xsSetContextPlayer(SPid);temp = trUnitDistanceToPoint(xsVectorGetX(kbArmyGetLocation(SAid)),0, xsVectorGetZ(kbArmyGetLocation(SAid)));</Command>
    <Command>trUnitSelectClear();</Command>
    <Command>for(ii=TS-1;>-1){</Command>
    <Command>trUnitSelectByID(kbArmyGetUnitID(SAid, ii));}</Command>
    <Command>xsSetContextPlayer(TPid);result = trUnitDistanceToPoint(xsVectorGetX(kbArmyGetLocation(TAid)),0, xsVectorGetZ(kbArmyGetLocation(TAid)));</Command>
    <Command>if(result>temp) result = temp;</Command>
    <Command>if(result %Op% %Dist%) {</Command>
    </Effect>

    [This message has been edited by HailToTheOboe (edited 02-02-2009 @ 01:54 PM).]

    posted 02 February 2009 03:10 PM EDT (US)     20 / 2506  
    Name - Name Unit.
    Description - I need a trigger that Permantely changes the name of a specfic unit for a game. So if I made it spawn it would spawn with the given name or when I create it in some sort of barracks it spawns with the name. Help would be aprreciated.

    [This message has been edited by healyworks (edited 02-02-2009 @ 03:13 PM).]

    posted 02 February 2009 03:33 PM EDT (US)     21 / 2506  
    AoM can have problems with ints vs floats, so could you verify that Math_atan(-1.0) works instead of Math_atan(-1)?
    I did further verification, and found that Math_atan(-1.0) works, but it doesn't work for anything less than -1.0 and greater than -2.0

    Here it is straight from aom itself
    posted 02 February 2009 03:42 PM EDT (US)     22 / 2506  
    Thanks, Hail.

    I have been adding and adding features to my halo trigger as I find new ideas on how to use it in my boss battle (yes, I'm STILL working on it when I get time here and there). In the first version I created, you preselect the units that you want to animate and now I am splitting that off into a second version where it will create the units for you.


    @Healy: you are going to have to let us know which command you are using to spawn this unit. What we could do is combine that command with the Name unit command which basically will mean you use the same spawning command that will have a NAME parameter so you can get spawning and naming in one effect.


    In all your science of the mind, seeking blind through flesh and bone
    Find the blood inside this stone
    Well, I know I've never shown what I feel, I've always known
    I plan my vengeance on my own - and I was always alone
    posted 02 February 2009 04:54 PM EDT (US)     23 / 2506  
    I have been adding and adding features to my halo trigger
    Speaking of the halo trigger, I used my own version of it in Let Heaven and Nature Sing, and there's something you should be careful of: I don't know if yours is set up differently than mine, but I tended to use it looped with either "Always" condition or a very quick "Timer MS Accurate," and it turns out that this causes it to behave very differently from one computer to the next, because the number of times it could check the condition per second varied. Just a heads up.

    Also concerning those triggers, is it okay with you if I were to release my versions? The idea was yours, and I just stole the idea and did the easy part (the coding) for myself, and I've received some requests for the effects after I used them in Let Heaven and Nature Sing.
    I also believe that yours are likely to be much more in depth, I just made one for moving along a straight line, and one for moving in a circle, and I used combinations of those two to get other shapes I wanted.
    posted 02 February 2009 06:21 PM EDT (US)     24 / 2506  
    @:sneaky_squirrel
    Please look at thread resources before posting.
    I did, but thanks for reminding me.

    Thanks Oboe ;p.

    The Gods have left us, therefore making the old world crumble and turn into ashes...

    But as the gods return, from the ashes of the old world, shall rise a more beautiful and powerful new world, and life will begin once more, if they hadn't closed...dang you ES.

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

    posted 03 February 2009 05:46 AM EDT (US)     25 / 2506  
    The strange thing about unit create and army deploy online is that unit create only works for computer players and army deploy only works for nature and humans. I think this is weird!

    Could anyone give a reason why?

    (I know why army deploy doesn't work for comps - armies don't works for context player that is not human or nature)

    Actually thinking about it is there a way to set the the army context player for armies that already exist?


    Another possible trigger request - is there a way to set players "undefeated"? I think that online nature is automatically set to defeated because nature acts like a defeated player as move triggers do not work and yet invoke does work. Just the same as defeated players. (Yes invoke works for defeated players online which I find weird but useful!)

    The boy with the mad imagination
    Prepare for the ultimate duel!
    Learn to use all my triggers and what you can do with them. Visit here.
    Find out and download the transform trigger here.
    Play some minigames I have created outside AOM including some 3D games here.
    « Previous Page  1 2 3 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 60 ··· 70 ··· 80 ··· 90 ··· 100 ··· 101  Next Page »
    Age of Mythology Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
    Top
    You must be logged in to post messages.
    Please login or register
    Hop to:    
    Age of Mythology Heaven | HeavenGames