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.1672 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 ··· 62 63 64 65 66 ··· 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:
    Lewonas
    Mortal
    posted 24 July 2017 02:42 PM EDT (US)     1576 / 1672       
    Thank you. I'm currently spending my holiday on my favourite hobbies (painting, music, board games, video games, etc.) so I'm really enjoying myself . Enjoy your holiday too!

    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%]
    eine_Gurkensalat
    Mortal
    (id: eine_gurkensalad)
    posted 25 July 2017 07:13 AM EDT (US)     1577 / 1672       
    Do you PLAY music ? I play trumpet :-)
    Lewonas
    Mortal
    posted 25 July 2017 11:16 AM EDT (US)     1578 / 1672       
    Yes! I play the keyboard and am thinking about playing the piano as well in the near future. I also very occasionally compose my own music and moreso covers of soundtracks I want to play on the keyboard (I was in a very active band about 3 years ago which is when I started composing music/our own songs).

    Playing music is my most favourite hobby, and in my opinion one of the greatest hobbies to have; music is so powerful and expressive. I'm sure you feel the same.

    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%]
    Zenophobia
    Irrational Fear
    posted 25 July 2017 12:19 PM EDT (US)     1579 / 1672       
    Which band?


    [This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
    eine_Gurkensalat
    Mortal
    (id: eine_gurkensalad)
    posted 25 July 2017 12:50 PM EDT (US)     1580 / 1672       
    You are right ! I don't listen a lot of music but (because ?) i've most time music in head (classical and... Aoe/aom ) of course I love playing trumpet but I don't have really a band, i just play in an orchestra.
    Nolovent
    Mortal
    posted 25 July 2017 05:37 PM EDT (US)     1581 / 1672       
    Lewonas: thank you for all of your help and for sharing your incredible trigger code! You are a very talented programmer, and I like the creative way you think about setting variables. Also, I had no idea about abstract types. That's so much simpler than the solution I suggested!

    I made a variant of your trigger that modifies ALL protounits by percent. Now you can make all of one player's units 50% stronger!
    Here's the dropbox for it, as an updated version of AMPtriggers.xml. Thank you so much for making this possible.


    Thank you eine_gurkensalad and dethklok for your contributions too. This has been a very enlightening discussion!

    [This message has been edited by Nolovent (edited 07-25-2017 @ 06:42 PM).]

    eine_Gurkensalat
    Mortal
    (id: eine_gurkensalad)
    posted 26 July 2017 06:27 AM EDT (US)     1582 / 1672       
    I think i'll be interested by this trigger for my new civilisation
    Mazeppa
    Mortal
    posted 29 July 2017 00:49 AM EDT (US)     1583 / 1672       
    modifies ALL protounits by percent. Now you can make all of one player's units 50% stronger!
    Wow, Nolovent. I was about to ask if there was a trigger effect that can modify protounits by percentage instead of delta, and then I saw your post. Haha!!

    This is great, and is particularly useful in adjusting difficulty levels in a scenario. (Like, enemies becoming more dangerous in attack, or harder to kill, for instance - in harder difficulty levels - especially in a fixed force type of scenario).

    Also, is there an effect that modifies one specific protounit (like the modify protounit in the aom editor, but with percentage instead of delta)?
    Lewonas
    Mortal
    posted 30 July 2017 12:23 PM EDT (US)     1584 / 1672       
    @Nolovent: I appreciate it, thanks. This would be a more compact version of your trigger:

    <Effect name="AMP - Modify ALL Protounits Percent BASE STAT">
    <Param name="PlayerID" dispName="$$22301$$Player" VarType="string">1</Param>
    <Param name="Field" dispName="$$23943$$Field" varType="pufield">0</Param>
    <Param name="Percent" dispName="Percent" varType="string">100.0</Param>
    <Command>for(protounit_id=931;>=0) {</Command>
    <Command>trQuestVarSet("AMPPTEMP",trQuestVarGet("PU%PlayerID%_"+protounit_id+"_%Field%")*%Percent%/100);</Command>
    <Command>trModifyProtounit(kbGetProtoUnitName(protounit_id), %PlayerID%, %Field%, trQuestVarGet("AMPPTEMP"));</Command>
    <Command>trQuestVarSet("PU%PlayerID%_"+protounit_id+"_%Field%",trQuestVarGet("PU%PlayerID%_"+protounit_id+"_%Field%")+trQuestVarGet("AMPPTEMP"));</Command>
    <Command>}</Command>
    </Effect>

    And with player range support:

    <Effect name="AMP - Modify ALL Protounits Percent BASE STAT Player Range">
    <Param name="PlayerID1" dispName="Lowest Player" VarType="string">1</Param>
    <Param name="PlayerID2" dispName="Highest Player" VarType="string">1</Param>
    <Param name="Field" dispName="$$23943$$Field" varType="pufield">0</Param>
    <Param name="Percent" dispName="Percent" varType="string">100.0</Param>
    <Command>for(playerID=%PlayerID2%;>=%PlayerID1%) {</Command>
    <Command>for(protounit_id=931;>=0) {</Command>
    <Command>trQuestVarSet("AMPPTEMP",trQuestVarGet("PU"+playerID+"_"+protounit_id+"_%Field%")*%Percent%/100);</Command>
    <Command>trModifyProtounit(kbGetProtoUnitName(protounit_id), playerID, %Field%, trQuestVarGet("AMPPTEMP"));</Command>
    <Command>trQuestVarSet("PU"+playerID+"_"+protounit_id+"_%Field%",trQuestVarGet("PU"+playerID+"_"+protounit_id+"_%Field%")+trQuestVarGet("AMPPTEMP"));</Command>
    <Command>}}</Command>
    </Effect>

    @Mazepaa: Look at my post #1572 of this topic. You can find a link to my dropbox file which has the modify protounit percent trigger you're looking for.

    @Zenophobia: Haha, I only wish we were as big and successful as the ones listed in your link. We were more of an enthusiastic amateur band who didn't take things too seriously and we never really had the ambition to enter the big stages. I think the biggest crowd we ever had was like 1000 people at the graduation party. We usually performed for like 100 people at most, but it was always more about having fun and the thrills to perform our music on stage. We all had a blast and it's a real shame it eventually came to an end. (our band was called Supremacy; as much as we loved conquering in RTS games, we also loved to conquer the people with our music, so hence we chose that name...

    ehh just kidding, if only this was the case. We had to come up with a name on the spot the first time we performed because we hadn't bothered coming up with a name for our group. Supremacy was the first thing that came to my mind and we just rolled with it. Oh well...

    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%]
    eine_Gurkensalat
    Mortal
    (id: eine_gurkensalad)
    posted 30 July 2017 03:02 PM EDT (US)     1585 / 1672       
    Seems to be a good time for you ! Which sort of music did you perform ? You might smile but I find your name very good for a band, and for a small band like your it is more funny
    I think I'll make a remix of aom theme with my brother (means piano trumpet) to open the New civilisation with style
    DamianEnriquez
    Mortal
    posted 30 July 2017 07:08 PM EDT (US)     1586 / 1672       
    How to change Protounit name to string value?
    const string Toxotes = "Archer";
    string Name(int type = -1){
    string name = string kbGetProtoUnitName(type); //string Archer
    if(type != -1){return(name);}} //string Toxotes
    trChatSend(0, "Protounit Name "+Name(kbGetProtoUnitID("Toxotes"))+"");
    instead of "Archer" i get "Toxotes" trChatSend(0, "Protounit Name Toxotes");
    How to fix this without using String Quest Var (TL)?
    maybe string(kbGetProtoUnitName(kbGetProtoUnitID("Toxotes")))
    but i get empty message trChatSend(0, "Protounit Name "); or
    String.valueOf(kbGetProtoUnitName(kbGetProtoUnitID("Toxotes")))
    but doesnt work

    Steam | Facebook | YouTube | Discord | GameRanger
    Tower Defense new map
    braintaker2
    Mortal
    posted 01 August 2017 05:27 AM EDT (US)     1587 / 1672       
    ive been told to post this here, i want to make an army attack a specific unit such as a gate but there aint no specific trigger for that sooooo....
    DamianEnriquez
    Mortal
    posted 04 August 2017 06:47 PM EDT (US)     1588 / 1672       

    <Effect name="Army Dispatch">
    <Param name="Player" dispName="Player" varType="string">"+cNumberPlayers-1+"</Param>
    <Param name="Protounit" dispName="Protounit" varType="protounit">Toxotes</Param>
    <Param name="Name" dispName="Name" varType="string">-1</Param>
    <Param name="Count" dispName="Count" VarType="string">1</Param>
    <Param name="Location" dispName="Location" varType="area">0,0,0</Param>
    <Param name="Object" dispName="Object" varType="unit">default</Param>
    <Command>trArmyDispatch("%Player%,0", "%Protounit%", %Count%, %Location%, 0, true);</Command>
    <Command>trArmySelect("%Player%,0");</Command>
    <Command>if(%Name% != -1){trUnitChangeName("%Name%");}</Command>
    <Command>trUnitMoveToUnit("%Object%",-1, true);</Command>
    </Effect>

    Steam | Facebook | YouTube | Discord | GameRanger
    Tower Defense new map

    [This message has been edited by DamianEnriquez (edited 08-04-2017 @ 06:48 PM).]

    scragins
    Heretic of December
    posted 05 August 2017 05:54 AM EDT (US)     1589 / 1672       
    I could be wrong but I thought unit/army work could be used to make an army attack a unit. Just set the target unit to the unit you want to be attacked.
    Ghostoo
    Mortal
    posted 08 August 2017 11:15 PM EDT (US)     1590 / 1672       
    They may want the army to attack any gates, not just a particular one. This is easily achievable with vtriggers/ytriggers

    the V trigger would be "V Army move" with "attack" selected. This should also probably be nested within a "V conditional army distance to unit" so that they only do it when the gates are within a certain range.

    This could better be done by a double V-trigger search where it searches for both gates and the army units, and has found-unit 1 attack found-unit 2

    Voolohmay? Kahlos.

    [This message has been edited by Ghostoo (edited 08-08-2017 @ 11:17 PM).]

    Mazeppa
    Mortal
    posted 09 August 2017 03:08 PM EDT (US)     1591 / 1672       
    Not sure if this belongs here, but it'd be pretty cool to have a utility that flips buildings similar to how you can flip images with MS paint.

    Flip vertical was already achieved I guess, where you can turn a unit upside down, but what about a thing that works like flip horizontal, where the building or unit just flips to the other side? A bit like this:

    http://i.imgur.com/fvEp4Oh.png

    Not sure if this was already done though.
    eine_Gurkensalat
    Mortal
    (id: eine_gurkensalad)
    posted 28 August 2017 12:22 PM EDT (US)     1592 / 1672       
    Effect name- Unforbid All units EE
    Description- Same as Unforbid All units (which seems to contain some mysterious and very efficient ways) but including all EE units !
    TAG
    That AoM Guy
    (id: aom expert)
    posted 28 August 2017 06:34 PM EDT (US)     1593 / 1672       
    @Mazeppa

    most likely impossible

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    Loggy
    Mortal
    posted 29 August 2017 07:34 AM EDT (US)     1594 / 1672       
    This has the unforbid command for every selectable unit in EE.

    [This message has been edited by Loggy (edited 08-29-2017 @ 07:35 AM).]

    eine_Gurkensalat
    Mortal
    (id: eine_gurkensalad)
    posted 29 August 2017 09:40 AM EDT (US)     1595 / 1672       
    thank you we just have to copy the 1st and the 2nd line of the original "unforbid" ALL units from nottud's editor superpack, and of course add the final line
    eine_Gurkensalat
    Mortal
    (id: eine_gurkensalad)
    posted 30 August 2017 07:38 AM EDT (US)     1596 / 1672       
    condition name- Units in area of army
    description- army version (it can be only one unit armies) of the "Units in area". I know that I can use some effects but here I prefer really a condition.

    thanks
    eine_Gurkensalat
    Mortal
    (id: eine_gurkensalad)
    posted 07 September 2017 02:09 PM EDT (US)     1597 / 1672       
    @Lewonas
    Sorry for this late return but I have to say that the effects you writed seem to don't work.
    What I tested was a simple thing, on y as on v:
    a unit is targeted by the y search or the v tpq
    the v/y condition units in area apply (the ANY version)
    I writed the ID of the unit I targeted
    Lowest player 1 and highest 1 or 4
    Units in area: Temple (I tried Temple in letters or the ID (464)
    range 30
    =
    0

    So normally, if the unit targeted has been deployed in an army just near the temple, there is one or more temple around (or 0). But the effect can apply to the unit so the condition isn't reliable. (and this doesn't work in most cases)

    It doesn't make any trigger block or smthg else, it just apply like randomly.
    Lewonas
    Mortal
    posted 07 September 2017 05:45 PM EDT (US)     1598 / 1672       
    I probably misunderstood how you wanted the conditions to work like. After reading your reply, I've difficulty understanding what you want to do exactly. So I'll just quickly explain how the conditions work right now using your example. So, if you have a trigger like this...

    Trigger name: Example
    Active [X] Loop [X] Run Immediately [ ]
    @HIGH Priority

    Condition: Timer
    Time = 1

    Effect: vTPQ start
    Player = 99
    Protounit = Hoplite
    Radius = -1

    Effect: v Condition - Units in Area For ANY Players
    Unique vID = 0
    Lowest player = 1
    Highest player = 4
    Unit Type = Temple
    Radius = 30
    Operator = ==
    Count = 0

    Effect: Send Chat
    Message = Testing...

    Effect: v Condition zEND

    Effect: vTPQ end

    ... the v Condition will be met if the currently selected hoplite from the protounit query is not within a radius of 30 meters near a temple of at least one of the four players. In other words, it checks if at least one of the players does not have any temples near this hoplite. This is repeated for all of the hoplites on the maps belonging to players 1-4.

    Now let's say you swap the unit types of the vTQP (so it searches for temples) and v Condition Units in Area (so it counts hoplites) effects. Now the condition will be met if the currently selected temple from the protounit query is not within a radius of 30 meters near a hoplite of at least one of the four players. In other words, it checks if at least one of the players does not have any hoplites near this temple.

    There's quite a dramatic difference between these two examples. In the former example no temples of at least one player may be near any of the hoplites, and in the latter example no hoplites of at least one player may be near any of the temples.

    Is either of these two examples the intended way how you want the trigger to work like? And if not, could you provide a concrete trigger example and detail the expected outcome?

    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%]

    [This message has been edited by Lewonas (edited 09-07-2017 @ 05:48 PM).]

    eine_Gurkensalat
    Mortal
    (id: eine_gurkensalad)
    posted 08 September 2017 04:29 AM EDT (US)     1599 / 1672       
    First I'm surprised by the "vunique id" You puted (0) because for me it was the id of the targeted unit (so in your exemple the hoplite)
    It can be why it doesn't work.
    I'm using this condition to NOT target the pyramid small that have more than 0 temple around so i use temple range 30 = 0 so it targets among pyramid Small only those that have no temple around.

    So this is:
    V tpq player 0 pyramid small (it is al ways gaia) all the map
    Condition unit in area any
    V unique id (what to use ?)
    Temple
    30
    =
    0
    V destroy
    Lewonas
    Mortal
    posted 08 September 2017 08:51 AM EDT (US)     1600 / 1672       
    Ok, I see the problem now. For some reason I created both vcondition effects in such a way that it only works for a single unit on the map. The ID parameter partly caused this problem, which is now removed. The effects should work as intended now.

    <Effect name="v Condition - Units in Area For ALL Players">
    <Param name="LP" dispName="Lowest player" varType="string">1</Param>
    <Param name="HP" dispName="Highest player" varType="string">12</Param>
    <Param name="UnitType" dispName="Unit Type" VarType="string">Unit</Param>
    <Param name="Dist" dispName="Radius" VarType="float">10</Param>
    <Param name="Op" dispName="Operator" VarType="operator">==</Param>
    <Param name="Count" dispName="Count" VarType="float">1</Param>
    <Command>for(criterion=1;>1){}</Command>
    <Command>for(unitName=0;>1){}</Command>
    <Command>if(trQuestVarGet("UNITNAME_"+UnitID+"_SET") == 0) {</Command>
    <Command>trQuestVarSet("UNITNAME_"+UnitID+"_SET", 1);</Command>
    <Command>for(c_unit=0;>1){}</Command>
    <Command>if(kbGetBlockID(""+UnitID) == UnitID) trQuestVarSet("UNITNAME_"+UnitID, UnitID);</Command>
    <Command>else {</Command>
    <Command>while(true) {</Command>
    <Command>if(kbGetBlockID(""+c_unit) == UnitID) { trQuestVarSet("UNITNAME_"+UnitID, c_unit); break; }</Command>
    <Command>else c_unit = c_unit + 1;</Command>
    <Command>}}}</Command>
    <Command>unitName = 1*trQuestVarGet("UNITNAME_"+UnitID);</Command>
    <Command>for(c_player=%HP%;>=%LP%) {</Command>
    <Command>if(trCountUnitsInArea(""+unitName, c_player, "%UnitType%", %Dist%) %Op% %Count%) continue;</Command>
    <Command>else { criterion = 0; break; }</Command>
    <Command>}</Command>
    <Command>if(criterion == 1) {</Command>
    </Effect>

    <Effect name="v Condition - Units in Area For ANY Players">
    <Param name="LP" dispName="Lowest player" varType="string">1</Param>
    <Param name="HP" dispName="Highest player" varType="string">12</Param>
    <Param name="UnitType" dispName="Unit Type" VarType="string">Unit</Param>
    <Param name="Dist" dispName="Radius" VarType="float">10</Param>
    <Param name="Op" dispName="Operator" VarType="operator">==</Param>
    <Param name="Count" dispName="Count" VarType="float">1</Param>
    <Command>for(criterion=0;>1){}</Command>
    <Command>for(unitName=0;>1){}</Command>
    <Command>if(trQuestVarGet("UNITNAME_"+UnitID+"_SET") == 0) {</Command>
    <Command>trQuestVarSet("UNITNAME_"+UnitID+"_SET", 1);</Command>
    <Command>for(c_unit=0;>1){}</Command>
    <Command>if(kbGetBlockID(""+UnitID) == UnitID) trQuestVarSet("UNITNAME_"+UnitID, UnitID);</Command>
    <Command>else {</Command>
    <Command>while(true) {</Command>
    <Command>if(kbGetBlockID(""+c_unit) == UnitID) { trQuestVarSet("UNITNAME_"+UnitID, c_unit); break; }</Command>
    <Command>else c_unit = c_unit + 1;</Command>
    <Command>}}}</Command>
    <Command>unitName = 1*trQuestVarGet("UNITNAME_"+UnitID);</Command>
    <Command>for(c_player=%HP%;>=%LP%) {</Command>
    <Command>if(trCountUnitsInArea(""+unitName, c_player, "%UnitType%", %Dist%) %Op% %Count%) { criterion = 1; break; }</Command>
    <Command>}</Command>
    <Command>if(criterion == 1) {</Command>
    </Effect>

    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%]
    « Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 62 63 64 65 66 ··· 67  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Mythology Heaven | HeavenGames