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

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Have a Trigger Request? Post it here!
« Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 36 37 38 39 40 ··· 50 ··· 60 ··· 70 ··· 80 ··· 90 ··· 100 ··· 101  Next Page »
posted 01 February 2009 11:53 AM EDT (US)   
So you have a question trigger request?

You can post it here!



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



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

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

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

    Notes:

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


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

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

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

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


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

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



Resources

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

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




Posting a Request

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

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

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

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




Unfinished Requests

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

  • Finished Requests

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

  • Enjoy.
    Last updated: 03 september 2009

    If we knew what it was we were doing, it would not be called research, would it? - Einstein, A.
    Master XS - AoM Code Reference - Trigger Loader - Trigger Requests - Chess

    Wow, I never thought that I would actually know something before nottud did... it's actually not all that satisfying ~ Steak

    [This message has been edited by Mythic_Freak (edited 01-16-2010 @ 08:01 AM).]

    Replies:
    posted 22 September 2009 02:53 PM EDT (US)     926 / 2506  
    Oh, don't worry. It stands for Confederacy for Abolish the Simple Triggers so We Can Redo Them.

    castwcrt rip 2010-2010
    posted 22 September 2009 02:56 PM EDT (US)     927 / 2506  
    No Topic for me since i can redo ~95% of the existing ones... too bad


    ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
    Trigger Freak and Modder for AOE3

    SCP Editor Tools---my map pack---Some incomplete stuff
    My trigger Pack

    [This message has been edited by Mister SCP (edited 09-22-2009 @ 02:57 PM).]

    posted 22 September 2009 03:00 PM EDT (US)     928 / 2506  
    Nice trigger! What did you do to learn triggers Mister SCP?
    I guess you might just have programming knowledge, but still...

    ~Guard of Olympus ~
    _______________________________________
    Jag ser mot solen och tankarna de för mig hem till AomH SD igen
    Learn how to create a website from scratch!
    _______________________________________
    Dark Times|My work (4.6)|Teaser #2
    posted 22 September 2009 03:14 PM EDT (US)     929 / 2506  
    I'm working on a trigger, which probably won't work. Anyway, will post here after checking what it does.

    castwcrt rip 2010-2010
    posted 22 September 2009 03:25 PM EDT (US)     930 / 2506  
    Here's a trigger that I made for Steak and Khan (See the list). It works rather good but one thing doesn't work... Any idea what? I'm asking the members of CASTWRCT. I'm going to keep trying on this one, since it's nearly finished:


    <Effect name="Damage units in Area by percent">
    <Param name="SrcObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
    <Param name="Player" dispName="$$22301$$Player" VarType="player">1</Param>
    <Param name="UnitType" dispName="$$22302$$Unit Type" VarType="string">Unit</Param>
    <Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
    <Param name="Damage" dispName="$$23762$$Damage" varType="float">50</Param>
    <Command>trUnitSelectClear();</Command>
    <Command loop="" loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command>
    <Command>trDamageUnitsInArea(%Player%,"%UnitType%",%Dist%,Úmage%);</Command>
    <Param name="DamagePct" dispName="$$23761$$DamagePct" varType="float">50</Param>
    <Command>trUnitSelectClear();</Command>
    <Command loop="" loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command>
    <Command>trDamageUnitPercent(ÚmagePct%);</Command>
    </Effect>

    ~Guard of Olympus ~
    _______________________________________
    Jag ser mot solen och tankarna de för mig hem till AomH SD igen
    Learn how to create a website from scratch!
    _______________________________________
    Dark Times|My work (4.6)|Teaser #2
    posted 22 September 2009 03:38 PM EDT (US)     931 / 2506  
    Post number 100

    I have no idea. Maybe lostrozzacavalli knows?

    castwcrt rip 2010-2010
    posted 22 September 2009 03:46 PM EDT (US)     932 / 2506  
    Ah!!! Your post count is going crazy...

    I hope he knows, cause I'm not getting it to work... I wish there was a list of all commands in the game...

    ~Guard of Olympus ~
    _______________________________________
    Jag ser mot solen och tankarna de för mig hem till AomH SD igen
    Learn how to create a website from scratch!
    _______________________________________
    Dark Times|My work (4.6)|Teaser #2

    [This message has been edited by Guard of Olympus (edited 09-22-2009 @ 03:47 PM).]

    posted 22 September 2009 03:53 PM EDT (US)     933 / 2506  
    There's a list of some of them in the guide...

    castwcrt rip 2010-2010
    posted 22 September 2009 04:03 PM EDT (US)     934 / 2506  
    Not all of them I belive...

    ~Guard of Olympus ~
    _______________________________________
    Jag ser mot solen och tankarna de för mig hem till AomH SD igen
    Learn how to create a website from scratch!
    _______________________________________
    Dark Times|My work (4.6)|Teaser #2
    posted 22 September 2009 04:09 PM EDT (US)     935 / 2506  
    I finished my trigger, but it doesn't work. I still have the code for the trigger, and I will work on it again tomorrow. What happened was my trigger corrupted everything so I didn't have any effects or conditions. However, I solved that problem, and I'm calling it a day and working on it tomorrow. Good first day for CASTWRCT!

    castwcrt rip 2010-2010
    posted 22 September 2009 04:10 PM EDT (US)     936 / 2506  
    @G.o.Olympus: it dont work because your last line contains Ùmage instead Damage + you forgot a percent sign before the Ùmage/Damage. But it won't work like you intend that it do. It will first damage units in area and after that it will damage your center unit.
    Condition:
    •Units Not Owned
    Effects
    •Show Tech ID

    •SC Starter (create the correct Explorer) [it's a trigpack for AOE3 keep that in mind]
    •Player Set Postimperial
    •Damage Units in Area P1-4
    •Unforbid Unit P1-4
    •Forbid Unit P1-4
    •Set Tech Status P1-4
    •ModProtounit P1-4
    •Mod All Protounits P1-4
    •Destroy Units in Area
    •Flash Units in Area
    I started with these Area triggers. I notice that in 3 effects just one line changed everytime and i replaced it (kill units in area->flash units in area). After that I stacked a command lines a bit (P1-P4 effects) and then my brother teached me a bit about things like "if,while,else" and the Operators. Also he corrected my faults some times (he is a computer freak^^). SC Starter and Player Set Postimperial probaly were the first usefull triggers i have written.


    ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
    Trigger Freak and Modder for AOE3

    SCP Editor Tools---my map pack---Some incomplete stuff
    My trigger Pack

    [This message has been edited by Mister SCP (edited 09-22-2009 @ 04:14 PM).]

    posted 22 September 2009 04:10 PM EDT (US)     937 / 2506  
    @Osiris|Could you please post the code here???

    ~Guard of Olympus ~
    _______________________________________
    Jag ser mot solen och tankarna de för mig hem till AomH SD igen
    Learn how to create a website from scratch!
    _______________________________________
    Dark Times|My work (4.6)|Teaser #2

    [This message has been edited by Guard of Olympus (edited 09-22-2009 @ 04:16 PM).]

    posted 22 September 2009 04:21 PM EDT (US)     938 / 2506  
    from this area trigger
     <Effect name="Destroy Units in Area">
    <Param name="DstObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
    <Param name="PlayerID" dispName="$$22444$$From Player" VarType="player">1</Param>
    <Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
    <Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
    <Command>for(Qid=0;>1){}</Command>
    <Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>
    <Command>Qid=kbUnitQueryCreate("QDUA_%PlayerID%_%ProtoName%");</Command>
    <Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%, true);</Command>
    <Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%ProtoName%"));</Command>
    <Command>kbUnitQuerySetPosition(Qid, kbGetBlockPosition("%DstObject%"));</Command>
    <Command>kbUnitQuerySetMaximumDistance(Qid, %Dist%);</Command>
    <Command>kbUnitQuerySetAscendingSort(Qid, false);</Command>
    <Command>kbUnitQuerySetState(Qid,2);</Command>
    <Command>trUnitSelectClear();</Command>
    <Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>
    <Command>trUnitSelectByID(kbUnitQueryGetResult(Qid,i));}</Command>
    <Command>trUnitDestroy();</Command>
    </Effect>
    to this area trigger by just change the last line + added new parameter
       <Effect name="DamagePCT Units in Area">
    <Param name="DstObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
    <Param name="PlayerID" dispName="$$22444$$From Player" VarType="player">1</Param>
    <Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
    <Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
    <Param name="Pct" dispName="Damage Percent" varType="string">3</Param>
    <Command>for(Qid=0;>1){}</Command>
    <Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>
    <Command>Qid=kbUnitQueryCreate("QDUA_%PlayerID%_%ProtoName%");</Command>
    <Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%, true);</Command>
    <Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%ProtoName%"));</Command>
    <Command>kbUnitQuerySetPosition(Qid, kbGetBlockPosition("%DstObject%"));</Command>
    <Command>kbUnitQuerySetMaximumDistance(Qid, %Dist%);</Command>
    <Command>kbUnitQuerySetAscendingSort(Qid, false);</Command>
    <Command>kbUnitQuerySetState(Qid,2);</Command>
    <Command>trUnitSelectClear();</Command>
    <Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>
    <Command>trUnitSelectByID(kbUnitQueryGetResult(Qid,i));}</Command>
    <Command>trDamageUnitPercent(%Pct%);</Command>
    </Effect>
    All other lines are just for the unit selection.


    ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
    Trigger Freak and Modder for AOE3

    SCP Editor Tools---my map pack---Some incomplete stuff
    My trigger Pack

    [This message has been edited by Mister SCP (edited 09-22-2009 @ 04:24 PM).]

    posted 22 September 2009 06:37 PM EDT (US)     939 / 2506  
    Try and make player triggers player range where possible - it makes doing triggers for multiple people so much easier...

    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.
    posted 22 September 2009 07:04 PM EDT (US)     940 / 2506  
    Hey both guards, how bout you guys make your own thread for your aofcnwecoi whatever thing. Not being mean.

    I thnik i might have been forgotton PERPETUAL NOOB EMAIL ME!! I DO WANT TO KNOW HOW TO DO LEVELING SYSTEMS. CHECK MY POST A WHILE BACK.

    Tired of unorigional, boring campaigns? Try out DEMO|Legacy - The Uprising|DEMO
    Completely New Gameplay. Random Map Type Replayability. Delve into Nomadican|FEATURES|DOWNLOAD|
    Want to know how to use triggers and/or create amazing factors in your scenarios? You need Combination Effects|FEATURES|DOWNLOAD|
    Automaton Metals Textures, New Custom Triggers
    Upcoming Projects: Legacy - The Uprising, Destiny
    6/12/1997, a day that will live in infamy.
    posted 22 September 2009 10:53 PM EDT (US)     941 / 2506  
    Try and make player triggers player range where possible - it makes doing triggers for multiple people so much easier...
    I just use

    Loop for
    (effect)
    End If/Loop

    so I don't need more effects for player range or not player range.

    Glad to see you guys are enthusiastic about learning.
    Don't be afraid to do what MisterSCP did - take another trigger and change one or two lines to do what you want. The key is finding the right trigger to modify.

    The "[...] units in area" effects from invent00r's proactive triggers are great templates for using unit queries (finding unit IDs in an area based on player/protounit etc.

    Lostrozz, what part of "Teleport to Army" was giving you trouble? Was it finding the coordinates of the army?
    If so, I'll give you a hint (stolen straight out of invent00r's army deploy at army):
    xsVectorGetX(kbArmyGetLocation(xsVectorGetY(vector(%ArmyT%,-1)))),0,xsVectorGetZ(kbArmyGetLocation(xsVectorGetY(vector(%ArmyT%,-1))))
    Here's what each component does
    vector(%ArmyT%,-1)
    Turns the army ID into a vector by adding a -1 at the end, so it is now (Player, Army ID, -1)
    xsVectorGetY(vector(%ArmyT%,-1))))
    Gets the 2nd element of the above vector (Army ID)
    kbArmyGetLocation(xsVectorGetY(vector(%ArmyT%,-1))))
    Gets the location of that Army ID (x, y, z)
    xsVectorGetX(kbArmyGetLocation(xsVectorGetY(vector(%ArmyT%,-1))))
    Gets the first elememnt of the location, so the X position.
    Do that for all 3 elements (y can often be ignored) and teleport to there.

    Because player ID is not mentioned anywhere in there, you need to set context player to the owner of the army before using the kbArmyGetLocation command.

    [edit actually there is an Army Teleport to Army in proactive triggers, that would be an easier trigger to modify
    I hope he knows, cause I'm not getting it to work... I wish there was a list of all commands in the game...
    Mythic Freak's aom code reference! Download it now!

    [This message has been edited by HailToTheOboe (edited 09-22-2009 @ 11:24 PM).]

    posted 22 September 2009 11:33 PM EDT (US)     942 / 2506  
    Name- damage player near protounit
    ***Effect***

    basicly damages all units of a player near a certain protounit

    if this is too much damage units near protounit is fine

    Thanks

    [INSERT SIGNATURE HERE]
    posted 23 September 2009 00:03 AM EDT (US)     943 / 2506  
    Does this work for you?
    Leave the "protounit" parameter blank and it'll do all units.

     <Effect name="Damage Units near Protounit">
    <Param name="DstObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
    <Param name="Radius" dispName="Radius" VarType="string">50</Param>
    <Param name="PlayerID" dispName="$$22444$$From Player" VarType="long">1</Param>
    <Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Unit</Param>
    <Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
    <Param name="zDamage" dispName="Damage" VarType="string">10.0</Param>
    <Command>for(Qid=0;>1){}</Command>
    <Command>for(oldPlayer=xsGetContextPlayer();>99){}</Command>
    <Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>
    <Command>Qid=kbUnitQueryCreate("QDUA_%PlayerID%_%ProtoName%");</Command>
    <Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%, true);</Command>
    <Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%ProtoName%"));</Command>
    <Command>kbUnitQuerySetPosition(Qid, kbGetBlockPosition("%DstObject%"));</Command>
    <Command>kbUnitQuerySetMaximumDistance(Qid, %Radius%);</Command>
    <Command>kbUnitQuerySetAscendingSort(Qid, false);</Command>
    <Command>kbUnitQuerySetState(Qid,2);</Command>
    <Command>trUnitSelectClear();</Command>
    <Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>
    <Command>trUnitSelectByID(kbUnitQueryGetResult(Qid,i));</Command>
    <Command>trDamageUnitsInArea(%PlayerID%,"Unit",%Dist%,%zDamage%);}</Command>
    <Command>xsSetContextPlayer(oldPlayer);</Command>
    </Effect>

    [This message has been edited by HailToTheOboe (edited 09-23-2009 @ 09:45 AM).]

    posted 23 September 2009 02:31 AM EDT (US)     944 / 2506  
    <Condition name=Units on Gaia Lush by Player>
    <Param name="Player" dispName="$$22301$$Player" varType="player">0</Param>
    <Param name="Lush" dispName="$$23478$$Lush:" varType="bool">true</Param>
    <expression>trUnitOnLush(%Lush%,%Player%)</expression>
    </Condition>



    I know it's really short, but I don't know what else to add.

    It's supposed to by "Unit on Gaia Lush by Player"

    castwcrt rip 2010-2010
    posted 23 September 2009 03:05 AM EDT (US)     945 / 2506  
    umm... yeah.
    2 problems

    1. trigger doesnt show up in editor

    2. i want the damage to be around a protounit (eg an arrow) and to effect all units of a certain player

    [INSERT SIGNATURE HERE]
    posted 23 September 2009 05:45 AM EDT (US)     946 / 2506  
    I thnik i might have been forgotton
    No, not forgotten, I just had trouble with my internet connection. I've emailed you the scenarios with the 3 different levelling set ups and some explanation.

    I hope this helps.
    posted 23 September 2009 07:51 AM EDT (US)     947 / 2506  
    @The Guards| Uh, sorry yesterday I fell asleep because (Yes I'm in Italy, you're the first who has understanded this by the name) there we are at +6 respect of americans... so when in America are 4:00 PM in Italy are 10:00 PM...

    @HailToTheOboe| I tried to do "Teleport to army" in this mode:
       <Effect name="Teleport to Army">
    <Param name="SrcObject" dispName="Unit(s)" varType="unit">default</Param>
    <Param name="SrCArmy" dispName="Army" varType="group">default</Param>
    <Command>trQuestVarSet("asdoaodaosdnaod", xsGetContextPlayer());</Command>
    <Command>xsSetContextPlayer(0);</Command>
    <Command>kbLookAtAllUnitsOnMap();</Command>
    <Command>trUnitSelectClear();</Command>
    <Command>loop="" loopParm="SrCObject">trUnitSelect("%SrcObject%");</Command>
    <Command>trUnitTeleport(xsVectorGetX(kbGetBlockPosition(""+1*%SrCArmy%)), xsVectorGetY(kbGetBlockPosition(""+1*%SrCArmy%)), xsVectorGetZ(kbGetBlockPosition(""+1*%SrCArmy%)));</Command>
    <Command>xsSetContextPlayer(trQuestVarGet("asdoaodaosdnaod"));</Command>
    </Effect>


    But anyways for me it's not so clear why add:
          <Command>trQuestVarSet("asdoaodaosdnaod", xsGetContextPlayer());</Command>
    <Command>xsSetContextPlayer(0);</Command>
    And:

          <Command>xsSetContextPlayer(trQuestVarGet("asdoaodaosdnaod"));</Command>
    </font>
    Largely I copied it by the trigger: "Unit teleport to unit", because I'm not so clever to do a similar trigger by 0.

    Utilities || Map Tool 3.1 Inventory Triggers MP Triggers Comic AoM
    RandomMaps || Mad Supremacy Escape Your Mates Escape
    Scenarios || Bomberman Minigames Y 2.0 Convert & Fight
    Games || Bullet Demo Ball Bouncer 3D
    WRP_Beater: "Meglio una gallina oggi che un uovo domani."
    My name has been misspelled 132 times (Last: BSU_DoLhades Best: Lostrozzabercrombie In a row: 5)
    posted 23 September 2009 08:53 AM EDT (US)     948 / 2506  
    It's OK Lostrozzacavalli, good trigger progress anyway.

    I made my first trigger! It's called Tribute Message!

    <Effect name="Tribute Message">
    <Param name="Message" dispName="Chat Message" VarType="stringid">default</Param>
    <Param name="PlayerID" dispName="$$22534$$Fake Player" VarType="player">1</Param>
    <Param name="FromPlayerID" dispName="$$22453$$From Player" varType="player">1</Param>
    <Param name="ToPlayerID" dispName="$$22454$$To Player" varType="player">2</Param>
    <Param name="ResName" dispName="$$22455$$Resource" varType="resource">food</Param>
    <Param name="Amount" dispName="$$22456$$Amount" varType="long">100</Param>
    <Command>trChatSendSpoofed(%PlayerID%, "%Message%");</Command>
    <Command>trPlayerTribute(%FromPlayerID%, "%ResName%", %Amount%, %ToPlayerID%);</Command>
    </Effect>

    castwcrt rip 2010-2010
    posted 23 September 2009 09:05 AM EDT (US)     949 / 2506  
    Lol Tribut Message (basically a chat+message, am I right?)

    About the progresses... yes but that trigger doesn't work

    Utilities || Map Tool 3.1 Inventory Triggers MP Triggers Comic AoM
    RandomMaps || Mad Supremacy Escape Your Mates Escape
    Scenarios || Bomberman Minigames Y 2.0 Convert & Fight
    Games || Bullet Demo Ball Bouncer 3D
    WRP_Beater: "Meglio una gallina oggi che un uovo domani."
    My name has been misspelled 132 times (Last: BSU_DoLhades Best: Lostrozzabercrombie In a row: 5)
    posted 23 September 2009 09:57 AM EDT (US)     950 / 2506  
    1. trigger doesnt show up in editor

    2. i want the damage to be around a protounit (eg an arrow) and to effect all units of a certain player
    1. sorry about that. The forum ate my parameter names, and turned them into funny gibberish like Ú. Try it again now.

    2. This trigger finds all of a certain protounit in an area (you can make it a really big area for the whole map) and does Damage units in Area around each one.
    Unfortunately, the queries won't find arrows, so if you want to do arrows you need to use nottud's ySearch triggers.
    Something along the line of

    yStart Search
    yCondition - is Protounit (arrow)
    yDamage units in area
    yCondition zEnd
    ySearch End

    @Lostrozz
    kbGetBlockPosition(""+1*%SrCArmy%)
    This is the main problem. kbGetBlockPosition finds the position of a "block" by using its unit name (which is a number). When you select a unit as a parameter, "%SrcObject%" is the unit name.

    However, when you select an army as a parameter, "%SrcArmy%" isn't the name, but a vector: (ArmyID, PlayerID).

    If it's player 2's first army, it is (1,2). (actually (10,2) because 0-9 are reserved).

    So you can't use kbGetBlockPosition for an army, but you can use kbGetArmyLocation. As Mythic's code reference says, that requires an input of the Army ID, or the first number in the army vector.
    That's where kbGetArmyLocation(xsVectorGetX(vector("%SrcArmy%",1))) comes from.
    However, the army ID alone isn't enough to identify the army, because you can have two armies belonging to different players with the same ID, such as (12,1) and (12,2).
    That is why you have to set the context player, using xsSetContextPlayer(player).
    « Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 36 37 38 39 40 ··· 50 ··· 60 ··· 70 ··· 80 ··· 90 ··· 100 ··· 101  Next Page »
    Age of Mythology Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
    You must be logged in to post messages.
    Please login or register
    Hop to: