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

Scenario Design
Moderated by Yeebaagooon, TAG, nottud

Hop to:    
Welcome! You are not logged in. Please Login or Register.1680 replies, Sticky
Age of Mythology Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
Bottom
Topic Subject:Have a Trigger Request? Post it here!
« Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 36 37 38 39 40 ··· 50 ··· 60 ··· 68  Next Page »
Elrich
Hero
posted 23 July 2010 11:41 AM EDT (US)         
So you have a question trigger request?

You can post it here!



Hello and welcome to the Trigger Request Thread (TRT). This thread's purpose is only to place trigger requests and discuss them. If you have unrelated questions or need help with triggers, please use Azur's thread!



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

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

  2. How do I install a trigger?
    When we have finished making your trigger, we'll post the required code here. To install this code you will first of all need to find your way to the AoM installation folder. C:\Program Files\Microsoft Games\Age of Mythology by default). Now open the trigger folder if you intend to use the trigger in vanilla, or open the trigger2 folder if you use The Titans expansion. Next, open the file called typetest.xml. The only thing left to do is copy the code at the right position and save. If you requested a condition, then place the line above < /Conditions>, if you requested an effect paste it right above < /Effects>. Note the "s" at the end of both tags.

    Notes:

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


  3. How do I uninstall a trigger?
    If a trigger happens to be faulty or if it generates errors you better remove it. Just do as if you were installing a new trigger, but instead of copy-pasting new code, remove the code corresponding with the chosen trigger. Make sure to remove it completely, including the starting < effect > or < condition > tag and the corresponding < /effect > or < /condition > closing tag. Failure to do so properly will cause XML errors in the file making ALL triggers in that file inaccessbile for AoM.

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

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

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


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

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



Resources

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

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




Posting a Request

So you have read the FAQ and want to post a request? OK, go for it, just be sure to use the following format:

Name - This should be as straightforward as possible. Try to comply with today's standards.
Description - Always describe the actions that you want the trigger to perform.
Example - Optional. An example can be a great help when requesting complex triggers.


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


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




Unfinished Requests

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

  • Finished Requests

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

  • Enjoy.
    Last updated: 03 september 2009

    In all your science of the mind, seeking blind through flesh and bone
    Find the blood inside this stone
    Well, I know I've never shown what I feel, I've always known
    I plan my vengeance on my own - and I was always alone
    AuthorReplies:
    Zenophobia
    Irrational Fear
    posted 25 February 2012 04:54 PM EDT (US)     926 / 1680       
    ah, thank you very much! that's the one i really needed.
    i still have a roundabout way to perform the desired effects of the first one, but a trigger would just be more convenient.

    couldn't you perhaps combine your "EL unit heading into QV" trigger with "move to unit"?

    [This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]

    [This message has been edited by Zenophobia (edited 02-25-2012 @ 05:01 PM).]

    perpetual_n00b
    Immortal
    posted 26 February 2012 09:21 AM EDT (US)     927 / 1680       
    Hugar, maybe you have a broken version of the Invoke God Power At Unit effect. You could test it in a new scenario to be sure.

    I know this one works (just tested it):

    <Effect name="Invoke God Power At Unit">
    <Param name="wa" dispName="Instructions:" varType="string">This invokes godpowers SUCH AS LIGHTNING that normally require area selections.</Param>
    <Param name="wala" dispName="IMPORTANT:" varType="string">Make sure have BOTH targets set (even if to the same unit).</Param>
    <Param name="PlayerID" dispName="Player" varType="player">0</Param>
    <Param name="PowerName" dispName="Power" varType="godpower">default</Param>
    <Param name="Object" dispName="Target 1" VarType="unit">default</Param>
    <Param name="Object2" dispName="Target 2" VarType="unit">default</Param>
    <Command>trQuestVarSet("fhweaohpgpagowhwa", xsGetContextPlayer());</Command>
    <Command>xsSetContextPlayer(0);</Command>
    <Command>kbLookAtAllUnitsOnMap();</Command>
    <Command>trUnitSelectClear();</Command>
    <Command loop="" loopParm="Object">trUnitSelect("%Object%");</Command>
    <Command>trTechInvokeGodPower(%PlayerID%, "%PowerName%", kbUnitGetPosition(%Object%), kbUnitGetPosition(%Object2%));</Command>
    <Command>xsSetContextPlayer(trQuestVarGet("fhweaohpgpagowhwa"));</Command>
    </Effect>
    Ghostoo
    Mortal
    posted 29 February 2012 00:16 AM EDT (US)     928 / 1680       
    @Elrich
    is there really such a thing as "trUnitDistanceToUnit"?
    what does it return? the x z difference?
    can i assume it has a built in sq_rt function?

    that makes a lot of my ideas so much easier i feel so dumb for not knowing about it
    Milkman Matty
    Mortal
    (id: Khan And Steak)
    posted 29 February 2012 02:33 AM EDT (US)     929 / 1680       
    static float trUnitDistanceToUnit(string unitScenarioName)
    Returns the shortest distance between the trRT units and the given unit.
    it returns the distance in meters (I'm guessing) only because the return type is a float and I don't think you can get a fraction when using tiles.

    AoM Reference is a masterpiece ~ Khan

    <||=================================||>
    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 Steak And Khan (edited 02-29-2012 @ 02:36 AM).]

    Ghostoo
    Mortal
    posted 03 March 2012 01:07 AM EDT (US)     930 / 1680       
    so trying to fiddle around with a memory system i hit a stump. There's something wrong with these triggers that cause the .xml to fail so they don't even appear in the editor, but i can't seem to figure it out. Help would be appreciated, thanks in advance.

    Here are the triggers:

    <Effect name="mzFlare Minimap on single path">
    <Param name="PlayerID" dispName="Player" varType="player">1</Param>
    <Param name="Duration" dispName="Duration" varType="long">0</Param>
    <Param name="Flash" dispName="Flash" varType="bool">true</Param>
    <Param name="mapQV" dispName="Map Path QV" varType="string">QV1</Param>
    <Param name="countQV" dispName="Count QV" varType="string">QV2</Param>
    <Param name="count" dispName="Count Number" varType="float">0</Param>
    <Command>if (trQuestVarGet("%countQV%") >= %count%) && (%count% != 0){</Command>
    <Command>trQuestVarSet("mapx", trQuestVarGet("%mapQV%x"+1*%count%));</Command>
    <Command>trQuestVarSet("mapz", trQuestVarGet("%mapQV%z"+1*%count%));</Command>
    <Command>vector v1=xsVectorSet(trQuestVarGet("mapx"),0, trQuestVarGet("mapz"));</Command>
    <Command>trMinimapFlare(%PlayerID%, %Duration%, v1, %Flash%);}</Command>
    </Effect>

    <Effect name="mzInvoke God Power on specific path">
    <Param name="PlayerID" dispName="$$22301$$Player" varType="player">0</Param>
    <Param name="PowerName" dispName="$$22451$$Power" varType="godpower">default</Param>
    <Param name="mapQV" dispName="Path QV" varType="string">QV1</Param>
    <Param name="countQV" dispName="Count QV" varType="string">QV1</Param>
    <Param name="count" dispName="Count Number" varType="float">0</Param>
    <Param name="DstPoint2" dispName="$$22410$$X" varType="area">0,0,0</Param>
    <Command>if (trQuestVarGet("%countQV%") >= %count%) && (%count% != 0){</Command>
    <Command>trQuestVarSet("mapx", trQuestVarGet("%mapQV%x"+1*%count%));</Command>
    <Command>trQuestVarSet("mapz", trQuestVarGet("%mapQV%z"+1*%count%));</Command>
    <Command>trTechGodPower(%PlayerID%, "%PowerName%", 1);</Command>
    <Command>vector v1=vector(1,1,1);</Command>
    <Command>vector v2=xsVectorSet(%DstPoint2%);</Command>
    <Command>v1=xsVectorSet( trQuestVarGet("%mapQV%x"+1*trQuestVarGet("%countQV%")),0,</Command>
    <Command>trQuestVarGet("%mapQV%z"+1*trQuestVarGet("%countQV%")));</Command>
    <Command>trTechInvokeGodPower(%PlayerID%, "%PowerName%", v1,v2);}</Command>
    </Effect>

    <Effect name="mzArmy Deploy on specific path QV">
    <Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
    <Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
    <Param name="Count2" dispName="$$22435$$Count" varType="float">0</Param>
    <Param name="Heading" dispName="$$22432$$Heading" varType="long">0</Param>
    <Param name="mapQV" dispName="Path QV" varType="string">QV1</Param>
    <Param name="countQV" dispName="QV to get specific count number" varType="string">QV2</Param>
    <Param name="count" dispName="$$22435$$Count" varType="float">0</Param>
    <Command>if (trQuestVarGet("%countQV%") >= %count%) && (%count% != 0){</Command>
    <Command>trQuestVarSet("mapx", trQuestVarGet("%mapQV%x"+1*%count%));</Command>
    <Command>trQuestVarSet("mapz", trQuestVarGet("%mapQV%z"+1*%count%));</Command>
    <Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", %Count2%, trQuestVarGet("mapx"),0,trQuestVarGet("mapz"), %Heading%, %clear%);}</Command>
    </Effect>

    [This message has been edited by Ghostoo (edited 03-03-2012 @ 01:18 AM).]

    Elrich
    Hero
    posted 03 March 2012 07:05 AM EDT (US)     931 / 1680       
    I see you've been doing some hard work, ghostoo. That's fantastic.

    I found your XML document errors. There were a few problems because of your logical AND operators: &&. Since XML is really a data document with the data between the tags, you have to be careful about not using any characters that XML will interpret as a command. The & sign in XML is a special character that has a function(entity), so when it saw it, it thought you were using it incorrectly and rejected it as an XML document. To make XML ignore(not parse) parts of your document, you have to use the <![CDATA] begin and ]]> end declarations.

    Here is one of your problem lines:

    <Command>if (trQuestVarGet("%countQV%") >= %count%) && (%count% != 0){></Command>

    XML sees the first & and thinks it's an illegal entity reference. Now I will add CDATA (a declaration that tells XML to ignore what's in between the begin/end 'tags')


    <Command><![CDATA[if (trQuestVarGet("%countQV%") >= %count%) && (%count% != 0){]]></Command>

    You have three of these &&'s to fix in the file, so do a search and apply the CDATA declarations and your document should test out ok.

    You will also have the same problem if you want to do:
    if (trQuestVarGet("hpcount") < 10) because of the < sign. It thinks you are starting a tag. Some people reverse the operators so they can make it 5 >= trQuestVarGet("hpcount), but I like to keep the code how it should look by using CDATA instead.

    So keep chugging along. Making your own effects is how I got so into AOM. I'm glad you're taking that plunge too.

    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
    Ghostoo
    Mortal
    posted 04 March 2012 05:53 PM EDT (US)     932 / 1680       
    thanks Elrich, you're who i expect the best answers from when i see a reply in the trigger request thread. Does the same apply for the or "||"? Because when i make the "unit walk path" trigger i want to give some leeway of + or - 2 paces from the point itself so i'd assume use is 2>pos || pos>2, in which case i'd use the cdata command?

    also, i tried to rip the entire paint terrain command and implement the pathing memeory, after an hour of troubleshooting i still have no dice. Maybe there was something i missed?
       <Effect name="mzPaint Terrain on path">
    <Param name="mapQV" dispName="Map QV" varType="string">QV1</Param>
    <Param name="countQV" dispName="Count QV" varType="string">QV1</Param>
    <Param name="s1" dispName="BrushSizeX" varType="stringid">1</Param>
    <Param name="s2" dispName="BrushSizeZ" varType="stringid">1</Param>
    <Param name="t" dispName="New terrain" VarType="string">snowb</Param>
    <Param name="v2" dispName="Brush is square" varType="Bool">true</Param>
    <Param name="v" dispName="Trigger Name" varType="stringid">paint1</Param>
    <Command>trQuestVarSet("fakecount", trQuestVarGet("countQV"));</Command>
    <Command>while (trQuestVarGet("fakecount") > 0){</Command>
    <Command>trQuestVarSet("zzzz", trQuestVarGet("zzzz") + 1);</Command>
    <Command>if(trQuestVarGet("zzzz") == 1){</Command>
    <Command>map("mouse2down","earthquake","");</Command>
    <Command>map("mouse1down","earthquake","");</Command>
    <Command>subModeEnter("Simulation", "Editor");</Command>
    <Command>modeEnter("pregame");</Command>
    <Command>modeEnter("Simulation");</Command>
    <Command>subModeEnter("Simulation", "Singleplayer");</Command>
    <Command>configToggle("cameraMovementLock");</Command>
    <Command>editMode("paint");</Command>
    <Command>if(%v2% == false)uiChangeBrushType("Circular");</Command>
    <Command>if(%v2% == true)uiChangeBrushType("Rectangular");</Command>
    <Command>uiChangeBrushSize(%s1%,%s2%,1,1);</Command>
    <Command>for(i = 0; > 1){}</Command>
    <Command>for(j = 0; > 1){}</Command>
    <Command>if("%t%" == "grassa"){i = 0; j = 0;}</Command>
    <Command>if("%t%" == "grassb"){i = 1; j = 0;}</Command>
    <Command>if("%t%" == "grassdirt25"){i = 2; j = 0;}</Command>
    <Command>if("%t%" == "grassdirt50"){i = 3; j = 0;}</Command>
    <Command>if("%t%" == "grassdirt75"){i = 4; j = 0;}</Command>
    <Command>if("%t%" == "cliffgreekb"){i = 5; j = 0;}</Command>
    <Command>if("%t%" == "greekroad burnt"){i = 6; j = 0;}</Command>
    <Command>if("%t%" == "greekroad burntb"){i = 7; j = 0;}</Command>
    <Command>if("%t%" == "gaiacreepa"){i = 8; j = 0;}</Command>
    <Command>if("%t%" == "gaiacreepasnow"){i = 9; j = 0;}</Command>
    <Command>if("%t%" == "gaiacreepasand"){i = 10; j = 0;}</Command>
    <Command>if("%t%" == "gaiacreepb"){i = 11; j = 0;}</Command>
    <Command>if("%t%" == "gaiacreepborder"){i = 12; j = 0;}</Command>
    <Command>if("%t%" == "gaiacreepbordersnow"){i = 13; j = 0;}</Command>
    <Command>if("%t%" == "gaiacreepbordersand"){i = 14; j = 0;}</Command>
    <Command>if("%t%" == "savannaha"){i = 15; j = 0;}</Command>
    <Command>if("%t%" == "savannahb"){i = 16; j = 0;}</Command>
    <Command>if("%t%" == "savannahc"){i = 17; j = 0;}</Command>
    <Command>if("%t%" == "savannahd"){i = 18; j = 0;}</Command>
    <Command>if("%t%" == "dirta"){i = 19; j = 0;}</Command>
    <Command>if("%t%" == "sanda"){i = 20; j = 0;}</Command>
    <Command>if("%t%" == "sandb"){i = 21; j = 0;}</Command>
    <Command>if("%t%" == "sandc"){i = 22; j = 0;}</Command>
    <Command>if("%t%" == "sandd"){i = 23; j = 0;}</Command>
    <Command>if("%t%" == "cliffegyptianb"){i = 24; j = 0;}</Command>
    <Command>if("%t%" == "sanddirt50"){i = 25; j = 0;}</Command>
    <Command>if("%t%" == "sanddirt50b"){i = 26; j = 0;}</Command>
    <Command>if("%t%" == "snowa"){i = 27; j = 0;}</Command>
    <Command>if("%t%" == "snowb"){i = 28; j = 0;}</Command>
    <Command>if("%t%" == "snowgrass25"){i = 29; j = 0;}</Command>
    <Command>if("%t%" == "snowgrass50"){i = 30; j = 0;}</Command>
    <Command>if("%t%" == "snowgrass75"){i = 31; j = 0;}</Command>
    <Command>if("%t%" == "snowsand25"){i = 32; j = 0;}</Command>
    <Command>if("%t%" == "snowsand50"){i = 33; j = 0;}</Command>
    <Command>if("%t%" == "snowsand75"){i = 34; j = 0;}</Command>
    <Command>if("%t%" == "cliffnorseb"){i = 35; j = 0;}</Command>
    <Command>if("%t%" == "olympusa"){i = 36; j = 0;}</Command>
    <Command>if("%t%" == "olympusb"){i = 37; j = 0;}</Command>
    <Command>if("%t%" == "olympusc"){i = 38; j = 0;}</Command>
    <Command>if("%t%" == "olympustile"){i = 39; j = 0;}</Command>
    <Command>if("%t%" == "tundragrassa"){i = 40; j = 0;}</Command>
    <Command>if("%t%" == "tundragrassb"){i = 41; j = 0;}</Command>
    <Command>if("%t%" == "tundrarocka"){i = 42; j = 0;}</Command>
    <Command>if("%t%" == "tundrarockb"){i = 43; j = 0;}</Command>
    <Command>if("%t%" == "marsha"){i = 44; j = 0;}</Command>
    <Command>if("%t%" == "marshb"){i = 45; j = 0;}</Command>
    <Command>if("%t%" == "marshc"){i = 46; j = 0;}</Command>
    <Command>if("%t%" == "marshd"){i = 47; j = 0;}</Command>
    <Command>if("%t%" == "marshe"){i = 48; j = 0;}</Command>
    <Command>if("%t%" == "marshf"){i = 49; j = 0;}</Command>
    <Command>if("%t%" == "egyptianroada"){i = 50; j = 0;}</Command>
    <Command>if("%t%" == "greekroada"){i = 51; j = 0;}</Command>
    <Command>if("%t%" == "norseroada"){i = 52; j = 0;}</Command>
    <Command>if("%t%" == "citytilea"){i = 53; j = 0;}</Command>
    <Command>if("%t%" == "citytileatlantis"){i = 54; j = 0;}</Command>
    <Command>if("%t%" == "citytileatlantiscoral"){i = 55; j = 0;}</Command>
    <Command>if("%t%" == "citytilewaterpool"){i = 56; j = 0;}</Command>
    <Command>if("%t%" == "citytilewateredgea"){i = 57; j = 0;}</Command>
    <Command>if("%t%" == "citytilewateredgeb"){i = 58; j = 0;}</Command>
    <Command>if("%t%" == "citytilewateredgeenda"){i = 59; j = 0;}</Command>
    <Command>if("%t%" == "citytilewateredgeendb"){i = 60; j = 0;}</Command>
    <Command>if("%t%" == "citytilewateredgeendc"){i = 61; j = 0;}</Command>
    <Command>if("%t%" == "citytilewateredgeendd"){i = 62; j = 0;}</Command>
    <Command>if("%t%" == "citytilewatercornera"){i = 63; j = 0;}</Command>
    <Command>if("%t%" == "citytilewatercornerb"){i = 64; j = 0;}</Command>
    <Command>if("%t%" == "citytilewatercornerc"){i = 65; j = 0;}</Command>
    <Command>if("%t%" == "citytilewatercornerd"){i = 66; j = 0;}</Command>
    <Command>if("%t%" == "hadesbuildable1"){i = 67; j = 0;}</Command>
    <Command>if("%t%" == "hadesbuildable2"){i = 68; j = 0;}</Command>
    <Command>if("%t%" == "forestfloorpalm"){i = 69; j = 0;}</Command>
    <Command>if("%t%" == "forestfloorpine"){i = 70; j = 0;}</Command>
    <Command>if("%t%" == "forestfloorpinesnow"){i = 71; j = 0;}</Command>
    <Command>if("%t%" == "forestflooroak"){i = 72; j = 0;}</Command>
    <Command>if("%t%" == "forestfloorgaia"){i = 73; j = 0;}</Command>
    <Command>if("%t%" == "forestfloorsavannah"){i = 74; j = 0;}</Command>
    <Command>if("%t%" == "forestfloordeadpine"){i = 75; j = 0;}</Command>
    <Command>if("%t%" == "forestfloortundra"){i = 76; j = 0;}</Command>
    <Command>if("%t%" == "forestfloormarsh"){i = 0; j = 1;}</Command>
    <Command>if("%t%" == "water"){i = 0; j = 2;}</Command>
    <Command>if("%t%" == "cliffa"){i = 1; j = 2;}</Command>
    <Command>if("%t%" == "cliffgreeka"){i = 2; j = 2;}</Command>
    <Command>if("%t%" == "cliffegyptiana"){i = 3; j = 2;}</Command>
    <Command>if("%t%" == "cliffnorsea"){i = 4; j = 2;}</Command>
    <Command>if("%t%" == "hades3"){i = 5; j = 2;}</Command>
    <Command>if("%t%" == "hades5"){i = 6; j = 2;}</Command>
    <Command>if("%t%" == "hades6"){i = 7; j = 2;}</Command>
    <Command>if("%t%" == "hades7"){i = 8; j = 2;}</Command>
    <Command>if("%t%" == "hadescliff"){i = 9; j = 2;}</Command>
    <Command>if("%t%" == "hades4"){i = 10; j = 2;}</Command>
    <Command>if("%t%" == "blackrock"){i = 11; j = 2;}</Command>
    <Command>if("%t%" == "underwaterrocka"){i = 0; j = 3;}</Command>
    <Command>if("%t%" == "underwaterrockb"){i = 1; j = 3;}</Command>
    <Command>if("%t%" == "underwaterrockc"){i = 2; j = 3;}</Command>
    <Command>if("%t%" == "underwaterrockd"){i = 3; j = 3;}</Command>
    <Command>if("%t%" == "underwaterrocke"){i = 4; j = 3;}</Command>
    <Command>if("%t%" == "underwaterrockf"){i = 5; j = 3;}</Command>
    <Command>if("%t%" == "underwatericea"){i = 6; j = 3;}</Command>
    <Command>if("%t%" == "underwatericeb"){i = 7; j = 3;}</Command>
    <Command>if("%t%" == "underwatericec"){i = 8; j = 3;}</Command>
    <Command>if("%t%" == "corala"){i = 9; j = 3;}</Command>
    <Command>if("%t%" == "coralb"){i = 10; j = 3;}</Command>
    <Command>if("%t%" == "coralc"){i = 11; j = 3;}</Command>
    <Command>if("%t%" == "coralc2"){i = 12; j = 3;}</Command>
    <Command>if("%t%" == "corald"){i = 13; j = 3;}</Command>
    <Command>if("%t%" == "corale"){i = 14; j = 3;}</Command>
    <Command>if("%t%" == "coralf"){i = 15; j = 3;}</Command>
    <Command>if("%t%" == "shorelinesanda"){i = 0; j = 4;}</Command>
    <Command>if("%t%" == "shorelineaegeana"){i = 1; j = 4;}</Command>
    <Command>if("%t%" == "shorelineaegeanb"){i = 2; j = 4;}</Command>
    <Command>if("%t%" == "shorelineaegeanc"){i = 3; j = 4;}</Command>
    <Command>if("%t%" == "shorelineredseaa"){i = 4; j = 4;}</Command>
    <Command>if("%t%" == "shorelineredseab"){i = 5; j = 4;}</Command>
    <Command>if("%t%" == "shorelineredseac"){i = 6; j = 4;}</Command>
    <Command>if("%t%" == "shorelinenorwegiana"){i = 7; j = 4;}</Command>
    <Command>if("%t%" == "shorelinenorwegianb"){i = 8; j = 4;}</Command>
    <Command>if("%t%" == "shorelinenorwegianc"){i = 9; j = 4;}</Command>
    <Command>if("%t%" == "shorelinemediterraneana"){i = 10; j = 4;}</Command>
    <Command>if("%t%" == "shorelinemediterraneanb"){i = 11; j = 4;}</Command>
    <Command>if("%t%" == "shorelinemediterraneanc"){i = 12; j = 4;}</Command>
    <Command>if("%t%" == "shorelinemediterraneand"){i = 13; j = 4;}</Command>
    <Command>if("%t%" == "shorelineatlantica"){i = 14; j = 4;}</Command>
    <Command>if("%t%" == "shorelineatlanticb"){i = 15; j = 4;}</Command>
    <Command>if("%t%" == "shorelineatlanticc"){i = 16; j = 4;}</Command>
    <Command>if("%t%" == "shorelinetundraa"){i = 17; j = 4;}</Command>
    <Command>if("%t%" == "shorelinetundrab"){i = 18; j = 4;}</Command>
    <Command>if("%t%" == "shorelinetundrac"){i = 19; j = 4;}</Command>
    <Command>if("%t%" == "shorelinetundrad"){i = 20; j = 4;}</Command>
    <Command>if("%t%" == "riversandya"){i = 21; j = 4;}</Command>
    <Command>if("%t%" == "riversandyb"){i = 22; j = 4;}</Command>
    <Command>if("%t%" == "riversandyc"){i = 23; j = 4;}</Command>
    <Command>if("%t%" == "riversandyshallowa"){i = 24; j = 4;}</Command>
    <Command>if("%t%" == "rivergrassya"){i = 25; j = 4;}</Command>
    <Command>if("%t%" == "rivergrassyb"){i = 26; j = 4;}</Command>
    <Command>if("%t%" == "rivergrassyc"){i = 27; j = 4;}</Command>
    <Command>if("%t%" == "rivericya"){i = 28; j = 4;}</Command>
    <Command>if("%t%" == "rivericyb"){i = 29; j = 4;}</Command>
    <Command>if("%t%" == "rivericyc"){i = 30; j = 4;}</Command>
    <Command>if("%t%" == "rivermarsha"){i = 31; j = 4;}</Command>
    <Command>if("%t%" == "rivermarshb"){i = 32; j = 4;}</Command>
    <Command>if("%t%" == "rivermarshc"){i = 33; j = 4;}</Command>
    <Command>if("%t%" == "icea"){i = 0; j = 5;}</Command>
    <Command>if("%t%" == "iceb"){i = 1; j = 5;}</Command>
    <Command>if("%t%" == "icec"){i = 2; j = 5;}</Command>
    <Command>if("%t%" == "miningground"){i = 3; j = 5;}</Command>
    <Command>if("%t%" == "black"){i = 4; j = 5;}</Command>
    <Command>if("%t%" == "hades1"){i = 5; j = 5;}</Command>
    <Command>if("%t%" == "hades2"){i = 6; j = 5;}</Command>
    <Command>if("%t%" == "hades4"){i = 7; j = 5;}</Command>
    <Command>if("%t%" == "hades8"){i = 8; j = 5;}</Command>
    <Command>if("%t%" == "hades9"){i = 9; j = 5;}</Command>
    <Command>terrainSetType(j);</Command>
    <Command>terrainSetSubtype(i);</Command>
    <Command>trackInsert();</Command>
    <Command>trackEditWaypoint();</Command>
    <Command>trackAddWaypoint();</Command>
    <Command>trackEditWaypoint();</Command>
    <Command>trQuestVarSet("zzzza", trQuestVarGet("%mapQV%x"+1*trQuestVarGet("fakecount")));</Command>
    <Command>trQuestVarSet("zzzzb", 0);</Command>
    <Command>trQuestVarSet("zzzzc", trQuestVarGet("%mapQV%z"+1*trQuestVarGet("fakecount")));</Command>
    <Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzza"),trQuestVarGet("zzzzb"),trQuestVarGet("zzzzc")), vector(0.0,-1.0,-0.0), vector(0.0,-0.0,1.0), vector(1.0,0.0,0.0));</Command>
    <Command>uiPaintTerrainOverlay(0);</Command>
    <Command>trackInsert();</Command>
    <Command>trackEditWaypoint();</Command>
    <Command>trackAddWaypoint();</Command>
    <Command>trackEditWaypoint();</Command>
    <Command>trackPlay(10000,-1);</Command>
    <Command>}</Command>
    <Command>if(trQuestVarGet("zzzz") == 2){</Command>
    <Command>uiPaintTerrainOverlay(1);</Command>
    <Command>editMode("none");</Command>
    <Command>subModeLeave("Simulation", "Editor");</Command>
    <Command>trackRemove();</Command>
    <Command>trackPlay(1,-1);</Command>
    <Command>configToggle("cameraMovementLock");</Command>
    <Command>map("mouse2down","earthquake","editmode(\"none\")");</Command>
    <Command>map("mouse1down","earthquake","editmode(\"none\")");</Command>
    <Command>trQuestVarSet("zzzz",0);</Command>
    <Command>}</Command>
    <Command>if(trQuestVarGet("zzzz") != 0){</Command>
    <Command>trDelayedRuleActivation("_%v%");</Command>
    <Command>}</Command>
    <Command>trQuestVarSet("fakecount", trQuestVarGet("fakecount") - 1);}</Command>
    </Effect>

    i mean my trigger still work with this in there, just nothing happens when it's supposed to go off

    [This message has been edited by Ghostoo (edited 03-04-2012 @ 07:09 PM).]

    onfiregun17
    Mortal
    posted 04 March 2012 08:26 PM EDT (US)     933 / 1680       
    to my knowledge you can't paint terrain with triggers.

    [This message has been edited by onfiregun17 (edited 03-04-2012 @ 08:34 PM).]

    Zenophobia
    Irrational Fear
    posted 04 March 2012 08:34 PM EDT (US)     934 / 1680       
    Depends on what you're painting. If you're painting terrain, then yes, it's possible.

    [This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
    Ghostoo
    Mortal
    posted 05 March 2012 03:33 AM EDT (US)     935 / 1680       
    @onfire17 no this trigger already work, but i just tried implementing something into it.

    maybe i should add the trigger in which the mapqv and countqv are defined, that'll make helping a lot easier:
    <Effect name="mzzMap Unit path">
    <Param name="SrcObject" dispName="Unit" varType="unit">default</Param>
    <Param name="Var" dispName="Var Name" varType="string">path var</Param>
    <Param name="Varcnt" dispName="counter Var" varType="string">counter var</Param>
    <Command>trQuestVarSet("%Varcnt%", (trQuestVarGet("%Varcnt%")+1));</Command>
    <Command>trQuestVarSet("%Var%x"+1*trQuestVarGet("%Varcnt%"), xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
    <Command>trQuestVarSet("%Var%z"+1*trQuestVarGet("%Varcnt%"), xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
    </Effect>
    Elrich
    Hero
    posted 05 March 2012 09:28 AM EDT (US)     936 / 1680       
    @ghostoo: I'm at work right now (9-5 forum time), so I can't give your question a try right now, but as for what characters need to be CDATA fixed, you will know if there is something invalid at the XML level if when you go into the editor and none of the conditions/effects show up from the XML file with the error in it.

    I used frontpage (just what we have at work) to check your file, but I'm sure there are some XML editors online that check for parser errors in your XML file.

    oh and I answered you in such detail only because you seemed to be someone who could make use of it.

    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
    Ghostoo
    Mortal
    posted 06 March 2012 01:04 AM EDT (US)     937 / 1680       
    if i do a "while (1==1)" will my trigger loop as soon as it is activated? i want a trigger to constantly monitor a unit, but i don't want it to be on a looped always system, so that's why i'm asking
    onfiregun17
    Mortal
    posted 06 March 2012 06:04 PM EDT (US)     938 / 1680       
    yeah, it would but with my experiances it freezes the game. but i would use while(true){}
    Elrich
    Hero
    posted 07 March 2012 03:14 PM EDT (US)     939 / 1680       
    Yes, the way triggers are processed doing that would make AOM get stuck on your trigger forever.

    Like a task list, AOM does its own processing then goes through each of your triggers in the order that they were physically added to the scenario. If the current trigger is active, then it looks further to see if the Condition part is true. If it is true, then it processes the effects. If you have effects with loops, it will not move on until the loop is finished. If you have a while condition that can never be true, it will loop in your trigger infinitely and never move the the rest of the triggers or get its chance to do its work and will give the appearance that it is locked up (even though it is actually forever looping in your while statement).

    You are worried about a trigger being checked often enough. The best thing to do is to make this trigger the highest priority possible and set other triggers that don't have to react so quickly to lower priorities. High priority triggers are checked every time AOM goes through the trigger list. Lower priority triggers are skipped at intervals - like they run every 2nd, 3rd, 4th pass on the trigger list.

    This is the best you can do. If you are finding that your looping trigger doesn't react fast enough, you might want to use my disable looping trigger. This is useful when you have looping triggers in your scenario that are no longer needed. Depending on what order you created your triggers, it is likely that when you disable a looping trigger, that it actually doesn't get disabled.

    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
    nottud
    Hero
    posted 08 March 2012 10:16 PM EDT (US)     940 / 1680       
    @Ghostoo - that paint terrain trigger of mine is messymessymessy... It might not behave in the way you might possibly expect when you use it - note that it s designed to be in its own trigger and fire evented when you want to use it. The trigger then runs multiple times to execute the full effect. (As it is not possibly to do it all in one go due to a delay being required between certain steps which I cannot do without)

    Basically I advise caution if you are planning to edit it.

    The boy with the mad imagination
    Prepare for the ultimate duel!
    Learn to use all my triggers and what you can do with them. Visit here.
    Find out and download the transform trigger here.
    Play some minigames I have created outside AOM including some 3D games here.

    [This message has been edited by nottud (edited 03-08-2012 @ 10:17 PM).]

    Ghostoo
    Mortal
    posted 09 March 2012 01:04 AM EDT (US)     941 / 1680       
    well Nottud, i did get it to work but it's as you say messymessymessy. because of the way you did this (which is far beyond what i would even try to think of) it can only be executed once per instance (which i'm sure you know), so i can't have a while or for statement to have it paint a series of areas of land. I can, however, have it paint multiple areas with multiple of the trigger... which isn't very practical. i'm going to play with it a bit i think i know where i can get it so it'll loop the paint effect on multiple areas.. i'll get back with results
    Hammerhands
    Mortal
    posted 09 March 2012 07:40 PM EDT (US)     942 / 1680       
    Can I get a unit selected player condition?
    I want to be able to select a unit (any) and have a choice dialogue pop up.
    But I also want to be able to choose which player this works on. Any unit of a player.
    onfiregun17
    Mortal
    posted 13 March 2012 00:57 AM EDT (US)     943 / 1680       
    made the custom condition for you:

    <Condition name="Player Selected Unit">
    <Param name="Player" dispName="Player" VarType="string">1</Param>
    <Param name="SrcObject" dispName="$$22314$$Source Unit" VarType="unit">default</Param>
    <Command>int result=0;</Command>
    <Command>trUnitSelectClear();</Command>
    <Command>trUnitSelect("%SrcObject%");</Command>
    <Command>if(trUnitIsOwnedBy(%Player%)){ result=1;}</Command>
    <Expression>result==1</Expression>
    </Condition>
    use this condition and then your choice dialog effect and you should be good to go.
    TAG
    That AoM Guy
    (id: aom expert)
    posted 13 March 2012 08:13 AM EDT (US)     944 / 1680       
    Would this cause oos?

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    perpetual_n00b
    Immortal
    posted 13 March 2012 11:30 AM EDT (US)     945 / 1680       
    @ onfiregun17
    That only seems to check if a unit is owned by a player and not if it has been selected, so it's basically the Units Owned condition with some unnecessary code.

    @ Hammerhands
    Try these conditions I made, I think are what you are after.

    The first one just checks if the player you enter has selected the unit (regardless of ownership), the second one checks if the entered player has selected the unit and owns it too.

    <Condition name="Unit Selected By Player">
    <Param name="SrcObject" dispName="$$22314$$Source Unit" VarType="unit">default</Param>
    <Param name="Player" dispName="$$22301$$Player" varType="string">1</Param>
    <Command>trUnitSelectClear();</Command>
    <Command>trUnitSelect("%SrcObject%");</Command>
    <Expression><![CDATA[trUnitIsSelected() && (trCurrentPlayer() == %Player%)]]></Expression>
    </Condition>

    <Condition name="Unit Selected By Player Owner">
    <Param name="SrcObject" dispName="$$22314$$Source Unit" VarType="unit">default</Param>
    <Param name="Player" dispName="$$22301$$Player" varType="string">1</Param>
    <Command>trUnitSelectClear();</Command>
    <Command>trUnitSelect("%SrcObject%");</Command>
    <Expression><![CDATA[trUnitIsSelected() && (trCurrentPlayer() == %Player%) && trUnitIsOwnedBy(%Player%)]]></Expression>
    </Condition>

    @ The AoM Expert
    The conditions in and of themselves shouldn't cause OOS. As with all triggers that only fire for a particular player it just depends on what effects you use. Deploy and Move effects auto-sync so they are ok and you can always have the effect of a for player trigger be to deploy or move a unit and then have a separate trigger for all players that checks for this.

    [This message has been edited by perpetual_n00b (edited 03-13-2012 @ 11:30 AM).]

    Hammerhands
    Mortal
    posted 14 March 2012 10:16 AM EDT (US)     946 / 1680       
    Thanks guys, but I guess I'll have to tell you what I want to do with it...
    I have a character... and in the story he will be promoted to 'sheriff' .The player, with this character will be able to select a person and a choice dialogue will pop up that asks 'arrest this person? Yes/no' But I can't have this for every player. I want the 'Player' (the guy playing) to be able to arrest all player two units.

    So... I need to be able to choose which player this affects, rather than which player it works for.

    I need player one to be able to use it, but to be able to choose which player's units fulfill the condition when selected.

    Make sense? Sorry I didn't explain it better in my last post... I was a bit rushed.

    [This message has been edited by Hammerhands (edited 03-14-2012 @ 10:19 AM).]

    perpetual_n00b
    Immortal
    posted 14 March 2012 10:48 AM EDT (US)     947 / 1680       
    Ah, ok. You could use v triggers to search for units of a particular player and use v Conditional Unit Selected and then display a choice dialogue. The tricky part would be how to do stuff to the unit after the choice dialogue. What I would do is when a player 2 unit is selected, I'd convert the unit to an unused player e.g. player 12, and make it the same colour as player 2. If you arrest them, then you do stuff to all player 12 units (should only be one found), if you don't arrest them then you convert all player 12 units back to player 2.

    If you want to do it for each individual unit, you can use the conditions Unit Selected and Units Owned together or this condition which just combines the two into one:

    <Condition name="Unit Selected Owned By Player">
    <Param name="SrcObject" dispName="$$22314$$Source Unit" VarType="unit">default</Param>
    <Param name="Player" dispName="$$22301$$Player" varType="string">1</Param>
    <Command>trUnitSelectClear();</Command>
    <Command>trUnitSelect("%SrcObject%");</Command>
    <Expression><![CDATA[trUnitIsSelected() && trUnitIsOwnedBy(%Player%)]]></Expression>
    </Condition>
    Hammerhands
    Mortal
    posted 14 March 2012 02:40 PM EDT (US)     948 / 1680       
    Sounds a tad complex... but thanks. I'll see if I can make that work.
    Jondoom
    Mortal
    posted 20 March 2012 08:27 PM EDT (US)     949 / 1680       
    Hey can someone pleeease tell me how to fire a trigger after a music filename? New trigger anyone?

    -> Age of Monster Hunters finally released! <-
    ~ Best RPG of the year 2010... ~
    ~- Brave Sword - Improved Version -~
    My first project:
    Advanced Rain Guide
    -Member of Paradox Desing Studios-

    [This message has been edited by Jondoom (edited 03-20-2012 @ 08:29 PM).]

    Lewonas
    Mortal
    posted 21 March 2012 03:11 PM EDT (US)     950 / 1680       
    EDIT: Nevermind, I found and easily fixed the n00b problem. >.<

    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 03-21-2012 @ 05:18 PM).]

    « Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 36 37 38 39 40 ··· 50 ··· 60 ··· 68  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Mythology Heaven | HeavenGames