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 ··· 10 ··· 21 22 23 24 25 ··· 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 25 July 2009 02:43 PM EDT (US)     551 / 2506  
    Okay that was a painful trigger to make, and it shouldn't have been.
    I was doing all the "hard" stuff right, but it was always breaking because I kept doing the easy stuff wrong.

       <Condition name="Units in Area (army)">
    <Param name="SrcArmy" dispName="Center Army" VarType="group">0,0</Param>
    <Param name="PlayerID" dispName="$$22301$$Player" VarType="player">0</Param>
    <Param name="ProtoName" dispName="Protounit" VarType="protounit">Unit</Param>
    <Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
    <Param name="Op" dispName="$$22297$$Operator" VarType="operator">==</Param>
    <Param name="Count" dispName="$$22304$$Count" VarType="long">1</Param>
    <Command>for(Qid=0;>1){}</Command>
    <Command>for(oldPlayer=xsGetContextPlayer();>99){}</Command>
    <Command>for(id=0;>1) {}</Command>
    <Command>for(Pid=xsVectorGetX(vector(%SrcArmy%,0));>Pid+1){} for(Aid=xsVectorGetY(vector(%SrcArmy%,0));>Aid+1){}</Command>
    <Command>xsSetContextPlayer(Pid); id = kbArmyGetUnitID(Aid,0);</Command>
    <Command>xsSetContextPlayer(%PlayerID%); kbLookAtAllUnitsOnMap();</Command>
    <Command>Qid=kbUnitQueryCreate("QUIA_%PlayerID%_%ProtoName%");</Command>
    <Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%, true);</Command>
    <Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%ProtoName%"));</Command>
    <Command>kbUnitQuerySetPosition(Qid, kbUnitGetPosition(id));</Command>
    <Command>kbUnitQuerySetMaximumDistance(Qid, %Dist%);</Command>
    <Command>kbUnitQuerySetAscendingSort(Qid, true);</Command>
    <Command>kbUnitQuerySetState(Qid,2);</Command>
    <Expression>kbUnitQueryExecute(Qid) %Op% %Count%</Expression>
    </Condition>


    If you leave the Protounit parameter blank, it works for all units, like the regular Units in Area condition.
    posted 25 July 2009 03:18 PM EDT (US)     552 / 2506  
    Thanks so much oboe. My hunter is now OP If these work that is Oboe whats the count for?

    ____________
    +|||SwordOfValor|||+
    A Proud Member Of
    0==[==========>
    ValorStudios
    <==========]==0

    [This message has been edited by SwordOfValor (edited 07-25-2009 @ 07:06 PM).]

    posted 26 July 2009 04:10 AM EDT (US)     553 / 2506  
    Army teleport near Army
    desc - I think you know what it does.

    It's for my dodging trigger on my RPG map.

    BARTHOLOMEUS
    specialized mostly in RPGs since 2004 - his creations
    Latest Project: Rise of The Ancient: The Cursed Lands
    experience True RPG ever created on AOM - coming soon
    "This is the Reason why you have to play AOM again." ~deadwalker
    Submitted Files: Greece Main Menu AoM Chess Panos's Journey
    posted 26 July 2009 09:20 AM EDT (US)     554 / 2506  
    Request:

    Name - Army deploy at unit with player food count as count
    Description - Example: if player 2 is chosen and has 6 food, then 6 units will deploy at the selected unit.

    _/o___
    _(__\____
    AGE OF MYTHOLOGY'S THIRD UNMODDED FULL CAMPAIGN __\^^\)___ AGE OF MYTHOLOGY'S THIRD UNMODDED FULL CAMPAIGN
    __"\_____
    "This is shaping up to be the best campaign on AoM heaven" ____(_\___
    "This is shaping up to be the best campaign on AoM heaven"

    [This message has been edited by Silicone Ruff Jr (edited 07-26-2009 @ 12:10 PM).]

    posted 26 July 2009 01:10 PM EDT (US)     555 / 2506  
    Come on, I'm sure there's already an effect to store food count in a QV, and one to deploy an army with the number of units from a QV...

    Customizing conditions and effects makes sense only:
    - If they enable you to do with X triggers something that would otherwise take more than ((1/A)*X+(1/B)) triggers, where A is a measure of how much you dislike making the same triggers over and over, and B is your general laziness.
    - If they enable you to do cool new stuff, like unit transform and the like.
    posted 26 July 2009 01:24 PM EDT (US)     556 / 2506  
    I was going to ask for an "army deploy at unit with QV count" trigger, but... wait! The QV count can go in the condition, and then you can grant the appropriate number of units using the effect!

    I am a dumbass, never mind.

    _/o___
    _(__\____
    AGE OF MYTHOLOGY'S THIRD UNMODDED FULL CAMPAIGN __\^^\)___ AGE OF MYTHOLOGY'S THIRD UNMODDED FULL CAMPAIGN
    __"\_____
    "This is shaping up to be the best campaign on AoM heaven" ____(_\___
    "This is shaping up to be the best campaign on AoM heaven"
    posted 26 July 2009 01:40 PM EDT (US)     557 / 2506  
    trQuestVarGet("QV1")

    copy that and paste it into the "Count" box of your Army deploy trigger, and it'll use the value of QV1.
    Oboe whats the count for?
    How many units are in the area. Just like the units in area trigger, you can make it fire (For example) greater than 10 units, or exactly 4 units, or less than 3, etc.
    posted 26 July 2009 01:45 PM EDT (US)     558 / 2506  
    *hug oby*

    _/o___
    _(__\____
    AGE OF MYTHOLOGY'S THIRD UNMODDED FULL CAMPAIGN __\^^\)___ AGE OF MYTHOLOGY'S THIRD UNMODDED FULL CAMPAIGN
    __"\_____
    "This is shaping up to be the best campaign on AoM heaven" ____(_\___
    "This is shaping up to be the best campaign on AoM heaven"
    posted 26 July 2009 01:48 PM EDT (US)     559 / 2506  
    And although I generally agree with archaeopterix about requesting triggers which are really easy to do with regular triggers, this one should save you about 3 seconds every time you want to use it, and it took me about 3 seconds to make it, so I think that's a pretty good deal.


    <Effect name="Army Deploy to Unit QV Count">
    <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="Count" dispName="Count" varType="string">QV1</Param>
    <Param name="Heading" dispName="Heading" varType="string">0</Param>
    <Param name="Clear" dispName="Clear Existing Units:" varType="bool">true</Param>
    <Command>trQuestVarSet("fhweaohpgpagowhwa", xsGetContextPlayer());</Command>
    <Command>xsSetContextPlayer(0);</Command>
    <Command>kbLookAtAllUnitsOnMap();</Command>
    <Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", trQuestVarGet("%Count%"), xsVectorGetX(kbGetBlockPosition(""+1*%Object%)),xsVectorGetY(kbGetBlockPosition(""+1*%Object%)),xsVectorGetZ(kbGetBlockPosition(""+1*%Object%)), %Heading%, %Clear%);</Command>
    <Command>xsSetContextPlayer(trQuestVarGet("fhweaohpgpagowhwa"));</Command>
    </Effect>
    posted 26 July 2009 01:49 PM EDT (US)     560 / 2506  
    That's great, but I won't go any further than a hug, man.

    EDIT: Seriously though, thanks so much!

    _/o___
    _(__\____
    AGE OF MYTHOLOGY'S THIRD UNMODDED FULL CAMPAIGN __\^^\)___ AGE OF MYTHOLOGY'S THIRD UNMODDED FULL CAMPAIGN
    __"\_____
    "This is shaping up to be the best campaign on AoM heaven" ____(_\___
    "This is shaping up to be the best campaign on AoM heaven"

    [This message has been edited by Silicone Ruff Jr (edited 07-26-2009 @ 01:50 PM).]

    posted 27 July 2009 07:38 PM EDT (US)     561 / 2506  
    Name:Quest Var set rank
    Description:An effect that would compare a Quest var's position with 3 other QV's, then return its place (either 1,2,3 or 4) and set it as a new QV.

    The parameters would look something like this;

    QV1 to rank:
    QV2:
    QV3:
    QV4:
    QV to set:

    for example if the following quest vars were used.

    p1coin=88
    p2coin=2
    p3coin=3
    p4coin=999

    QV1 to rank: p1coin
    QV2: p2coin
    QV3: p3coin
    QV4: p4coin
    QV to set: p1rank

    and hopfully 'p1rank' would equal 2. as

    p4coin>p1coin>p2coin>p3coin

    Does this allready exist or can anyone make it please?

    [This message has been edited by gunner1 (edited 07-27-2009 @ 07:39 PM).]

    posted 28 July 2009 02:46 AM EDT (US)     562 / 2506  
    Seeing as alot of other triggers were getting posted, I put this one on.

    Name: Convert units in area to random player

    Description: I think this will just be combining some other triggers, firstly I want a box where you can type in the unit type or just leave it as Unit, then a centre unit and radius, then two boxes for the highest and lowest player number, and a button for all of them. So it would look something like this in it's default mode:

    Unit type: Unit
    Centre Unit Show
    Radius: 10
    Lowest player: Player 0
    Highest player: Player 10
    All players: OFF

    If you can do I would appreciate it alot. It would also be useful if you could add the option to change unit, and to change to a random unit, but this bit is not essential. I know there is already a convert to random player effect, so this shouldn't be too hard. Also I want it to convert each unit to a different player, not all to the same player. Thanks in advance!

    Also, what is the convert in area awesome?
    posted 28 July 2009 04:30 AM EDT (US)     563 / 2506  
    Okay, because i got lost in page 1 i am not even going to look and see if you have this trigger made already
    Name: GROUP select
    Discript: select groups 1-9(only 1 at a time).....i have seen one but cant find it on this site.....
    and i have another
    Name: Unit summon Gaia units as defence
    Discript: if an enemy comes within target units line of sight it spons random gaia units such as snakes, wolves, lions, and other animals that attack the enemy and continues to spon more ever 3-5 seconds until enemy is no longer in that units line of sight.
    and if would wold do this one too
    Name: Unit summon Myth units as defence
    Discript: same as the Gaia one, except that it is myth units this time, i would like the most common to be centaurs and fernis(sp?) wolf brood...

    if you could do this stuff for me i would be so very thankful, i am lost on how you all make them and if this is possible it would be SO AWESOME to have
    i hope i haven't asked for to many things, and thanks again!
    posted 28 July 2009 05:15 AM EDT (US)     564 / 2506  
    DELETED

    BARTHOLOMEUS
    specialized mostly in RPGs since 2004 - his creations
    Latest Project: Rise of The Ancient: The Cursed Lands
    experience True RPG ever created on AOM - coming soon
    "This is the Reason why you have to play AOM again." ~deadwalker
    Submitted Files: Greece Main Menu AoM Chess Panos's Journey

    [This message has been edited by Bartholomeus (edited 07-29-2009 @ 05:12 AM).]

    posted 28 July 2009 07:07 AM EDT (US)     565 / 2506  
    Bartholomeus, do you mean to suggest that people have been ignoring the following post made by you, a short while ago?
    Army teleport near Army
    desc - I think you know what it does.

    It's for my dodging trigger on my RPG map.
    If so, please respect the following:
    - For ANY custom conditions and effects out there that you have been using in your scenario so far you should be very greatful to the very people that you've been insulting (sort of). Yes, that includes the TONS of conditions and effects that you might have downloaded in packs or together with Reyk's new editor (if case you haven't: what are you still doing here?).
    - Not every custom condition or effect is very exciting to script. Some things are more fun or more easy to do than other things.

    Most condition and effect requests are answered fairly soon, so why the hell would you wish to close this topic?

    If you think it's taking too long (these custom scripters don't get paid, you know), maybe you should feel bothered to learn scripting yourself. It's not that hard and it'll open a world of opportunities.
    posted 28 July 2009 07:38 AM EDT (US)     566 / 2506  
    Okay, now I'm really sorry about my last comment... forget it.

    I'm not very good at understanding English but I will try to answer.

    Army teleport near Army trigger, I haven't found in any custom triggers (including Reyk's, nottud's superpack, Baseballkid Triggers, proactive triggers Invent00r) but what I find is Army teleport near unit, while Army teleport to Army is not available. I always give credits in the end of my scenario for those who makes something super useful like that.

    I don't know, but I think Army teleport near Army is an easy-to-make trigger since it's only change a few scripts. yea, I know that sometimes you're bored when you're doing something that's not in your mood. But I have requested more than 1 times, and it still doesn't have any replies. (is there any good people who wants to help this starving guy?)

    ok ok, the thread still open. I said I'm sorry.

    I'll try to learn and see If I can help someone in the future...

    BARTHOLOMEUS
    specialized mostly in RPGs since 2004 - his creations
    Latest Project: Rise of The Ancient: The Cursed Lands
    experience True RPG ever created on AOM - coming soon
    "This is the Reason why you have to play AOM again." ~deadwalker
    Submitted Files: Greece Main Menu AoM Chess Panos's Journey
    posted 28 July 2009 10:27 AM EDT (US)     567 / 2506  
    GROUP select

      <Effect name="GROUP Select">
    <Param name="ScenName" dispName="Gruppe 1-9" varType="string">1</Param>
    <Command>uiAddSelectNumberGroup(%ScenName%);</Command>
    </Effect>

    ____________
    +|||AuroraP|||+
    A Proud Member Of
    0==[==========>
    ValorStudios
    <==========]==0

    [This message has been edited by AuroraP (edited 07-28-2009 @ 10:28 AM).]

    posted 28 July 2009 12:02 PM EDT (US)     568 / 2506  
    I apologize, Bartholomeus. I could probably make the teleport effect for you as I am well versed in that particular command, I just simply don't have the time. I will try to adapt the teleport near unit to have an army select. That, I believe, should be easy.
    *note that the teleport command does NOT work in a multiplayer/online situation.

    Gunner1: I'll try that one as well.

    Zorx: I'll try that as well

    The usual helpers of this thread (Mythic, Invent00r, Hail, etc..) seem to be busy as well, but please have faith. This is completely volunteer driven and has times where you have to wait...


    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 28 July 2009 02:39 PM EDT (US)     569 / 2506  
    Thanks for trying.
    posted 28 July 2009 11:01 PM EDT (US)     570 / 2506  
    @Gunner:
            <Effect name="EL QV Set Rank">
    <Param name="qv1" dispName="QV to rank" varType="string">pqcoin</Param>
    <Param name="qv2" dispName="QV1 to compare" varType="string">p2coin</Param>
    <Param name="qv3" dispName="QV2 to compare" varType="string">p3coin</Param>
    <Param name="qv4" dispName="QV3 to compare" varType="string">p4coin</Param>
    <Param name="qvrank" dispName="QV to rank" varType="string">p1rank</Param>
    <Command>trQuestVarSet("%qvrank%",4);</Command>
    <Command>if (trQuestVarGet("%qv1%") > trQuestVarGet("%qv2%")) trQuestVarSet("%qvrank%",trQuestVarGet("%qvrank%") -1);</Command>
    <Command>if (trQuestVarGet("%qv1%") > trQuestVarGet("%qv3%")) trQuestVarSet("%qvrank%",trQuestVarGet("%qvrank%") -1);</Command>
    <Command>if (trQuestVarGet("%qv1%") > trQuestVarGet("%qv4%")) trQuestVarSet("%qvrank%",trQuestVarGet("%qvrank%") -1);</Command>
    </Effect>


    I'm out of shape with trigger coding but that was a pretty easy one..

    Tried the teleport army to army for a while, but couldn't translate all those damned Area/vector data types between different commands..


    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 28 July 2009 11:15 PM EDT (US)     571 / 2506  
    Army Teleport To Army is in invent00r's proactive triggers. Is that the one you want?
       <Effect name="Army Teleport To Army">
    <Param name="ArmyS" dispName="Army Source" VarType="group">0,0</Param>
    <Param name="ArmyT" dispName="Army Target" VarType="group">0,0</Param>
    <Command>xsSetContextPlayer(xsVectorGetX(vector(%ArmyT%,-1)));</Command>
    <Command>kbLookAtAllUnitsOnMap();</Command>
    <Command>trArmySelect("%ArmyS%");</Command>
    <Command>trUnitTeleport(xsVectorGetX(kbArmyGetLocation(xsVectorGetY(vector( %ArmyT%,-1)))),0,xsVectorGetZ(kbArmyGetLocation(xsVectorGetY(vector(%ArmyT%,-1)))));</Command>
    </Effect>
    posted 28 July 2009 11:16 PM EDT (US)     572 / 2506  
    @Zorx: this is an effect I made for Baske for his entry into last year's Boss competition. It is not exactly what you want, but maybe another trigger maker here can build on what I made. This effect will find units of player 1 and convert them to player 2 (unless you specify the same player for from/to player). It will also change the proto unit from the from type to the To Type (unless you set both to the same proto unit). It will do either or both of these actions for a random amount up to the most you specify within a radius of a point. I don't have time to tweak it to make a random to player conversion per unit found, but maybe someone else can. Otherwise, it's a pretty cool effect as it is...



            <Effect name="EL Convert ProtoChange Rndm Amt In Area">
    <Param name="Object" dispName="Center Point" VarType="area">0</Param>
    <Param name="Dst" dispName="Radius" VarType="float">10.0</Param>
    <Param name="FromPlayer" dispName="From Player" VarType="player">0</Param>
    <Param name="ToPlayer" dispName="To Player" VarType="player">0</Param>
    <Param name="ProtoNameFrom" dispName="From Type" VarType="Protounit">
    </Param>
    <Param name="ProtoNameTo" dispName="To Type" VarType="Protounit">
    </Param>
    <Param name="ChangeCount" dispName="Change rnd amt up to" VarType="long">6</Param>
    <command>trQuestVarSet("lastpl", xsGetContextPlayer());</command>
    <command>trQuestVarSet("ResultSet",0);</command>
    <command>trQuestVarSet("iMatchedUnitID",0);</command>
    <command>trQuestVarSet("iFromPlayer", %FromPlayer% );</command>
    <command>trQuestVarSet("iToPlayer", %ToPlayer% );</command>
    <command>trQuestVarSet("idxResult"),0);</command>
    <command>trQuestVarSet("bDoConvert"),1);</command>
    <command>trQuestVarSet("bDoChangeProto",1);</command>
    <command>if (%FromPlayer% == %ToPlayer% ) trQuestVarSet("bDoConvert",0);</command>
    <command>if ("%ProtoNameFrom%" == "%ProtoNameTo%") trQuestVarSet("bDoChangeProto",0);</command>
    <command>xsSetContextPlayer(iFromPlayer);</command>
    <Command>trQuestVarSetFromRand("convarearandom", 1, %ChangeCount%, true);</Command>
    <command>trQuestVarSet("idxChangeCount",trQuestVarGet("convarearandom"));</command>
    <Command>trChatSend(1, "no to change: " + trQuestVarGet("idxChangeCount"));</Command>
    <command>trQuestVarSet("ResultSet",kbUnitQueryCreate("ResultSet"));</command>
    <command>kbUnitQuerySetPlayerID(trQuestVarGet("ResultSet"), trQuestVarget("iFromPlayer"));</command>
    <command>if ("%ProtoNameFrom%" != "") kbUnitQuerySetUnitType(trQuestVarGet("ResultSet"), kbGetProtoUnitID("%ProtoNameFrom%"));</command>
    <command>kbUnitQueryResetResults(trQuestVarGet("ResultSet"));</command>
    <command>trQuestVarSet("idxResult",kbUnitQueryExecute(trQuestVarGet("ResultSet")));</command>
    <command>if (trQuestVarGet("idxResult") > trQuestVarGet("idxChangeCount")) trQuestVarSet("idxResult",trQuesVarGet("idxChangeCount"));</command>
    <command>while(trQuestVarGet("idxResult")>0)</command>
    <command>{</command>
    <command>trQuestVarSet("idxResult",trQuestVarGet("idxResult") - 1);</command>
    <command>trQuestVarSet("iMatchedUnitID", kbUnitQueryGetResult(trQuestVarGet("ResultSet"),trQuestVarGet("idxResult")));</command>
    <command>trUnitSelectClear();</command>
    <command>trUnitSelectByID(trQuestVarGet("iMatchedUnitID"));</command>
    <command>if(%Dst%>=trUnitDistanceToPoint(%Object% )) </command>
    <command>{</command>
    <command>if (trQuestVarGet("bDoConvert") == 1) trUnitConvert(trQuestVarGet("iToPlayer"));</command>
    <command>if (trQuestVarGet("bDoChangeProto") == 1) trUnitChangeProtoUnit("%ProtoNameTo%");</command>
    <command>}</command>
    <command>}</command>
    <command>xsSetContextPlayer(trQuestVarGet("lastpl"));</command>
    </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 29 July 2009 05:24 AM EDT (US)     573 / 2506  
    I'm sorry If the last comment troubles you. but many thanks for helping Elrich.
    thanks so much, HailToTheOboe, i have tried to convert army teleport near unit trigger to its army version. But it doesn't work.

    EDIT: I'm sorry, I mean, Army teleport near Army not Army teleport to Army.

    BARTHOLOMEUS
    specialized mostly in RPGs since 2004 - his creations
    Latest Project: Rise of The Ancient: The Cursed Lands
    experience True RPG ever created on AOM - coming soon
    "This is the Reason why you have to play AOM again." ~deadwalker
    Submitted Files: Greece Main Menu AoM Chess Panos's Journey

    [This message has been edited by Bartholomeus (edited 07-31-2009 @ 09:26 PM).]

    posted 29 July 2009 09:16 AM EDT (US)     574 / 2506  
    Name - QV Send Chat to Player
    Description - Same as QV Send Chat, just that it send the chat to a speciffic player.

    ____________
    +|||AuroraP|||+
    A Proud Member Of
    0==[==========>
    ValorStudios
    <==========]==0
    posted 29 July 2009 09:36 AM EDT (US)     575 / 2506  
    @Hail: I always forget to look in there.
    vector( %ArmyT%,-1)

    That's what I was missing, though I have no idea why it would be needed based on effects and what they plugged into the vector() function

    I should be able to adapt the deploy near to work now..


    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
    « Previous Page  1 ··· 10 ··· 21 22 23 24 25 ··· 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