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

Scenario Design
Moderated by Yeebaagooon, TAG

Hop to:    
Welcome! You are not logged in. Please Login or Register.1659 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 ··· 48 49 50 51 52 ··· 60 ··· 67  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:
    Zenophobia
    Irrational Fear
    posted 17 April 2014 04:06 PM EDT (US)     1226 / 1659       
    x^2 + z^2 = radius^2.

    Couldn't something like this be used to deploy things in a circle?

    z = +- sqrt(radius^2-x^2).

    With that, you could deploy things in relation to their x-position in relation to a center unit. I'm not too familiar with actual trigger coding, but if I wanted to deploy things in a circle without the Teleport in Circle triggers, then I would use this method with normal vector triggers.

    [This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
    Yeebaagooon
    EXCO Emeritus
    posted 17 April 2014 04:27 PM EDT (US)     1227 / 1659       
    Sorry nottud I have no idea how to use the y triggers. Did look at your release thread and try but didn't work.

    y database add
    y is protounit outpost
    y change unit to roc
    y inverse garrison
    yzend
    y database end

    ______________________________________ Yeebaagooon ______________________________________
    ____________________ AoMH Seraph ____________________
    "I saw the picture and became immediately worried about Yeeb seducing and buying out Zen" - Shanks13
    "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 5.0|Multiplayer: Minigames X 4.7|CSC 7
    Ex Seraphs Dictator, Spore Heaven Seraph
    nottud
    Mortal
    posted 17 April 2014 05:11 PM EDT (US)     1228 / 1659       
    @Yeebaagooon: Right idea except your first and last effect is wrong.

    Use yStart search all units with reboot system as the first trigger. Leave default settings but set a blank area of map to deploy and set the highest unit name to the last unit you placed on the map.

    Last trigger should be ySearch end with reboot system.

    Your other triggers are correct. Also ensure they are in a trigger running on loop constantly.


    yDatabase triggers are for when you added a unit to the database from a previous search.

    Also don't forget to change the roc after garrisoning to kick out the unit.

    [This message has been edited by nottud (edited 04-17-2014 @ 05:15 PM).]

    Ghostoo
    Mortal
    posted 17 April 2014 07:27 PM EDT (US)     1229 / 1659       
    I tried making a V-trigger version of my most recent circular deployment and have ran into a roadblock.

    I get trigger-lock when i replace the kbGetBlockPosition("%Object%") with kbUnitGetPosition(UnitID)

    I literally did not change a single thing other than that instance, yet i get trigger lock. I don't do any de-selecting. I know how to use v-triggers properly.

    Syntax is correct, i even did a copy-paste from the targetprotounit.xml to make sure i wasn't spelling it wrong.
    Those two places were the only instance i used the %Object% param so it's not lost in there somewhere.

    Thoughts?


    Well this is interesting. The whole reason we use "for (var=0;>1){}" to make vars actually fails in certain cases. If the trigger is open-ended, such as v-triggers or conditional-effects, then the varable established with the for(var=0;>1) doesn't get forgotten between effects.
    The main trigger for v-triggers establishes a bunch of vars, one of them being "j" which i also used.

    Hopefully I'm not just late to the party and everybody didn't already know this Be careful!

    [This message has been edited by Ghostoo (edited 04-17-2014 @ 09:08 PM).]

    Milkman Matty
    Mortal
    (id: Khan And Steak)
    posted 17 April 2014 11:00 PM EDT (US)     1230 / 1659       
    the varable established with the for(var=0;>1) doesn't get forgotten between effects.
    This is correct. It does however get forgotten between triggers (xs _rules) unlike the normal variable initialization. It's exactly the same precautions you have to take with using QV's, just less likely to cause an issue since the for-loop vars only have a short lifetime/scope-life there is less chance that the other effects within the same trigger will somehow mess it up.

    Either way it's very manageable..

    /**
    * Should be noted you can set the initial value to be anything (example provided below).
    */
    for(herpusDeeDerpus=0;>1) {}
    for(herpusDeeDerpus = xsGetTime(); < -1) {} // This will set it to the current time.

    /**
    * This will force this bad boy to be a certain value.
    * However if the variable has not bee initialized via a for(){} then bad times ahead (errors/trigger bug/CTD).
    */
    herpusDeeDerpus = 0;

    <||=================================||>
    Proud Member of Forgotten Empires
    96Reviews KaS Dota2 Halo 5 Reach
    { "Work until your idols become your rivals" }
    ༼ つ ◕_◕ ༽つ trGetUnitScenarioName(); ༼ つ ◕_◕ ༽つ

    [This message has been edited by Milkman Matty (edited 04-23-2014 @ 05:54 AM).]

    Ghostoo
    Mortal
    posted 18 April 2014 01:03 AM EDT (US)     1231 / 1659       
    I just had the understanding that we used for(var=0;>1){} instead of simply int var=0; because it was forgotten between effects while the int var=0 was remembered throughout entire triggers.

    Ah well, though. I'll start using more manageable var names than i,j etc..
    Milkman Matty
    Mortal
    (id: Khan And Steak)
    posted 23 April 2014 05:53 AM EDT (US)     1232 / 1659       
    Just set them to 0 before using them? They can't be used outside the effect that their bound to anyway. So its not like something bad will happen if you change what they are assigned to. I'd just keep using a,b,c,i,j,k,x etc. There's no downside as far as I can see.

    Also I was wrong before, the for loop initialization will change the value regardless ~ Milky

    <||=================================||>
    Proud Member of Forgotten Empires
    96Reviews KaS Dota2 Halo 5 Reach
    { "Work until your idols become your rivals" }
    ༼ つ ◕_◕ ༽つ trGetUnitScenarioName(); ༼ つ ◕_◕ ༽つ

    [This message has been edited by Milkman Matty (edited 04-23-2014 @ 05:56 AM).]

    Ghostoo
    Mortal
    posted 23 April 2014 11:21 AM EDT (US)     1233 / 1659       
    @Milkman Matty

    Yes, that's what i thought. However, since the v protounit target query search trigger is open-ending (meaning it has an unclosed { bracket that must need to be closed in another trigger, much like conditional effects), that means they ARE used outside their effect. I was getting trigger-lock because i was trying to re-define a variable (j) that already existed; it was defined in the original v target protounit query search. When i changed the variable to k, my trigger worked fine. That's particularly why i posted, so it's warned that it can be kept outside of the effect.

    Be careful!
    Milkman Matty
    Mortal
    (id: Khan And Steak)
    posted 23 April 2014 12:07 PM EDT (US)     1234 / 1659       
    Hmm, yes that's a good point I hadn't thought of v triggers since it's almost always more efficient and quicker to use your own queries.

    Obviously for those that don't know how to write their own the v triggers are amazing; and for those that do, the v triggers are good examples on how to do various things.

    The reason for the inefficiency is because the v triggers have to take into account all the possible things that can be done with queries, whereas your own ones can just do what you need them to do.

    I suppose though the problem that you have outlined spans all open ended effects, which is a bad time . Nice find ~ Milky

    <||=================================||>
    Proud Member of Forgotten Empires
    96Reviews KaS Dota2 Halo 5 Reach
    { "Work until your idols become your rivals" }
    ༼ つ ◕_◕ ༽つ trGetUnitScenarioName(); ༼ つ ◕_◕ ༽つ

    [This message has been edited by Milkman Matty (edited 04-23-2014 @ 12:08 PM).]

    nottud
    Mortal
    posted 23 April 2014 05:51 PM EDT (US)     1235 / 1659       
    It is a bit of a problem because they cause conflicts - it is not something I have thought of till more recently. When the extended version comes out I might redo a few of my triggers to clean them up before releasing - especially for such conflicts. You want to give names that don't clash with other triggers - one way is to use user specified parameters to form part of the variable names. Also use namers that other people don't use.
    Ghostoo
    Mortal
    posted 23 April 2014 06:51 PM EDT (US)     1236 / 1659       
    You can use parameters to declare regular variables? I thought they could only be used for qv's
    Milkman Matty
    Mortal
    (id: Khan And Steak)
    posted 23 April 2014 11:57 PM EDT (US)     1237 / 1659       
    Yeah it's weird that they aren't able to be used in any var declaration because they are converted to a binary representation in the transition from XML to XS.

    You'd think it's exactly the same as using the bool param in an if statement. Although apparently this isn't the case.

    Example Trigger Declaration:


    <Effect name="VX AAA TEST">
    <Param name="out" dispName="Debug Output" varType="bool">true</Param>
    <Command>for( x_%out% = 0; x_%out% > 1){}</Command>
    <Command>if( %out% ) {</Command>
    <Command><![CDATA[trChatSendSpoofed(0, "<color=0.6,0.3,0.4>Debugging output shown: "+x_%out%);]]></Command>
    <Command>} else {</Command>
    <Command><![CDATA[trChatSendSpoofed(0, "<color=0.6,0.3,0.4>Debugging output not shown: "+x_%out%);]]></Command>
    <Command>}</Command>
    </Effect>

    trigtemp.xs code:


    for( x_true = 0; x_true > 1){}
    if( true ) {
    trChatSendSpoofed(0, "<color=0.6,0.3,0.4>Debugging output shown: "+x_true);
    } else {
    trChatSendSpoofed(0, "<color=0.6,0.3,0.4>Debugging output not shown: "+x_true);
    }


    So as you can see it should work, there is nothing wrong with it syntactically. Buuut this produces a trigger bug nevertheless; if the var was a QV I doubt it would (I've never tried with concatenating bools, only ints) ~ Milky

    <||=================================||>
    Proud Member of Forgotten Empires
    96Reviews KaS Dota2 Halo 5 Reach
    { "Work until your idols become your rivals" }
    ༼ つ ◕_◕ ༽つ trGetUnitScenarioName(); ༼ つ ◕_◕ ༽つ

    [This message has been edited by Milkman Matty (edited 04-23-2014 @ 11:58 PM).]

    Milkman Matty
    Mortal
    (id: Khan And Steak)
    posted 24 April 2014 05:56 AM EDT (US)     1238 / 1659       
    It looks like it works fine for integers though. Take a look at some on invent00rs works:


    <Condition name="XS And">
    <Param name="a" dispName="Condition Number" VarType="long">0</Param>
    <Param name="b" dispName="Condition Number" VarType="long">1</Param>
    <Command>for(andi%a%i%b%=0;>1){}for(andii%a%i%b%=0;>1){}</Command>
    <Command>andi%a%i%b% = bVar%a%; bVar%a% = true;</Command>
    <Command>andii%a%i%b% = bVar%b%; bVar%b% = true;</Command>
    <Expression>((andi%a%i%b%==0) || (andii%a%i%b%==0)) != true</Expression>
    </Condition>

    <Condition name="XS Not">
    <Param name="a" dispName="Condition Number" VarType="long">0</Param>
    <Command>for(noti%a%=0;>1){}</Command>
    <Command>noti%a% = bVar%a%; bVar%a% = true;</Command>
    <Expression>(noti%a%==0)</Expression>
    </Condition>

    <Condition name="XS Or">
    <Param name="a" dispName="Condition Number" VarType="long">0</Param>
    <Param name="b" dispName="Condition Number" VarType="long">1</Param>
    <Command>for(ori%a%i%b%=0;>1){}for(orii%a%i%b%=0;>1){}</Command>
    <Command>ori%a%i%b% = bVar%a%; bVar%a% = true;</Command>
    <Command>orii%a%i%b% = bVar%b%; bVar%b% = true;</Command>
    <Expression>((ori%a%i%b%==1)||(orii%a%i%b%==1))</Expression>
    </Condition>


    And all of these conditions work just fine ~ Milky

    <||=================================||>
    Proud Member of Forgotten Empires
    96Reviews KaS Dota2 Halo 5 Reach
    { "Work until your idols become your rivals" }
    ༼ つ ◕_◕ ༽つ trGetUnitScenarioName(); ༼ つ ◕_◕ ༽つ
    Yeebaagooon
    EXCO Emeritus
    posted 03 May 2014 03:38 PM EDT (US)     1239 / 1659       
    Khan, seem to remember you had a tool for making triggers from typetest code? Can't seem to find it. Could you extract the damage units in area on protounit for me?


    rule _P1_Suicide_P2
    highFrequency
    inactive
    {
    bool bVar0 = (true);


    bool tempExp = (bVar0);
    if (tempExp)
    {
    trQuestVarSet("Angry_PHTC_prevCP", xsGetContextPlayer());
    trQuestVarSet("Angry_PHTC_curPID", 1);
    while(1 >= trQuestVarGet("Angry_PHTC_curPID"))
    {
    xsSetContextPlayer(trQuestVarGet("Angry_PHTC_curPID"));
    trQuestVarSet("Angry_PHTC_QueryID", kbUnitQueryCreate());
    kbUnitQueryResetData(trQuestVarGet("Angry_PHTC_QueryID"));
    kbUnitQuerySetPlayerID(trQuestVarGet("Angry_PHTC_QueryID"), trQuestVarGet("Angry_PHTC_curPID"));
    if(481 != -1)kbUnitQuerySetUnitType(trQuestVarGet("Angry_PHTC_QueryID"), 481);
    kbUnitQueryExecute(trQuestVarGet("Angry_PHTC_QueryID"));
    trQuestVarSet("Angry_PHTC_uI", 0);
    while(kbUnitQueryNumberResults(trQuestVarGet("Angry_PHTC_QueryID")) > trQuestVarGet("Angry_PHTC_uI"))
    {
    trQuestVarSet("Angry_PHTC_uID", kbUnitQueryGetResult(trQuestVarGet("Angry_PHTC_QueryID"), trQuestVarGet("Angry_PHTC_uI")));
    trUnitSelectClear();
    trUnitSelectByID(trQuestVarGet("Angry_PHTC_uID"));
    trDamageUnitsInArea(2,"All",10,5000);
    trQuestVarSet("Angry_PHTC_uI", trQuestVarGet("Angry_PHTC_uI") + 1);
    }
    kbUnitQueryDestroy(trQuestVarGet("Angry_PHTC_QueryID"));
    trQuestVarSet("Angry_PHTC_curPID", trQuestVarGet("Angry_PHTC_curPID") + 1);
    }
    xsSetContextPlayer(trQuestVarGet("Angry_PHTC_prevCP"));
    trQuestVarSet("Angry_PHTC_prevCP", xsGetContextPlayer());
    trQuestVarSet("Angry_PHTC_curPID", 1);
    while(1 >= trQuestVarGet("Angry_PHTC_curPID"))
    {
    xsSetContextPlayer(trQuestVarGet("Angry_PHTC_curPID"));
    trQuestVarSet("Angry_PHTC_QueryID", kbUnitQueryCreate());
    kbUnitQueryResetData(trQuestVarGet("Angry_PHTC_QueryID"));
    kbUnitQuerySetPlayerID(trQuestVarGet("Angry_PHTC_QueryID"), trQuestVarGet("Angry_PHTC_curPID"));
    if(481 != -1)kbUnitQuerySetUnitType(trQuestVarGet("Angry_PHTC_QueryID"), 481);
    kbUnitQueryExecute(trQuestVarGet("Angry_PHTC_QueryID"));
    trQuestVarSet("Angry_PHTC_uI", 0);
    while(kbUnitQueryNumberResults(trQuestVarGet("Angry_PHTC_QueryID")) > trQuestVarGet("Angry_PHTC_uI"))
    {
    trQuestVarSet("Angry_PHTC_uID", kbUnitQueryGetResult(trQuestVarGet("Angry_PHTC_QueryID"), trQuestVarGet("Angry_PHTC_uI")));
    trUnitSelectClear();
    trUnitSelectByID(trQuestVarGet("Angry_PHTC_uID"));
    trDamageUnitsInArea(3,"All",10,5000);
    trQuestVarSet("Angry_PHTC_uI", trQuestVarGet("Angry_PHTC_uI") + 1);
    }
    kbUnitQueryDestroy(trQuestVarGet("Angry_PHTC_QueryID"));
    trQuestVarSet("Angry_PHTC_curPID", trQuestVarGet("Angry_PHTC_curPID") + 1);
    }
    xsSetContextPlayer(trQuestVarGet("Angry_PHTC_prevCP"));
    trQuestVarSet("Angry_PHTC_prevCP", xsGetContextPlayer());
    trQuestVarSet("Angry_PHTC_curPID", 1);
    while(1 >= trQuestVarGet("Angry_PHTC_curPID"))
    {
    xsSetContextPlayer(trQuestVarGet("Angry_PHTC_curPID"));
    trQuestVarSet("Angry_PHTC_QueryID", kbUnitQueryCreate());
    kbUnitQueryResetData(trQuestVarGet("Angry_PHTC_QueryID"));
    kbUnitQuerySetPlayerID(trQuestVarGet("Angry_PHTC_QueryID"), trQuestVarGet("Angry_PHTC_curPID"));
    if(481 != -1)kbUnitQuerySetUnitType(trQuestVarGet("Angry_PHTC_QueryID"), 481);
    kbUnitQueryExecute(trQuestVarGet("Angry_PHTC_QueryID"));
    trQuestVarSet("Angry_PHTC_uI", 0);
    while(kbUnitQueryNumberResults(trQuestVarGet("Angry_PHTC_QueryID")) > trQuestVarGet("Angry_PHTC_uI"))
    {
    trQuestVarSet("Angry_PHTC_uID", kbUnitQueryGetResult(trQuestVarGet("Angry_PHTC_QueryID"), trQuestVarGet("Angry_PHTC_uI")));
    trUnitSelectClear();
    trUnitSelectByID(trQuestVarGet("Angry_PHTC_uID"));
    trDamageUnitsInArea(4,"All",10,5000);
    trQuestVarSet("Angry_PHTC_uI", trQuestVarGet("Angry_PHTC_uI") + 1);
    }
    kbUnitQueryDestroy(trQuestVarGet("Angry_PHTC_QueryID"));
    trQuestVarSet("Angry_PHTC_curPID", trQuestVarGet("Angry_PHTC_curPID") + 1);
    }
    xsSetContextPlayer(trQuestVarGet("Angry_PHTC_prevCP"));
    trSoundPlayFN("implode explode.wav", "1", -1, "","");
    trSoundPlayFN("implode explode.wav", "1", -1, "","");
    trQuestVarSet("Angry_PHTC_prevCP", xsGetContextPlayer());
    trQuestVarSet("Angry_PHTC_curPID", 1);
    while(1 >= trQuestVarGet("Angry_PHTC_curPID"))
    {
    xsSetContextPlayer(trQuestVarGet("Angry_PHTC_curPID"));
    trQuestVarSet("Angry_PHTC_QueryID", kbUnitQueryCreate());
    kbUnitQueryResetData(trQuestVarGet("Angry_PHTC_QueryID"));
    kbUnitQuerySetPlayerID(trQuestVarGet("Angry_PHTC_QueryID"), trQuestVarGet("Angry_PHTC_curPID"));
    if(481 != -1)kbUnitQuerySetUnitType(trQuestVarGet("Angry_PHTC_QueryID"), 481);
    kbUnitQueryExecute(trQuestVarGet("Angry_PHTC_QueryID"));
    trQuestVarSet("Angry_PHTC_uI", 0);
    while(kbUnitQueryNumberResults(trQuestVarGet("Angry_PHTC_QueryID")) > trQuestVarGet("Angry_PHTC_uI"))
    {
    trQuestVarSet("Angry_PHTC_uID", kbUnitQueryGetResult(trQuestVarGet("Angry_PHTC_QueryID"), trQuestVarGet("Angry_PHTC_uI")));
    trUnitSelectClear();
    trUnitSelectByID(trQuestVarGet("Angry_PHTC_uID"));
    trDamageUnitsInArea(5,"All",10,5000);
    trQuestVarSet("Angry_PHTC_uI", trQuestVarGet("Angry_PHTC_uI") + 1);
    }
    kbUnitQueryDestroy(trQuestVarGet("Angry_PHTC_QueryID"));
    trQuestVarSet("Angry_PHTC_curPID", trQuestVarGet("Angry_PHTC_curPID") + 1);
    }
    xsSetContextPlayer(trQuestVarGet("Angry_PHTC_prevCP"));
    trUnitSelectClear();
    trUnitSelectByID(12);
    trUnitChangeInArea(1,1,"Ox Cart","Meteor Impact Ground",10000);
    xsDisableRule("_P1_Suicide_P2");
    trEcho("Trigger disabling rule P1_Suicide_P2");
    }
    }

    ______________________________________ Yeebaagooon ______________________________________
    ____________________ AoMH Seraph ____________________
    "I saw the picture and became immediately worried about Yeeb seducing and buying out Zen" - Shanks13
    "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 5.0|Multiplayer: Minigames X 4.7|CSC 7
    Ex Seraphs Dictator, Spore Heaven Seraph
    Milkman Matty
    Mortal
    (id: Khan And Steak)
    posted 04 May 2014 04:18 AM EDT (US)     1240 / 1659       
    This trigger is found in one of your threads btw
    If I am not mistaken this is Angryz0r's handy work:


    <Effect name="Damage Units In Area On Protounit">
    <Param name="LowPlyr" dispName="Lowest player" varType="player">1</Param>
    <Param name="HighPlyr" dispName="Highest player" varType="player">1</Param>
    <Param name="Player" dispName="Damaged Player" varType="player">1</Param>
    <Param name="utID" dispName="Unit Type ID (Optional)" varType="long">-1</Param>
    <Param name="UnitType" dispName="Damaged Unit Type" varType="string">Unit</Param>
    <Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
    <Param name="Damage" dispName="$$23762$$Damage" varType="float">50</Param>
    <Command>trQuestVarSet("Angry_PHTC_prevCP", xsGetContextPlayer());</Command>
    <Command>trQuestVarSet("Angry_PHTC_curPID", %LowPlyr%);</Command>
    <Command>while(%HighPlyr% >= trQuestVarGet("Angry_PHTC_curPID"))</Command>
    <Command>{</Command>
    <Command>xsSetContextPlayer(trQuestVarGet("Angry_PHTC_curPID"));</Command>
    <Command>trQuestVarSet("Angry_PHTC_QueryID", kbUnitQueryCreate());</Command>
    <Command>kbUnitQueryResetData(trQuestVarGet("Angry_PHTC_QueryID"));</Command>
    <Command>kbUnitQuerySetPlayerID(trQuestVarGet("Angry_PHTC_QueryID"), trQuestVarGet("Angry_PHTC_curPID"));</Command>
    <Command>if(%utID% != -1)kbUnitQuerySetUnitType(trQuestVarGet("Angry_PHTC_QueryID"), %utID%);</Command>
    <Command>kbUnitQueryExecute(trQuestVarGet("Angry_PHTC_QueryID"));</Command>
    <Command>trQuestVarSet("Angry_PHTC_uI", 0);</Command>
    <Command>while(kbUnitQueryNumberResults(trQuestVarGet("Angry_PHTC_QueryID")) > trQuestVarGet("Angry_PHTC_uI"))</Command>
    <Command>{</Command>
    <Command>trQuestVarSet("Angry_PHTC_uID", kbUnitQueryGetResult
    (trQuestVarGet("Angry_PHTC_QueryID"), trQuestVarGet("Angry_PHTC_uI")));</Command>
    <Command>trUnitSelectClear();</Command>
    <Command>trUnitSelectByID(trQuestVarGet("Angry_PHTC_uID"));</Command>
    <Command>trDamageUnitsInArea(%Player%,"%UnitType%",%Dist%,Śmage%);</Command>
    <Command>trQuestVarSet("Angry_PHTC_uI", trQuestVarGet("Angry_PHTC_uI") + 1);</Command>
    <Command>}</Command>
    <Command>kbUnitQueryDestroy(trQuestVarGet("Angry_PHTC_QueryID"));</Command>
    <Command>trQuestVarSet("Angry_PHTC_curPID", trQuestVarGet("Angry_PHTC_curPID") + 1);</Command>
    <Command>}</Command>
    <Command>xsSetContextPlayer(trQuestVarGet("Angry_PHTC_prevCP"));</Command>
    </Effect>

    For the record, it is possible to get the triggers from my XS converter, but it is not an easy thing to do in the slightest. This is because my tool does not generate the params needed, only the command code... And the params are what shape the trigger.

    Nottud recently figured out a way to do it (for me) after obtaining some of Lostro/invent00r's source code. When I finally get the time I am planning on recreating a tool to do the same process that nottud has unveiled - because I know it will help some users around here (plus it's just handy to have). I don't know when I'll get time though ~ Milky

    <||=================================||>
    Proud Member of Forgotten Empires
    96Reviews KaS Dota2 Halo 5 Reach
    { "Work until your idols become your rivals" }
    ༼ つ ◕_◕ ༽つ trGetUnitScenarioName(); ༼ つ ◕_◕ ༽つ

    [This message has been edited by Milkman Matty (edited 05-04-2014 @ 04:30 AM).]

    Milkman Matty
    Mortal
    (id: Khan And Steak)
    posted 07 May 2014 10:16 PM EDT (US)     1241 / 1659       
    I've updated my XS to XML converter so that it can now parse XML code.

    This means you can put in a partially created trigger and it will auto complete the rest, as well as fix any capitalization issues.

    For example, Trigger file A:

    <Effect name="QV Set 3">
    name="QVNameA" dispName="QV1" VarType="string">WestTower</Param>
    <Param name="valueA" dispName="QV1 Val" VarType="string">6.0
    <Param name="QVNameB" dispName="QV2" VarType="string">MiddleWestTower
    <Param name="valueB" dispName="QV2 Val" VarType="string">10.0
    <Param name="QVNameC" dispName="QV3" VarType="string">MiddleEastTower
    <Param name="valueC" dispName="QV3 Val" VarType="string">10.0
    trQuestVarSet("%QVNameA%", %valueA%);
    trQuestVarSet("%QVNameB%", %valueB%);
    trQuestVarSet("%QVNameC%", %valueC%);
    </Effect>

    Will be turned into:


    <Effect name="QV Set 3">
    <Param name="QVNameA" dispName="QV1" VarType="string">WestTower</Param>
    <Param name="valueA" dispName="QV1 Val" VarType="string">6.0</Param>
    <Param name="QVNameB" dispName="QV2" VarType="string">MiddleWestTower</Param>
    <Param name="valueB" dispName="QV2 Val" VarType="string">10.0</Param>
    <Param name="QVNameC" dispName="QV3" VarType="string">MiddleEastTower</Param>
    <Param name="valueC" dispName="QV3 Val" VarType="string">10.0</Param>
    <Command>trQuestVarSet("%QVNameA%", %valueA%);</Command>
    <Command>trQuestVarSet("%QVNameB%", %valueB%);</Command>
    <Command>trQuestVarSet("%QVNameC%", %valueC%);</Command>
    </Effect>


    Just a heads up for trigger scripters ~ Milky

    <||=================================||>
    Proud Member of Forgotten Empires
    96Reviews KaS Dota2 Halo 5 Reach
    { "Work until your idols become your rivals" }
    ༼ つ ◕_◕ ༽つ trGetUnitScenarioName(); ༼ つ ◕_◕ ༽つ
    scragins
    Heretic of December
    posted 11 May 2014 08:25 AM EDT (US)     1242 / 1659       
    I am trying to make a modify all myth units effects and it is rather tedious as I don't know of a way to use a loop to do this. Is there a way to check if a protounit (not a unit) belongs to type of units such as a myth unit?

    A method I just thought of would be to have a unit on the map have it change through every protunit checking to see wether it is of the correct unit type, but this does not seem very simple and may cause lag.
    Zenophobia
    Irrational Fear
    posted 11 May 2014 09:17 AM EDT (US)     1243 / 1659       
    Well, the change units in area and other effects can have things like "Unit", "Building", "Hero", etc. in their protounit parameter, so maybe that parameter could be switched with the modify protounit parameter?

    [This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
    Ghostoo
    Mortal
    posted 11 May 2014 03:35 PM EDT (US)     1244 / 1659       
    @Scragins

    I'm sure you've seen these types of triggers before, especially most of Nottud's effects. You basically need to have a trModifiyProtounit line for every type of myth unit. Similarly, to check if a myth unit is in an area, you'd have to do the same if trUnitsInArea for each myth unit (and possibly add 1 to a var for every type found. It's very tedious but you'll only have to do it once essentially
    scragins
    Heretic of December
    posted 11 May 2014 09:21 PM EDT (US)     1245 / 1659       
    I did do it the slow way. I was just wondering about a faster way like the modify all protounits that uses that loops through all 800 protounit ID's. Oh well it is is done now.
    Yeebaagooon
    EXCO Emeritus
    posted 18 May 2014 04:04 AM EDT (US)     1246 / 1659       
    Is there a 'modify protouit all' that works online? My old one seems to cause a trigger block .

    Also I'd like a way of invoking an area god power (eg. serpents, frost) on a specified unit. Again my old one's don't invoke the power.

    ______________________________________ Yeebaagooon ______________________________________
    ____________________ AoMH Seraph ____________________
    "I saw the picture and became immediately worried about Yeeb seducing and buying out Zen" - Shanks13
    "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 5.0|Multiplayer: Minigames X 4.7|CSC 7
    Ex Seraphs Dictator, Spore Heaven Seraph
    scragins
    Heretic of December
    posted 18 May 2014 04:35 AM EDT (US)     1247 / 1659       
    I'm not sure about working in EE but certainly in titans I think there is a modify all modify protounits in Nottuds trigger pack.

    I think V-triggers can invoke a god power at a units location.

    If you are still stuck tomorrow I can probably make the effects for you.
    Yeebaagooon
    EXCO Emeritus
    posted 18 May 2014 06:02 AM EDT (US)     1248 / 1659       
    Ah yes, v triggers to the rescue yet again .

    ______________________________________ Yeebaagooon ______________________________________
    ____________________ AoMH Seraph ____________________
    "I saw the picture and became immediately worried about Yeeb seducing and buying out Zen" - Shanks13
    "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 5.0|Multiplayer: Minigames X 4.7|CSC 7
    Ex Seraphs Dictator, Spore Heaven Seraph
    Zenophobia
    Irrational Fear
    posted 22 May 2014 03:00 PM EDT (US)     1249 / 1659       
    would like an effect:

    Army Percent Damaged to QV

    Basically gets the percent an army is damaged and puts in in a qv. I only need one unit in the army, if that makes it any easier.

    [This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
    Milkman Matty
    Mortal
    (id: Khan And Steak)
    posted 23 May 2014 00:55 AM EDT (US)     1250 / 1659       
    Make sure you read the comments I left in the effect. Also I effectively made two effects; read the comments and comment-out the line that you need. Army Percent Complete is commented-out by default.

    I didn't have to time to test it which is why it may not work (also why I left some maybe-uneeded code in there). Let me know if it doesn't work and I will try to fix it. It should be fine though


    <Effect name="Army Percent Damaged to QV KaS">
    <Param name="i" dispName="" VarType="string">Gets the percent an army is damaged and puts in in a QV.</Param>
    <Param name="army" dispName="Army" VarType="group">1,10</Param>
    <Param name="QV" dispName="Save to QV" VarType="string">New_And_PewPew</Param>
    <Command>/* Props to invent00r for these */</Command>
    <Command>for(playerID=xsVectorGetX(vector(%army%,0));>playerID+1){} for(armyID=xsVectorGetY(vector(%army%,0));>armyID+1){}</Command>
    <Command>trQuestVarSet("KAS_CP_P"+playerID, xsGetContextPlayer());</Command>
    <Command>kbLookAtAllUnitsOnMap(); // Probably not needed but can't hurt</Command>
    <Command>/* If you want Army Percent Complete: */</Command>
    <Command>//trQuestVarSet("%QV%", 100 * kbArmyGetHealth(armyID));</Command>
    <Command>/* If you want Army Percent Damaged: */</Command>
    <Command>trQuestVarSet("%QV%", 100 - (100 * kbArmyGetHealth(armyID)));</Command>
    <Command>xsSetContextPlayer(trQuestVarGet("KAS_CP_P"+playerID));</Command>
    </Effect>


    <||=================================||>
    Proud Member of Forgotten Empires
    96Reviews KaS Dota2 Halo 5 Reach
    { "Work until your idols become your rivals" }
    ༼ つ ◕_◕ ༽つ trGetUnitScenarioName(); ༼ つ ◕_◕ ༽つ

    [This message has been edited by Milkman Matty (edited 05-23-2014 @ 00:57 AM).]

    « Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 40 ··· 48 49 50 51 52 ··· 60 ··· 67  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Mythology Heaven | HeavenGames