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

Scenario Design
Moderated by Yeebaagooon, TAG, nottud

Hop to:    
Welcome! You are not logged in. Please Login or Register.1680 replies, Sticky
Age of Mythology Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
Bottom
Topic Subject:Have a Trigger Request? Post it here!
« Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 59 60 61 62 63 ··· 68  Next Page »
Elrich
Hero
posted 23 July 2010 11:41 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

    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
    AuthorReplies:
    nikakostya
    Mortal
    posted 10 April 2016 03:40 PM EDT (US)     1501 / 1680       
    Hi All, can you please make trigger code like this?
    < Effect name="Enemy unit killed - Fire event">
    < Param name="PlayerID" dispName="$$22534$$Fake Player" VarType="player">0
    < Param name="StatID" dispName="$$23856$$Stat Type" VarType="kbstat">0
    < Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1
    < Command>trGetStatValue(%PlayerID%, %StatID%));
    < Command>trEventFire(%EventID%);
    < /Effect>

    Do you know what i mean? I'm working on an adventure scenario and i want my warrior to send chat and play sound, every time he kills an enemy.
    I can make it with Stat Value, but it works badly (Only once or non-stop if it's looped). How to reset Stat Value again, after killing an enemy? I hope you can help me. sorry for my bad English. If you have any ideas, please help me.

    [This message has been edited by nikakostya (edited 04-10-2016 @ 03:43 PM).]

    Yeebaagooon
    EXCO Emeritus
    posted 10 April 2016 04:05 PM EDT (US)     1502 / 1680       
    You need the QV stat value condition and effect.

    Looped
    Condition: When QVKills < Enemy units killed
    Effect: Set QVKills to Enemy units killed + chat/sound

    ______________________________________ Yeebaagooon ______________________________________
    ____________________ AoMH Seraph ____________________
    "You can't trust yeebaagooon to lead a rebelion, He would send everyone to steal mirrors so he could bask in his own brilliance." - Out Reach
    "Yeebaagooon had never seen a more handsome man in all his life. He couldn't control himself, He needed to act. Gripping the mirror in his strong arms he kissed the figure before him..." - Out Reach
    AoMH: Unfinished Scenarios|Singleplayer: Codename Ripto|Multiplayer: Minigames Z|CSC 7
    Ex Seraphs Dictator, Spore Heaven Seraph
    nikakostya
    Mortal
    posted 10 April 2016 06:15 PM EDT (US)     1503 / 1680       

    [This message has been edited by Captain Obvious (edited 05-24-2016 @ 08:18 AM).]

    TAG
    That AoM Guy
    (id: aom expert)
    posted 23 May 2016 04:55 PM EDT (US)     1504 / 1680       
    Modify Tech Cost

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    Warrior NG
    Mortal
    posted 28 June 2016 02:57 PM EDT (US)     1505 / 1680       
    I need help fixing this trigger I made. It is meant to show an icon in message, but no icon is shown, and I am sure the icon I insert in the array is correctly written.


    <?xml version = "1.0"?>

    <trigger version="2">
    <Effects>

    <Effect name="Send Iconed Spoofed Chat To Player">
    <Param name="PlayerID" dispName="From Player" VarType="player">1</Param>
    <Param name="ToPlayerID" dispName="To Player" VarType="player">1</Param>
    <Param name="Icon" dispName="Icon Name" VarType="stringid">default</Param>
    <Param name="Message" dispName="Message" VarType="stringid">default</Param>
    <Command><![CDATA[trChatSendSpoofedToPlayer(%PlayerID%, %ToPlayerID%, "<icon=(%Icon%)> %Message%");]]></Command>
    </Effect>

    </Effects>
    </trigger>
    Zenophobia
    Irrational Fear
    posted 28 June 2016 11:25 PM EDT (US)     1506 / 1680       
    Icons have the format:

    <icon=(20)(icons/infantry g hoplite icon 64)>

    You're missing the icon width parameter.

    [This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
    Moses7D
    Mortal
    posted 28 September 2016 06:44 PM EDT (US)     1507 / 1680       
    Where can I find the destroy units in area effect?
    TAG
    That AoM Guy
    (id: aom expert)
    posted 29 September 2016 12:02 PM EDT (US)     1508 / 1680       
    http://aom.heavengames.com/downloads/showfile.php?fileid=7243

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    Moses7D
    Mortal
    posted 29 September 2016 01:10 PM EDT (US)     1509 / 1680       
    Thank you very much.
    Izalith
    Mortal
    (id: Lilitu)
    posted 22 November 2016 11:20 PM EDT (US)     1510 / 1680       
    Name - Fire Event String
    Description - Good old "Fire Event"-Effect but like the "Disable Trigger"-Effect using a String-Input for the Parameter instead of this horrible Dropdown-Menu showing all Triggers, Deactivateing the ones you choose and growing insanely large on bigger projects. (Takes some Button-Smashing and scrolling to find the triggers you need, since they are ordered by creation-order, not alphabetically or something.. newest is last) Also just as "Disable Trigger" you could already write in Triggers to fire before creating them, allowing for a more efficient workflow.
    Example - Fire Event String > Input Event String: Trigger_223 activates Triggers with that name. On default it should not break, or maybe you'll have to include a "Always-SetIdleProcessing"-Trigger called "default" (or something) so that will be fired and do nothing. Also fine.

    It would be nice to have not only one string, but copy it six times so you could fire up to 6 triggers with this one event. (Which is maximum for the user interface in the editor)


    I tried to do that myself, but the Parameter Type is not compatible with String and I dont know how to get a Triggers ID from the String, so that would be all there is to it. >_>

    [This message has been edited by Lilitu (edited 11-22-2016 @ 11:22 PM).]

    DamianEnriquez
    Mortal
    posted 16 December 2016 03:07 AM EDT (US)     1511 / 1680       
    How to get Name ID of Army Unit
    <Param name="Object" dispName="Unit" varType="unit">-1</Param>
    trQuestVarSet("US", %Object%);

    ID: "+kbGetBlockID(""+1*trQuestVarGet("US"))+"
    Name: "+1*trQuestVarGet("US")+"

    trArmyDispatch("1, 1", "Archer Atlantean", 1, 10, 0, 10, 0, true);
    xsSetContextPlayer(1);
    int n = kbArmyGetUnitID(1, 0);
    trChatSend(0, "ID: "+n+"");

    trUnitSelectClear();trUnitSelectByID( n );
    trChatSend(0, "Name: "+trGetSelectedUnitID(0)+"");

    i found kbUnitNameID in
    Advanced Triggers Set for AOM by pftq

    trChatSend(0, "Name: "+kbUnitNameID(kbArmyGetUnitID(1, 0))+"");

    Should work but causes a Trigger Lock, I do not know if the function does not work anymore or wrote something wrong

    i want to add Army Unit to database but Unit ID not work i need Name ID
    Add to database improved
    yStart search database improved
    i dont want to use yStart search all units with reboot system

    Steam | Facebook | YouTube | Discord | GameRanger
    Tower Defense new map
    Nickonhawk
    The Narrator
    posted 23 January 2017 05:48 PM EDT (US)     1512 / 1680       
    I'm a bit tired so I might be asking something very stupid.

    Name - Conditional Army is protounit
    Description - Checks if the army is the specified protounit

    If you can't do this, then even something that tells me the type (unit\building) would be sufficient.

    Youtube Channel
    Skyrim... the greatest game ever... without considering Age of Mythology, of course!
    Ctrl...Alt...Q...
    and Brisingr-know these three things and your task here is accomplished...
    Lewonas
    Mortal
    posted 24 January 2017 04:34 AM EDT (US)     1513 / 1680       
    <Condition name="Army is Protounit">
    <Param name="SrcArmy" dispName="$$22348$$Army" varType="group">0,0</Param>
    <Param name="ArmyName" dispName="Army name" varType="string"></Param>
    <Param name="ProtoName" dispName="Protounit" VarType="protounit">Unit</Param>
    <Command>for(playerID=0;>1){}</Command>
    <Command>for(armyID=0;>1){}</Command>
    <Command>armyID=kbArmyGetID("%ArmyName%");</Command>
    <Command>trArmySelect("%SrcArmy%");</Command>
    <Command>for(p=12;>=0){if(trUnitIsOwnedBy(p)){playerID=p;break;}}</Command>
    <Command>xsSetContextPlayer(playerID);</Command>
    <Expression>kbGetUnitBaseTypeID(kbArmyGetUnitID(armyID, 0)) == kbGetProtoUnitID("%ProtoName%")</Expression>
    </Condition>

    <Effect name="Conditional Army is Protounit">
    <Param name="SrcArmy" dispName="$$22348$$Army" varType="group">0,0</Param>
    <Param name="ArmyName" dispName="Army name" varType="string"></Param>
    <Param name="ProtoName" dispName="Protounit" VarType="protounit">Unit</Param>
    <Command>for(playerID=0;>1){}</Command>
    <Command>for(armyID=0;>1){}</Command>
    <Command>armyID=kbArmyGetID("%ArmyName%");</Command>
    <Command>trArmySelect("%SrcArmy%");</Command>
    <Command>for(p=12;>=0){if(trUnitIsOwnedBy(p)){playerID=p;break;}}</Command>
    <Command>xsSetContextPlayer(playerID);</Command>
    <Command>if(kbGetUnitBaseTypeID(kbArmyGetUnitID(armyID, 0)) == kbGetProtoUnitID("%ProtoName%")) {</Command>
    </Effect>

    I created these with the assumption that the army holds exactly 1 unit. You need to copy the army's name in the second parameter (case-sensitive) because it's needed to retrieve the army id.

    What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey.
    Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers.
    Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%]
    Nickonhawk
    The Narrator
    posted 24 January 2017 05:22 AM EDT (US)     1514 / 1680       
    Thank you so much man!

    Youtube Channel
    Skyrim... the greatest game ever... without considering Age of Mythology, of course!
    Ctrl...Alt...Q...
    and Brisingr-know these three things and your task here is accomplished...
    TAG
    That AoM Guy
    (id: aom expert)
    posted 05 February 2017 10:58 PM EDT (US)     1515 / 1680       
    Name - Army is Type
    Description - Detects what unit the army is

    Army in Area can be kind of similar for me but it seems to be broken.

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    eine_Gurkensalat
    Mortal
    (id: eine_gurkensalad)
    posted 07 April 2017 05:28 AM EDT (US)     1516 / 1680       
    Name: v condition unit stat
    description: It has to work with v triggers (target protounit query, by HailToTheOboe). It target just units that verify the specified stat.

    exemple: among the targeted units, choose only those that have less than 0.81 of crush armor.
    If possible, use all the stats from "modify protounit" and use connector (<, >, =, <=, >=).
    sorry for my bad english, I'm french

    [This message has been edited by eine_gurkensalad (edited 04-07-2017 @ 05:29 AM).]

    Zenophobia
    Irrational Fear
    posted 08 April 2017 11:58 AM EDT (US)     1517 / 1680       
    what you've requested is not possible.

    [This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
    eine_Gurkensalat
    Mortal
    (id: eine_gurkensalad)
    posted 08 April 2017 06:49 PM EDT (US)     1518 / 1680       
    it's strange, because we already have "v condition unit current hp" that works very well... Why can't we do this condition on other stats than hp?

    The reason I wrote this request is that I want to be able to target only myth units (they all have 80% crush armor), so if you know a way to do it I will be happy
    TAG
    That AoM Guy
    (id: aom expert)
    posted 08 April 2017 07:47 PM EDT (US)     1519 / 1680       
    Army Destroy destroys the army in single player (disappears), but kills it in multiplayer.

    Anyone help?

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    Nickonhawk
    The Narrator
    posted 09 April 2017 03:20 AM EDT (US)     1520 / 1680       
    eine_gurkensalad: I think v Condition Unit Type and v Condition OR is the way to go.

    That AoM Guy: Have you tried changing into something with very short lifespan?

    Youtube Channel
    Skyrim... the greatest game ever... without considering Age of Mythology, of course!
    Ctrl...Alt...Q...
    and Brisingr-know these three things and your task here is accomplished...
    eine_Gurkensalat
    Mortal
    (id: eine_gurkensalad)
    posted 09 April 2017 07:18 AM EDT (US)     1521 / 1680       
    If we do that, we have to make one condition and one condition or for each myth units of 5 civilisations... and the processor have to verify all this condition each time !
    I think it's not the best solution, but maybe I'm not right and it doesn't take more processing.
    I've heard about trigger launcher, and maybe I will be able to put instead of id unit "MythUnit" or something similar.

    [This message has been edited by eine_gurkensalad (edited 04-09-2017 @ 07:55 AM).]

    TAG
    That AoM Guy
    (id: aom expert)
    posted 09 April 2017 06:45 PM EDT (US)     1522 / 1680       
    Thanks Nickon!

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    Izalith
    Mortal
    (id: Lilitu)
    posted 18 April 2017 07:24 AM EDT (US)     1523 / 1680       
    Can I save a Location as QVAR or something and call it when deploying an Army?

    trQuestVarSet is kinda Float only, not varType="area", while area apparently is three floats.


    Also saving Units as QVARs to select in later effects would come in handy, though that might be possible using armies already.


    Aand it should be Multiplayer-Not-OOS-sensitive. >_>

    Azarath Metrion Zinthos

    Steam: Order of Azarath
    Twitch: twitch.tv/orderofazarath
    Discord: Azarath @ https://discord.gg/3ENKJeb
    scragins
    Heretic of December
    posted 18 April 2017 09:09 AM EDT (US)     1524 / 1680       
    Yes you can. Save the x component as one QV and the z as another (it might be x and y, I forget). I think you can just set the y coordinate (height) to 0 as it will use the height of the land. If you want an example of how this works I think some V and Y triggers might do this. From memory there is some code like "xsVectorGetX/Y/Z" that is quite useful when storing the X coordinate as a QV.

    I think it should be possible to save a unit ID as a QV and call it later or almost any other stat.
    eine_Gurkensalat
    Mortal
    (id: eine_gurkensalad)
    posted 26 April 2017 08:12 AM EDT (US)     1525 / 1680       
    Condition: Name- "Unit selected from player"
    description- this is a condition that active the effect if the designed player have selected a unit (among all) from a designed player.

    I hope it's clear
    « Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 59 60 61 62 63 ··· 68  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Mythology Heaven | HeavenGames