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

Scenario Design
Moderated by Yeebaagooon, TAG, nottud

Hop to:    
Welcome! You are not logged in. Please Login or Register.1680 replies, Sticky
Age of Mythology Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
Bottom
Topic Subject:Have a Trigger Request? Post it here!
« Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 56 57 58 59 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:
    Ghostoo
    Mortal
    posted 02 January 2015 05:49 AM EDT (US)     1426 / 1680       
    Added in some much needed grammar adjustments to make what I was saying a bit easier to read

    Voolohmay? Kahlos.
    Barnack
    Mortal
    posted 18 January 2015 06:04 AM EDT (US)     1427 / 1680       
    Oh, first hello guys, hope you haven't forgot me
    Expecially Perpetual Noob
    Modify protox string
    The idea:
    The idea is to make a trigger that temporary adds or modifyes informations to the protox while in scenario.
    For example add a string to an existing object datas (like adda tech or a create unit to a building);
    By this way many things that could be done only with little mods to the game, will be done using triggers, and then scenarios that should work only installing a mod, can be done using triggers. That means it would be possible to create a multiplayer scenario with modded units without requiring all players to install a mod

    EDIT:
    Option 1:
    nottud is becoming crazy looking for a way to do that
    Option 2:
    it's so impossible that ppl don't even answer
    Option 2:
    forum is completely dead

    [This message has been edited by Barnack (edited 01-25-2015 @ 05:47 AM).]

    scragins
    Heretic of December
    posted 31 January 2015 08:07 AM EDT (US)     1428 / 1680       
    If you have recently read the question thread you may know I am having some issues that I believe to be the result of y-triggers. I am not entirely sure this is the problem as it does not occur when ever the effect is fired and the game crashes when the y-trigger is fired but no result found so the effect in question does not fire but...

    <Effect name="yTeleport Units to unit ONLINE Inverted">
    <!--Made with nottud-->
    <Param name="Note" dispName="Read this" varType="string">Use the Well of Urd for teleport units like titans</Param>
    <Param name="garrison" dispName="Garrison Unit Type" varType="protounit">Roc</Param>
    <Param name="SrcObject2" dispName="Teleported unit" varType="unit">default</Param>
    <Param name="qv" dispName="Same var as start" VarType="string">cow</Param>
    <Command>for(h = 0; > 1){}</Command>
    <Command>h = kbGetUnitBaseTypeID(kbGetBlockID(""+1*trQuestVarGet("%qv%")));</Command>
    <Command>trUnitSelectClear();</Command>
    <Command>trUnitSelect(""+1*trQuestVarGet("%qv%"));</Command>
    <Command>trUnitChangeProtoUnit("%garrison%");</Command>
    <Command>trUnitSelectClear();</Command>
    <Command>trUnitSelect("%SrcObject2%");</Command>
    <Command>trBlockAllSounds(true);</Command>
    <Command>trImmediateUnitGarrison(""+1*trQuestVarGet("%qv%"));</Command>
    <Command>trUnblockAllSounds();</Command>
    <Command>trUnitSelectClear();</Command>
    <Command>trUnitSelect(""+1*trQuestVarGet("%qv%"));</Command>
    <Command>trUnitChangeProtoUnit(""+kbGetProtoUnitName(h));</Command>
    </Effect>

    The trigger is from the CASTWRCT pack, I think it was written by Losty (with some help from nottud). I noticed there is no command to ungarrison the the unit would this cause any problems?
    nottud
    Hero
    posted 02 February 2015 07:43 AM EDT (US)     1429 / 1680       
    Change type boots out garrisoned units so no ungarrison command required.
    pBiggZ
    Mortal
    (id: P_J_B)
    posted 03 February 2015 11:48 AM EDT (US)     1430 / 1680       
    Oh, first hello guys, hope you haven't forgot me
    Expecially Perpetual Noob
    Modify protox string
    The idea:
    The idea is to make a trigger that temporary adds or modifyes informations to the protox while in scenario.
    For example add a string to an existing object datas (like adda tech or a create unit to a building);
    By this way many things that could be done only with little mods to the game, will be done using triggers, and then scenarios that should work only installing a mod, can be done using triggers. That means it would be possible to create a multiplayer scenario with modded units without requiring all players to install a mod

    EDIT:
    Option 1:
    nottud is becoming crazy looking for a way to do that
    Option 2:
    it's so impossible that ppl don't even answer
    Option 2:
    forum is completely dead
    sounds like a protox shader?
    Similar algorithms are used in modern OpenGL, but I am not sure you could modify the Protox AT runtime, I think you'd have to restart the game for the changes to compile properly.

    Seriously though, someone look into this! Compiling small mods the way you write simple Shader programs, then binding and unbinding at will could potentially remove most, if not all of the limitations that the editor still has! All that'd be left is the engine limitations themselves! Just make sure you unbind at the end or you **** up their game.

    You would however, have to include changes in a manner in which custom units for example, could be generated by your shader, because typically the game will look for a custom asset, an OBJ file and accompanying texture, and if its not there it can't possibly load the file. If you somehow included that data IN the shader which you'd presumably write in the dialogue box of a trigger, you could overcome that issue, but writing out a whole OBJ complete with vertices, UVs, and Normals would kind of suck.

    "I NED MOAR RANGE" Pubby8

    [This message has been edited by P_J_B (edited 02-03-2015 @ 12:12 PM).]

    Hammerhands
    Mortal
    posted 03 February 2015 09:32 PM EDT (US)     1431 / 1680       
    Got me some issues... My QV's aren't changing... and my day/night cycle is acting funny, almost as if the night to dawn goes to the default light setting before going to dawn and then day.


    Weird
    Weird
    Weird
    Hammerhands
    Mortal
    posted 04 February 2015 07:47 AM EDT (US)     1432 / 1680       
    Oh, I so posted this in the wrong spot. Must've been the mulled wine mulling my sense... Didn't think I had that much...
    awon12
    Mortal
    posted 14 February 2015 12:12 PM EDT (US)     1433 / 1680       
    Hey guys I search the command:QV Set Stat Value.
    And I need a new trigger which has got this command.

    Thx for reading
    nottud
    Hero
    posted 14 February 2015 09:45 PM EDT (US)     1434 / 1680       
    It is in a custom trigger pack. (Reyks) I added to it a load of my own and released a trigger pack of it on the downloads.
    EXOLAR
    Mortal
    posted 25 February 2015 04:33 AM EDT (US)     1435 / 1680       
    Hey guys, I'm back to editing some of my old survivals.
    I want to randomise 18 shops (map has up to 10 human players) with the least amount of triggers possible.

    My solution: Use MP US unit randomised setup to give the shop source units variables then use "MP US shop for all players improved with max buys" which does not exist yet.

    Ideally, I'd want to remove the source object and replaceit with a MP US variable, I can't really figure out a good way to manipulate the effects to create that effect. I would appreciate it if someone could do that .

    I want the center unit line of code to be replaced with this and work.

    <Param name="QV" dispName="Same Var as start" VarType="string">MPUS</Param>

    Heres the effect I want modified.

    <Effect name="shop for all players improved with max buys">
    <Param name="SrcObject" dispName="Center Unit" varType="unit">default</Param>
    <Param name="Dst" dispName="Radius" varType="string">10.0</Param>
    <Param name="type" dispName="Unit Type ID" varType="string">801</Param>
    <Param name="cap" dispName="lowest,highest player" varType="string">1,4</Param>
    <Param name="Resource" dispName="$$22324$$Resource" VarType="resource">food</Param>
    <Param name="amount" dispName="amount needed" VarType="string">10</Param>
    <Param name="max" dispName="max buys" VarType="string">10</Param>
    <Command>if(kbGetUnitBaseTypeID(kbGetBlockID("%SrcObject%")) != -1){</Command>
    <Command>for(id = 0; > 1){}</Command>
    <Command>for(count = 0; > 1){}</Command>
    <Command>xsSetContextPlayer(0);</Command>
    <Command>kbLookAtAllUnitsOnMap();</Command>
    <Command><![CDATA[for(playerid = 1*xsVectorGetX(vector(Ęp%,0)); <= 1*xsVectorGetY(vector(Ęp%,0))){]]></Command>
    <Command>trQuestVarSet("i", playerid);</Command>
    <Command>id = kbUnitQueryCreate("shop"+playerid);</Command>
    <Command>kbUnitQuerySetPlayerID(id, playerid);</Command>
    <Command>kbUnitQuerySetState(id, 2);</Command>
    <Command>kbUnitQuerySetPosition(id, kbGetBlockPosition("%SrcObject%"));</Command>
    <Command>kbUnitQuerySetMaximumDistance(id, %Dst%);</Command>
    <Command>kbUnitQuerySetUnitType(id, %type%);</Command>
    <Command>kbUnitQuerySetAscendingSort(id, true);</Command>
    <Command>count = kbUnitQueryExecute(id);</Command>
    <Command><![CDATA[for(counterz = 0; < count){]]></Command>
    <Command><![CDATA[if((trPlayerResourceCount(playerid, "%Resource%") >= %amount%) && (trQuestVarGet("zzzCowslike%amount%and%SrcObject%and"+playerid) < %max%)){]]></Command>
    <Command>trPlayerGrantResources(playerid, "%Resource%", -%amount%);</Command>
    <Command>trQuestVarSet("zzzCowslike%amount%and%SrcObject%and"+playerid,trQuestVarGet("zzzCowslike%amount%and%SrcObject%and"+playerid) + 1);</Command>
    </Effect>

    Can someone also make MP QV Set as cost of last building killed, I tried renaming LastUnitCost to LastBuildingCost but it didn't work.

    <Effect name="MP QV Set as cost of last unit killed">
    <Param name="QV" dispName="$$23952$$Var Name" VarType="string">LastUnitCost</Param>
    <Command>if(trGetStatValue(mp, 4)>trQuestVarGet("%QV%%QV%%QV%%QV%%QV%%QV%%QV%"+mp)){trQuestVarSet("%QV%%QV%%QV%"+mp, trGetStatValue(mp, 4)-trQuestVarGet("%QV%%QV%%QV%%QV%%QV%%QV%%QV%"+mp));</Command>
    <Command>trQuestVarSet("%QV%%QV%%QV%%QV%%QV%%QV%%QV%"+mp, trGetStatValue(mp, 4));</Command>
    <Command>trQuestVarSet("%QV%"+mp, trQuestVarGet("%QV%%QV%%QV%"+mp));}</Command>
    </Effect>

    Thanks in advance.

    [This message has been edited by EXOLAR (edited 03-02-2015 @ 08:47 AM).]

    scragins
    Heretic of December
    posted 01 March 2015 06:57 AM EDT (US)     1436 / 1680       
    Sorry for the late reply I just thought of a possible solution that uses as few as 3 triggers per shop.

    You randomize the positions of the shop by making them units such as villagers then garrisoning them inside a roc (which could have big speed), which you have fly to a random location. Ungarrison and change the villagers to the desired unit for the shop. Then simply use your regular shop triggers so the shop works.
    EXOLAR
    Mortal
    posted 02 March 2015 08:45 AM EDT (US)     1437 / 1680       
    I figured out the best way to set team victory conditions for teams of 2,3,4 and 5 (for 2-10 players). If anyone's interested its used in hunter survival v2-4-0 in the trigger mp_Vic

    I've customised a few trigger effects and was wondering why my set player defeated player range works (can set players 1-12 as defeated) but my set player won player range doesn't? I only changed the setplayerdefeated command to setplayerwon.

    I still haven't resolved the last enemy building killed cost issue yet.

    edit: Thanks for the advice,I used a total of 14 effects to randomize 20 shops

    I have a new problem- some shops deploy units; I need to alter the army deploy point to a QV so I can correctly change where the units deploy when the shop is moved to different locations. I tried making this but it didn't work.

    <Effect name="shop Army Deploy at QV point">
    <Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
    <Param name="L1" dispName="metres x" varType="string">sx1</Param>
    <Param name="L2" dispName="metres z" varType="string">sz1</Param>
    <Param name="Count" dispName="$$22435$$Count" varType="long">0</Param>
    <Param name="Clear" dispName="$$22464$$Clear Existing Units:" varType="bool">true</Param>
    <Param name="Heading" dispName="$$22432$$Heading" varType="long">0</Param>
    <Command>trArmyDispatch(1*trQuestVarGet("i")+",0", %ProtoName%", %Count%, trQuestVarGet("%L1%"),0,trQuestVarGet("%L2%"), %Heading%, %Clear%);</Command>
    </Effect>

    The original is effects are here:

    <Effect name="QV Army Deploy in QV area">
    <Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
    <Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
    <Param name="L1" dispName="metres x" varType="string">QV1</Param>
    <Param name="L2" dispName="metres z" varType="string">QV2</Param>
    <Param name="QV" dispName="$$22435$$Count" varType="string">QV1</Param>
    <Param name="Heading" dispName="$$22432$$Heading" varType="long">0</Param>
    <Param name="Clear" dispName="$$22464$$Clear Existing Units:" varType="bool">true</Param>
    <Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", trQuestVarGet("%QV%"), trQuestVarGet("%L1%"),0,trQuestVarGet("%L2%"), %Heading%, %Clear%);</Command>
    </Effect>

    <Effect name="shop Army Deploy2">
    <Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
    <Param name="Location" dispName="" varType="area">0,0,0</Param>
    <Param name="Count" dispName="$$22435$$Count" varType="long">0</Param>
    <Param name="Heading" dispName="$$22432$$Heading" varType="long">0</Param>
    <Param name="Clear" dispName="$$22464$$Clear Existing Units:" varType="bool">true</Param>
    <Command>trArmyDispatch(1*trQuestVarGet("i")+",0", "%ProtoName%", %Count%, %Location%, %Heading%, %Clear%);</Command>
    </Effect>

    [This message has been edited by EXOLAR (edited 03-02-2015 @ 11:53 PM).]

    pBiggZ
    Mortal
    (id: P_J_B)
    posted 10 March 2015 03:51 PM EDT (US)     1438 / 1680       
    are there any good triggers out there that will reliably create/deploy units/effects at a random spot within a certain radius to a center point? My army deploy near unit doesn't seem to want to work anymore on certain maps so im wondering if there are alternatives/if someone can write something slightly different that might sidestep the trigger issues im having.

    Also, is there a trigger that reliably deploys x units equally distributed on a line between 2 points? I remember seeing some stuff like that years ago now but have no idea where it might have vanished to.

    Also, as it stands, modify protounit takes into account the original stats of the unit. (i.e. +100 hp will add 100 hp to whatever it already had). Is there a trigger i can fire at the beginning of the game that will set all stats for all units to a flat number (i.e. normalize everything to 1 so i can easily control balance on my own terms)? if not can someone write it for me?

    "I NED MOAR RANGE" Pubby8

    [This message has been edited by P_J_B (edited 03-10-2015 @ 03:53 PM).]

    Lewonas
    Mortal
    posted 11 March 2015 03:25 PM EDT (US)     1439 / 1680       
    @EXOLAR: I don't really like how that army parameter of the trArmyDispatch command is filled in, but it should work as it is now. You're using the shop for all players start and shop for all players end effect as well, right? If so, you can try this effect:


    <Effect name="shop Army Deploy at QV point">
    <Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
    <Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
    <Param name="L1" dispName="metres x" varType="string">QV1</Param>
    <Param name="L2" dispName="metres z" varType="string">QV2</Param>
    <Param name="Count" dispName="Count" varType="string">0</Param>
    <Param name="Heading" dispName="$$22432$$Heading" varType="long">0</Param>
    <Param name="Clear" dispName="$$22464$$Clear Existing Units:" varType="bool">true</Param>
    <Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", %Count%, trQuestVarGet("%L1%"),0,trQuestVarGet("%L2%"), %Heading%, %Clear%);</Command>
    <Command>trArmySelect("%SrcArmy%");</Command>
    <Command>trUnitConvert(1*trQuestVarGet("i"));</Command>
    </Effect>

    @P_J_B: About the modify protounit, sadly, there isn't a command in the game that retrieves the protounit's stats. You'll have to search for those stats manually and modify all the units one by one, stat by stat. It's very easy to create such an effect, but it's a big timesink. Have fun with that.

    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-11-2015 @ 03:27 PM).]

    nottud
    Hero
    posted 12 March 2015 08:32 AM EDT (US)     1440 / 1680       
    P_J_B: Tricky as HP can change too. Best way which I did is go through protox and strip out the HP information and turn it into a trigger.
    scragins
    Heretic of December
    posted 13 March 2015 09:36 AM EDT (US)     1441 / 1680       
    In my trigger pack I think there are some triggers that can set the costs of units to a certain value. I think it works even if they have been edited by modify protounit.
    pBiggZ
    Mortal
    (id: P_J_B)
    posted 13 March 2015 01:50 PM EDT (US)     1442 / 1680       
    yeah costs wouldn't help, i need to alter the unit hitpoints, and indexing the protox doesn't sound like a lot of fun, especially given the number of units in this game.

    "I NED MOAR RANGE" Pubby8
    EXOLAR
    Mortal
    posted 16 March 2015 12:48 PM EDT (US)     1443 / 1680       
    @Lewonas: Thank you so much!

    If possible, I'd also like this effect to work. MP QV Set as cost of last building killed, I tried renaming LastUnitCost to LastBuildingCost but it didn't work.

    <Effect name="MP QV Set as cost of last unit killed">
    <Param name="QV" dispName="$$23952$$Var Name" VarType="string">LastUnitCost</Param>
    <Command>if(trGetStatValue(mp, 4)>trQuestVarGet("%QV%%QV%%QV%%QV%%QV%%QV%%QV%"+mp)){trQuestVarSet("%QV%%QV%%QV%"+mp, trGetStatValue(mp, 4)-trQuestVarGet("%QV%%QV%%QV%%QV%%QV%%QV%%QV%"+mp));</Command>
    <Command>trQuestVarSet("%QV%%QV%%QV%%QV%%QV%%QV%%QV%"+mp, trGetStatValue(mp, 4));</Command>
    <Command>trQuestVarSet("%QV%"+mp, trQuestVarGet("%QV%%QV%%QV%"+mp));}</Command>
    </Effect>

    And don't worry about the mp VS trigger; I don't need it anymore

    [This message has been edited by EXOLAR (edited 03-18-2015 @ 04:53 AM).]

    nottud
    Hero
    posted 19 March 2015 08:29 AM EDT (US)     1444 / 1680       
    Regards the older question about deploy near point use kbBlockGetPosition (Can't remember exact name) to get the position and give it the unit name, not ID. This should solve your problem.
    Lewonas
    Mortal
    posted 19 March 2015 02:09 PM EDT (US)     1445 / 1680       
    @EXOLAR:

    <Effect name="MP QV Set as cost of last stat value">
    <Param name="QV" dispName="$$23952$$Var Name" VarType="string">LastStatValue</Param>
    <Param name="StatID" dispName="$$23856$$Stat Type" VarType="kbstat">0</Param>
    <Command>if(trGetStatValue(mp, %StatID%)>trQuestVarGet("%QV%%QV%%QV%%QV%%QV%%QV%%QV%"+mp)) {</Command>
    <Command>trQuestVarSet("%QV%%QV%%QV%"+mp, trGetStatValue(mp, %StatID%)-trQuestVarGet("%QV%%QV%%QV%%QV%%QV%%QV%%QV%"+mp));</Command>
    <Command>trQuestVarSet("%QV%%QV%%QV%%QV%%QV%%QV%%QV%"+mp, trGetStatValue(mp, %StatID%));</Command>
    <Command>trQuestVarSet("%QV%"+mp, trQuestVarGet("%QV%%QV%%QV%"+mp));</Command>
    <Command>}</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%]

    [This message has been edited by Lewonas (edited 03-19-2015 @ 02:11 PM).]

    TAG
    That AoM Guy
    (id: aom expert)
    posted 21 March 2015 11:03 PM EDT (US)     1446 / 1680       
    could I have a "disable trigger" effect with a drop-down list instead of a text line?

    thanks

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    scragins
    Heretic of December
    posted 21 March 2015 11:23 PM EDT (US)     1447 / 1680       
    I think I tried it once and it doesn't work. It may be possible but is more difficult than simply changing the type of parameter.
    Milkman Matty
    Mortal
    (id: Khan And Steak)
    posted 25 March 2015 07:31 PM EDT (US)     1448 / 1680       
    You can do it, it just won't work unless you name all of your triggers numbers - starting from 0 and counting upwards. Not very practical, but it'll work ~ Milky

    <||=================================||>
    Proud Member of Forgotten Empires
    96Reviews KaS Dota2 Halo 5 Reach
    { "Work until your idols become your rivals" }
    ༼ つ ◕_◕ ༽つ trGetUnitScenarioName(); ༼ つ ◕_◕ ༽つ
    nottud
    Hero
    posted 30 March 2015 07:40 AM EDT (US)     1449 / 1680       
    Fire event uses an event handler mechanism that is automatically generate on trigger load you would need a similar system for your disabling which to be honest would be more trouble than is worth as you would need to generate it yourself. (Though not impossible)

    Reminds me to release my procedure triggers. (Mechanism allowing other triggers to handle pieces of code) Think of it like fire event except the code in the trigger being called is immediately execcuted before the trigger caller continues. (Think of subroutines in programming)
    pBiggZ
    Mortal
    (id: P_J_B)
    posted 30 March 2015 07:26 PM EDT (US)     1450 / 1680       
    So you could create your own triggers in game rather than have to write them and paste them into the trigger file?

    I liek that.

    "I NED MOAR RANGE" Pubby8
    « Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 56 57 58 59 60 ··· 68  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Mythology Heaven | HeavenGames