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 ··· 39 40 41 42 43 ··· 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:
    Elrich
    Hero
    posted 04 May 2012 09:40 AM EDT (US)     1001 / 1680       
    meh I should post that damn set of triggers to the main thread. I haven't touched it (obviously) since I copied over from....?damn Mythic or Inventoor?
    *is ashamed*

    I'll try to find the latest version of them today and post them. If not definitely by the weekend (finally I'll have some free time!)

    edit: it was easier to find than I thought:


    <Condition name="EL Disable Looping Trigger Tool">
    <Param name="effid" dispName="Activation code (for activator)" varType="string">default</Param>
    <Command>if (trQuestVarGet("eldlte%effid%")==1) { </Command>
    <Command>xsDisableSelf(); </Command>
    <Command>return;} </Command>
    </Condition>

    <Effect name="EL Disable Looping Trigger Activator">
    <Param name="effid" dispName="Activation code (from tool)" varType="string">default</Param>
    <Command>trQuestVarSet("eldlte%effid%",1);</Command>
    </Effect>


    <Effect name="EL Disable Looping Trigger Tool Reset">
    <Param name="effid" dispName="Activation code to reset" varType="string">default</Param>
    <Command>trQuestVarSet("eldlte%effid%",0); </Command>
    </Effect>


    Once you add the condition and the two effects to your trigger XML file, you add the EL Disable Looping Trigger Tool condition to any trigger you want to 'remotely' disable choosing activation code. I think of it as planting C4 in Battlefield BC2 in one or more places and then hitting the trigger. The good thing about this is that you can plant as many of these 'C4' conditions as you want using the same activation code in multiple triggers creating disable groups.

    Just call the EL Disable Looping Trigger Activator and use the activation code to disable those triggers in one command.

    You can actually turn back on any disabled triggers by first running the EL Disable Looping Trigger Tool Reset using the activation code that you had run already, then Fire Event each trigger you want to turn back on and they will fire again or start looping again if they are checked for Loop.

    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

    [This message has been edited by Elrich (edited 05-04-2012 @ 10:15 AM).]

    TAG
    That AoM Guy
    (id: aom expert)
    posted 04 May 2012 10:29 AM EDT (US)     1002 / 1680       
    ...edit: it was easier to find than I thought:
    lol

    thankyou! this saves me a crapload of trouble

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    Ghostoo
    Mortal
    posted 04 May 2012 02:00 PM EDT (US)     1003 / 1680       
    can someone give me a simple explanation of "for" statements?
    i know exactly what they do, but i'm not sure how to set them up

    usually i'll use "while this=that{this+1}" which is exactly what a for statement is, but i can't figure out for statements.

    you can set variables without trQuestVarSet? is there any pre-emp you have to do to do it? do those variables transfer to other triggers?
    for (blahblah=0; >5){
    like that? or..?
    Mister SCP
    Scenario Reviewer
    posted 04 May 2012 02:25 PM EDT (US)     1004 / 1680       
    Some examples and what they would be with while loop

    for(in=1500;>=1){...}

    int in=1500;
    while(in>=1){...
    in--;}

    (the next two requires Cdata)
    for(in=0;<=100){...}

    int in=0;
    while(in<=100){...
    in++;}

    for(Qid=0;>1){}

    int Qid=0;
    while(Qid>1){... ->this is a false statement, Qid remains 0
    Qid--;}

    special commands:
    for (all=1800;>-1){ if (kbGetUnitTypeName(all)=="%UnitType%") break;}

    break will stop the loop. The variable all will be now the correct unit id (like 535)... Usefull for query triggers or unit type searches.

    continue: SKIPS a value, player should not ally with himself...

    <Effect name="Diplomacy Player Range">
    <Param name="Player1" dispName="highest Player" varType="string">4</Param>
    <Param name="Status" dispName="are now" varType="alliance">neutral</Param>
    <Param name="Player2" dispName="Not affect on P." varType="string">0</Param>
    <Command>for(i=%Player1%;>0) {if (i==%Player2%) continue;</Command>
    <Command>for(k=%Player1%;>0) {</Command>
    <Command>if ((i==k) || (k==%Player2%)) continue;</Command>
    <Command>trPlayerSetDiplomacy(i,k, "%Status%");}}</Command>
    </Effect>

    return; ->immediate stops the loop, should work like break

    for variables will not transfer to other triggers. You could use global variables for this. The great advangage of settings variables with for is that you can use trigger commands twice. If you declare two times the same int variable in a trigger it will break.

    like counting two players units

    int i=trPlayerUnitCount...
    Send chat ->i
    int i=trPlayerUnitCount...
    Send chat ->i

    but with for it works

    for( i=trPlayerUnitCount...
    Send chat ->i
    for(i=trPlayerUnitCount...;>9999){}->false statement
    Send chat ->i


    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 05-04-2012 @ 02:32 PM).]

    Lewonas
    Mortal
    posted 05 May 2012 05:41 AM EDT (US)     1005 / 1680       
    How do you split a string section before and after commas?

    Let's say I want to make a Send Chat effect and have this parameter:

    <Param name="Message" dispName="$$20056$$Message" VarType="stringid">Hello,there!</Param>

    I want the output to be like this:

    > Hello
    > there!

    I would also want to make this:

    <Param name="QVName" dispName="$$23952$$Var Name" VarType="string">QV1,QV2,QV3</Param>
    <Param name="Value" dispName="$$23859$$Value" VarType="string">5,4,8</Param>

    QV1 would get a value of 5, QV2 a value of 4 and QV3 a value of 8.

    or

    <Param name="QVName" dispName="$$23952$$Var Name" VarType="string">QV1,QV2,QV3</Param>
    <Param name="Value" dispName="$$23859$$Value" VarType="string">5</Param>

    All three QVs get a value of 5.

    Does anyone know what commands I need to use to make this?

    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%]
    perpetual_n00b
    Immortal
    posted 05 May 2012 10:48 AM EDT (US)     1006 / 1680       
    Lewonas, vectors are your friends.

    I've done something similar to the QV thing before, but with army deploy co-ordinates (forget where I put it ), but anyway try these:

    For the QV's:

    <Command>trQuestVarSet(xsVectorGetX(vector(%QVName%)),xsVectorGetX(vector(%Value%)));</Command>
    <Command>trQuestVarSet(xsVectorGetY(vector(%QVName%)),xsVectorGetY(vector(%Value%)));</Command>
    <Command>trQuestVarSet(xsVectorGetZ(vector(%QVName%)),xsVectorGetZ(vector(%Value%)));</Command>

    Not sure about the strings though.

    Edit: Damn, actually, you can't use a vector for the QVName unless they are numbers.

    Edit: Actually, for the string splitting, you could try using Quest String Check at Position and iterate through position numbers until you find the comma, then use Quest String Set SubString twice, first to set a string to everything before the comma's position, then again to set a second string everything after the comma's position.

    Quest String Set SubString relies on a start position and number of characters, so you might need to use the function String_length to get the overall string length then subtract the comma position to get the number of characters for the second part of the string. The number of characters for the first part is, of course, the comma position minus 1.

    You could use the string splitting method for the 3 part QVName, just repeat the process on the second string to split it again.

    [This message has been edited by perpetual_n00b (edited 05-05-2012 @ 11:09 AM).]

    Lewonas
    Mortal
    posted 05 May 2012 03:18 PM EDT (US)     1007 / 1680       
    Thanks a lot for the info perpetual_n00b. I created the Send Chat effect


    <Effect name="Send Chat Special">
    <Param name="PlayerID" dispName="$$22444$$From Player" VarType="player">0</Param>
    <Param name="msg" dispName="Message" VarType="string">default</Param>
    <Command>string elmsg = "%msg%";</Command>
    <Command>string elword = "";</Command>
    <Command>string elword2 = "";</Command>
    <Command>string elwordadd = "";</Command>
    <Command>int id = 1;</Command>
    <Command>int idd = 1;</Command>
    <Command>int c = 0;</Command>
    <Command>int cc = 0;</Command>
    <Command>int msglength = String_length(elmsg);</Command>
    <Command><![CDATA[for(i=1;<=msglength){]]></Command>
    <Command>elwordadd = String_charAt(elmsg, i);</Command>
    <Command>if(elwordadd==",") {</Command>
    <Command>trStringQuestVarSet("scsstring"+id,elword);</Command>
    <Command>id = idd + 1;</Command>
    <Command>idd = id;</Command>
    <Command>c = cc + 1;</Command>
    <Command>cc = c;</Command>
    <Command>elword = "";</Command>
    <Command>elword2 = "";</Command>
    <Command>}</Command>
    <Command>else{</Command>
    <Command>elword = elword2+elwordadd;</Command>
    <Command>elword2 = elword;</Command>
    <Command>}</Command>
    <Command>if(i==msglength) {</Command>
    <Command>c = cc + 1;</Command>
    <Command><![CDATA[for(p=1;<=c){]]></Command>
    <Command>if(c>p) {</Command>
    <Command>trChatSend(%PlayerID%,trStringQuestVarGet("scsstring"+p));}</Command>
    <Command>if(p==c) {</Command>
    <Command>trChatSend(%PlayerID%,elword);}</Command>
    <Command>}}</Command>
    <Command>}</Command>
    </Effect>

    Do you have any suggestions how I could make the code better and/or shorter?

    This String_charAt command will also be very useful for effects that actually need more than 7 parameters. With this you could use 1 parameter as 10 parameters, very cool.

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

    Mister SCP
    Scenario Reviewer
    posted 05 May 2012 03:20 PM EDT (US)     1008 / 1680       
    Let's say I want to make a Send Chat effect and have this parameter:

    Hello,there!


    I want the output to be like this:

    > Hello
    > there!
    not tested, case insensitive (could code it in if you like the concept), you can only use it once per trigger (because it defines the string "s1", CDATA is missing

    <Effect name="Dont know how to call it">
    <Param name="Subtitle2" dispName="Before" varType="stringid"></Param>
    <Param name="Subtitle" dispName="$$22385$$Subtitle" varType="stringid"></Param>
    <Command>string s1="";for(length=0; < String_length("%Subtitle%")){</Command>
    <Command>if ("," == ""+String_charAt("%Subtitle%",length))</Command>
    <Command>trChatSend(1,""+s1);s1="";</Command>
    <Command>else {s1=s1+""+String_charAt("%Subtitle%",length);}</Command>
    </Effect>
    I would also want to make this:

    QV1,QV2,QV3
    5,4,8


    QV1 would get a value of 5, QV2 a value of 4 and QV3 a value of 8.
    basicly the same... you would need String_parseFloat(string sText = ""). To convert it to a float
    Also you would a counter that counts how many ","'s are used so if the number is lower it adds position 1
    <Command>trQuestVarSet(xsVectorGetX(vector(%QVName%)),xsVectorGetX(vector(%Value%)));</Command> <Command>trQuestVarSet(xsVectorGetY(vector(%QVName%)),xsVectorGetY(vector(%Value%)));</Command> <Command>trQuestVarSet(xsVectorGetZ(vector(%QVName%)),xsVectorGetZ(vector(%Value%)));</Command>
    well the QV name is a string therfore

    ""+xsVectorGetX...


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

    Lewonas
    Mortal
    posted 05 May 2012 03:33 PM EDT (US)     1009 / 1680       

    <Effect name="Dont know how to call it"> <Param name="Subtitle2" dispName="Before" varType="stringid"></Param> <Param name="Subtitle" dispName="$$22385$$Subtitle" varType="stringid"></Param> <Command>string s1="";for(length=0; < String_length("%Subtitle%")){</Command> <Command>if ("," == ""+String_charAt("%Subtitle%",length))</Command> <Command>trChatSend(1,""+s1);s1="";</Command> <Command>else {s1=s1+""+String_charAt("%Subtitle%",length);}</Command> </Effect>
    Wow, I feel embarrassed by my large code LOL.

    Alright, here's the final version (does the same thing as my previous code, but it's a lot shorter ) :


    <Effect name="Send Chat Special">
    <Param name="PlayerID" dispName="$$22444$$From Player" VarType="player">0</Param>
    <Param name="msg" dispName="Message" VarType="string">default</Param>
    <Command>string elmsg = "";</Command>
    <Command><![CDATA[for(i=1;<=String_length("%msg%")){]]></Command>
    <Command>if(","==String_charAt("%msg%", i)) {</Command>
    <Command>trChatSend(%PlayerID%,elmsg);</Command>
    <Command>elmsg = "";</Command>
    <Command>}</Command>
    <Command>else{</Command>
    <Command>elmsg = elmsg+String_charAt("%msg%", i);}</Command>
    <Command>}</Command>
    <Command>trChatSend(%PlayerID%,elmsg);</Command>
    </Effect>

    Thanks for posting your code Mister SCP.

    Edit: hmmm, can't get the QV one to work. Did almost the exact same thing as the chat one, so I don't know what I'm doing wrong. The trigger only seems to return the correct value of the last entered QV all the time. I'll try to fix it tomorrow, but if you want Mister SCP, I would appreciate it if you post the code of the QV trigger so I can see how you would make it.

    Sorry, I was sloppy. It works now:


    <Effect name="Quest Var Set Special">
    <Param name="QVName" dispName="Var Name" VarType="string">QV1</Param>
    <Param name="Value" dispName="Value" VarType="string">0</Param>
    <Command>string elqv = "";</Command>
    <Command>string elvalue = "";</Command>
    <Command>float elresult = 1;</Command>
    <Command>float elresulta = 1;</Command>
    <Command>float a = 0;</Command>
    <Command><![CDATA[for(i=1;<=String_length("%QVName%")){]]></Command>
    <Command>if(","==String_charAt("%QVName%", i)) {</Command>
    <Command>elresult = elresult + 1;</Command>
    <Command>trStringQuestVarSet("qvsscheck"+elresult,elqv);</Command>
    <Command>elqv = "";</Command>
    <Command>}</Command>
    <Command>else{</Command>
    <Command>elqv = elqv+String_charAt("%QVName%", i);}</Command>
    <Command>}</Command>
    <Command><![CDATA[for(p=1;<=String_length("%Value%")){]]></Command>
    <Command>if(","==String_charAt("%Value%", p)) {</Command>
    <Command>elresulta = elresulta + 1;</Command>
    <Command>trQuestVarSet("qvsscheck1"+elresulta,String_parseFloat(elvalue));</Command>
    <Command>elvalue = "";</Command>
    <Command>}</Command>
    <Command>else{</Command>
    <Command>elvalue = elvalue+String_charAt("%Value%", p);}</Command>
    <Command>}</Command>
    <Command><![CDATA[for(x=1;<=elresult){]]></Command>
    <Command>if(x==elresult) {</Command>
    <Command>trQuestVarSet(elqv,String_parseFloat(elvalue));}</Command>
    <Command>else {</Command>
    <Command>a = x + 1;</Command>
    <Command>trQuestVarSet(trStringQuestVarGet("qvsscheck"+a),trQuestVarGet("qvsscheck1"+a));}</Command>
    <Command>}</Command>
    </Effect>
    </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 05-05-2012 @ 06:05 PM).]

    Lewonas
    Mortal
    posted 10 May 2012 06:58 PM EDT (US)     1010 / 1680       
    edit

    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 05-10-2012 @ 07:02 PM).]

    theonefrog5545
    Mortal
    posted 10 May 2012 10:30 PM EDT (US)     1011 / 1680       
    do v triggers work on multiplayer?
    Ghostoo
    Mortal
    posted 11 May 2012 00:18 AM EDT (US)     1012 / 1680       
    @theonefrog

    yes

    EDIT:
    @AoM Expert

    was it you that asked about disabling triggers in a group? i hope so

    turns out there was a command just for that lol:

    <Effect name="Disable Trigger Group">
    <Param name="TrigName" dispName="Group Name" varType="string">default</Param>
    <Command>xsDisableRuleGroup("_%TrigName%");</Command>
    </Effect>

    i haven't tested this, but the "xsDisableRulegroup" was in the commands list.

    EDIT2: it didn't work out for me, but i didn't have a trigger lock-up. i don't think it means the actual trigger groups, or i was just typing it wrong

    [This message has been edited by Ghostoo (edited 05-13-2012 @ 11:38 PM).]

    TAG
    That AoM Guy
    (id: aom expert)
    posted 13 May 2012 10:16 PM EDT (US)     1013 / 1680       
    Thankyou!

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    Mister SCP
    Scenario Reviewer
    posted 14 May 2012 11:13 AM EDT (US)     1014 / 1680       
    1. the groups dont start with "_"
    2. it never worked for me in AOE3


    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
    Zenophobia
    Irrational Fear
    posted 14 May 2012 08:40 PM EDT (US)     1015 / 1680       
    It doesn't work.

    [This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
    Ghostoo
    Mortal
    posted 24 May 2012 09:40 PM EDT (US)     1016 / 1680       
    EDIT: removed.


    Success! idk why it took me so long, but i finally perfected my army-deploy-in-a-line-between-2-units-with-heading trigger! it's mainly used for deploying walls touching eachother in a line, but it can be ued for whatever. i'll post a revised version in a sec.. i have it set to deploy between the underworld passage godpower at the moment (which required 3 different triggers to pull off).

    i have many trigonometric triggers that i'd like to release in a package soon, once i feel i have enough (and work out any kinks).



    Non v-trigger version:

    <Effect name="Army Deploy in a line evX with heading">
    <Param name="Object" dispName="Unit 1" varType="unit">default</Param>
    <Param name="Object2" dispName="Unit 2" varType="unit">default</Param>
    <Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
    <Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
    <Param name="Count" dispName="Per Distance" varType="long">1</Param>
    <Param name="heading" dispName="Offset generated heading by" varType="long">0</Param>
    <Command>trQuestVarSet("deployzz", 1);</Command>
    <Command>trQuestVarSet("zzeroz", 0);</Command>

    <Command>if (xsVectorGetX(kbGetBlockPosition("%Object%")) > xsVectorGetX(kbGetBlockPosition("%Object2%"))){</Command>
    <Command>trQuestVarSet("xco", xsVectorGetX(kbGetBlockPosition("%Object2%")) - xsVectorGetX(kbGetBlockPosition("%Object%")));</Command>
    <Command>trQuestVarSet("zco", xsVectorGetZ(kbGetBlockPosition("%Object2%")) - xsVectorGetZ(kbGetBlockPosition("%Object%")));</Command>
    <Command>trQuestVarSet("closest", 0);}</Command>
    <Command>else{</Command>
    <Command>trQuestVarSet("xco", xsVectorGetX(kbGetBlockPosition("%Object%"))-xsVectorGetX(kbGetBlockPosition("%Object2%")));</Command>
    <Command>trQuestVarSet("zco", xsVectorGetZ(kbGetBlockPosition("%Object%"))-xsVectorGetZ(kbGetBlockPosition("%Object2%")));</Command>
    <Command>trQuestVarSet("closest", 1);}</Command>
    <Command>trQuestVarSet("divz", (trQuestVarGet("xco")*trQuestVarGet("xco"))+(trQuestVarGet("zco")*trQuestVarGet("zco")) );</Command>

    //-------------------------start taking square root--------------------------
    <Command>trQuestVarSet("even", 0);</Command>
    <Command>trQuestVarSet("isneg", 0);</Command>
    <Command>trQuestVarSet("dofix", 0);</Command>
    <Command>trQuestVarSet("decxx", 1);</Command>
    <Command>trQuestVarSet("recip", 0);</Command>
    <Command>trQuestVarSet("isoth", 0);</Command>
    <Command>trQuestVarSet("xwasneg", 0);</Command>
    <Command>trQuestVarSet("zwasneg", 0);</Command>
    <Command>if (0 > trQuestVarGet("divz")){</Command>
    <Command>trQuestVarSet("isneg", 1);</Command>
    <Command>trQuestVarSet("divz", trQuestVarGet("even")-trQuestVarGet("divz"));}</Command>
    <Command>if (1 > trQuestVarGet("divz")){</Command>
    <Command>trQuestVarSet("recip", 1);</Command>
    <Command>trQuestVarSet("divz", trQuestVarGet("decxx")/trQuestVarGet("divz"));}</Command>
    <Command>trQuestVarSet("roughestdec", 1*trQuestVarGet("divz"));</Command>
    <Command>if (trQuestVarGet("roughestdec") == trQuestVarGet("divz")){</Command>
    <Command>trQuestVarSet("roughestdechalf", trQuestVarGet("roughestdec")/2);</Command>
    <Command>trQuestVarSet("roughestdechalf", 1*trQuestVarGet("roughestdechalf"));</Command>
    <Command>if (trQuestVarGet("roughestdechalf") == (trQuestVarGet("roughestdec")/2)) {</Command>
    <Command>trQuestVarSet("even", 1);}}</Command>
    <Command>trQuestVarSet("decxx", 0);</Command>
    <Command>trQuestVarSet("fakecountq", trQuestVarGet("divz"));</Command>
    <Command>while (trQuestVarGet("fakecountq") > 1){</Command>
    <Command>trQuestVarSet("decxx", trQuestVarGet("decxx") + 1);</Command>
    <Command>trQuestVarSet("fakecountq", trQuestVarGet("fakecountq")/10);}</Command>
    <Command>trQuestVarSet("xxc", trQuestVarGet("decxx") * 10);</Command>
    <Command>if (trQuestVarGet("even") == 1){</Command>
    <Command>trQuestVarSet("xxc", trQuestVarGet("xxc") * 10);}</Command>
    <Command>trQuestVarSet("xxc", 0.5*(trQuestVarGet("xxc")+(trQuestVarGet("divz")/trQuestVarGet("xxc"))));</Command>
    <Command>trQuestVarSet("xxc", 0.5*(trQuestVarGet("xxc")+(trQuestVarGet("divz")/trQuestVarGet("xxc"))));</Command>
    <Command>trQuestVarSet("xxc", 0.5*(trQuestVarGet("xxc")+(trQuestVarGet("divz")/trQuestVarGet("xxc"))));</Command>
    <Command>trQuestVarSet("xxc", 0.5*(trQuestVarGet("xxc")+(trQuestVarGet("divz")/trQuestVarGet("xxc"))));</Command>
    <Command>trQuestVarSet("xxc", 0.5*(trQuestVarGet("xxc")+(trQuestVarGet("divz")/trQuestVarGet("xxc"))));</Command>
    <Command>trQuestVarSet("xxc", 0.5*(trQuestVarGet("xxc")+(trQuestVarGet("divz")/trQuestVarGet("xxc"))));</Command>
    <Command>trQuestVarSet("divz", trQuestVarGet("xxc"));</Command>
    <Command>trQuestVarSet("decxx", 1);</Command>
    <Command>trQuestVarSet("even", 0);</Command>
    <Command>if (trQuestVarGet("recip") == 1){</Command>
    <Command>trQuestVarSet("divz", trQuestVarGet("decxx")/trQuestVarGet("divz"));}</Command>
    <Command>trQuestVarSet("divz2", trQuestVarGet("divz"));</Command>
    <Command>if (trQuestVarGet("isneg") == 1){</Command>
    //-------------------------finish taking square root-------------------------
    <Command>if (trQuestVarGet("even") > trQuestVarGet("xco")){</Command>
    <Command>trQuestVarSet("xwasneg", 1);</Command>
    <Command>trQuestVarSet("xco", trQuestVarGet("zzeroz")-trQuestVarGet("xco"));}</Command>
    <Command>if (trQuestVarGet("even") > trQuestVarGet("zco")){</Command>
    <Command>trQuestVarSet("zwasneg", 1);</Command>
    <Command>trQuestVarSet("zco", trQuestVarGet("zzeroz")-trQuestVarGet("zco"));}</Command>

    <Command>if (trQuestVarGet("closest") == 0){</Command>
    <Command>trQuestVarSet("lolheading", trQuestVarGet("zco")/trQuestVarGet("divz"));</Command>
    <Command>if (xsVectorGetZ(kbGetBlockPosition("%Object2%")) > xsVectorGetZ(kbGetBlockPosition("%Object%")) ){</Command>
    <Command>trQuestVarSet("lolheading", trQuestVarGet("xco")/trQuestVarGet("divz"));}</Command>
    <Command>trQuestVarSet("lolheading", trQuestVarGet("lolheading")+(((trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading"))</Command>
    <Command>*0.5)/3)+(((trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading"))</Command>
    <Command>*0.375)/5)+(((trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*</Command>
    <Command>trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading"))*0.3125)/7)+(((trQuestVarGet("lolheading")*</Command>
    <Command>trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*</Command>
    <Command>trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading"))*0.2734375)/9)+(((trQuestVarGet("lolheading")*</Command>
    <Command>trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*</Command>
    <Command>trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading"))*0.24609375)/11));</Command>
    <Command>trQuestVarSet("lolheading", (trQuestVarGet("lolheading")*180)/3.1415926535);</Command>
    <Command>if (xsVectorGetZ(kbGetBlockPosition("%Object2%")) > xsVectorGetZ(kbGetBlockPosition("%Object%")) ){</Command>
    <Command>trQuestVarSet("lolheading", 90-trQuestVarGet("lolheading"));}</Command>
    <Command>if (xsVectorGetZ(kbGetBlockPosition("%Object%")) > xsVectorGetZ(kbGetBlockPosition("%Object2%")) ){</Command>
    <Command>trQuestVarSet("lolheading", 360-trQuestVarGet("lolheading"));}}</Command>


    <Command>if (trQuestVarGet("closest") == 1){</Command>
    <Command>trQuestVarSet("lolheading", trQuestVarGet("zco")/trQuestVarGet("divz"));</Command>
    <Command>if (xsVectorGetZ(kbGetBlockPosition("%Object%")) > xsVectorGetZ(kbGetBlockPosition("%Object2%")) ){</Command>
    <Command>trQuestVarSet("lolheading", trQuestVarGet("xco")/trQuestVarGet("divz"));}</Command>
    <Command>trQuestVarSet("lolheading", trQuestVarGet("lolheading")+(((trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading"))</Command>
    <Command>*0.5)/3)+(((trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading"))</Command>
    <Command>*0.375)/5)+(((trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*</Command>
    <Command>trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading"))*0.3125)/7)+(((trQuestVarGet("lolheading")*</Command>
    <Command>trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*</Command>
    <Command>trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading"))*0.2734375)/9)+(((trQuestVarGet("lolheading")*</Command>
    <Command>trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*</Command>
    <Command>trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading")*trQuestVarGet("lolheading"))*0.24609375)/11));</Command>
    <Command>trQuestVarSet("lolheading", (trQuestVarGet("lolheading")*180)/3.1415926535);</Command>
    <Command>if (xsVectorGetZ(kbGetBlockPosition("%Object%")) > xsVectorGetZ(kbGetBlockPosition("%Object2%")) ){</Command>
    <Command>trQuestVarSet("lolheading", 90-trQuestVarGet("lolheading"));}</Command>
    <Command>if ( xsVectorGetZ(kbGetBlockPosition("%Object2%")) > xsVectorGetZ(kbGetBlockPosition("%Object%"))){</Command>
    <Command>trQuestVarSet("lolheading", 360-trQuestVarGet("lolheading"));}}</Command>


    <Command>if (trQuestVarGet("xwasneg") == 1){</Command>
    <Command>trQuestVarSet("xco", trQuestVarGet("even")-trQuestVarGet("xco"));}</Command>
    <Command>if (trQuestVarGet("zwasneg") == 1){</Command>
    <Command>trQuestVarSet("zco", trQuestVarGet("even")-trQuestVarGet("zco"));}</Command>

    <Command>trQuestVarSet("divz", trQuestVarGet("divz")/(%Count%) );</Command> //the total distance divided by the amount per paces desired, giving the number of units to spawn
    <Command>while(trQuestVarGet("divz") > trQuestVarGet("deployzz")+0.5){</Command> //the number of units to spawn is greater than the amount spawned plus half (for rounding reasons)
    <Command>trQuestVarSet("zzza",xsVectorGetX(kbGetBlockPosition("%Object%")) + ((trQuestVarGet("xco")/trQuestVarGet("divz"))*trQuestVarGet("deployzz")));</Command>
    <Command>trQuestVarSet("zzzb",xsVectorGetY(kbGetBlockPosition("%Object%")));</Command>
    <Command>trQuestVarSet("zzzc",xsVectorGetZ(kbGetBlockPosition("%Object%")) + ((trQuestVarGet("zco")/trQuestVarGet("divz"))*trQuestVarGet("deployzz")));</Command>
    <Command>if (trQuestVarGet("closest") == 1){</Command>
    <Command>trQuestVarSet("zzza",xsVectorGetX(kbGetBlockPosition("%Object2%")) + ((trQuestVarGet("xco")/trQuestVarGet("divz"))*trQuestVarGet("deployzz")));</Command>
    <Command>trQuestVarSet("zzzb",xsVectorGetY(kbGetBlockPosition("%Object%")));</Command>
    <Command>trQuestVarSet("zzzc",xsVectorGetZ(kbGetBlockPosition("%Object2%")) + ((trQuestVarGet("zco")/trQuestVarGet("divz"))*trQuestVarGet("deployzz")));}</Command>


    <Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("zzza"), trQuestVarGet("zzzb"), trQuestVarGet("zzzc"), (trQuestVarGet("lolheading")+%heading%), true);</Command> //spawn unit on next x paces
    <Command>trQuestVarSet("deployzz", trQuestVarGet("deployzz")+1);}</Command>
    </Effect>


    the v-trigger version is proving to be very difficult to set up all in 1 trigger, i doubt it'll happen any time soon


    EDIT2: you really can utilize a calculator in these games lol.

    just did army deploy around unit in a shape, and that and my circle trigger i have added the heading trigger so that all the units "look at" the central unit when they spawn.
    i'm having lots of fun with these ideas, i thank you guys so much for your previous assistance with my learning

    [This message has been edited by Ghostoo (edited 05-26-2012 @ 11:25 PM).]

    mapaxe1990
    Mortal
    posted 29 May 2012 06:24 PM EDT (US)     1017 / 1680       
    Hello,

    I am doing different scenarios in the editor (titans expansion) and I wanted to know how you can avoid buildings to be destroyed while they are being build whenenemies attack the villagers building it or when there's just a battle near the future building.

    This is because in one scenario, you have to undig the sword from the Excavation unit, and if the excavation or sword bearers die, you lose. The problem is that I placed some cinematographic blocks that turn into minions that head to the excavation. This is meant to be a way of making the game more challenging (the minions attack your villagers and the excavation, but you also have to protect your city, which is rather farr off).

    Anyway, please let me know, I would't like to have to take off the minion feature...

    Thanks!
    BSU_DoLhades
    Mortal
    posted 08 June 2012 05:28 PM EDT (US)     1018 / 1680       
    Need a trigger that kills units when they are down (AKA when Arkantos is in death animation)

    This needs to work online.

    Thanks

    ~Hades

    Leader and Trigger Artist of Mythic Studios
    I need players for my Peloponnesian War RPG (Its Semi-Historical)
    Now quit being a bitch and quote me in your signature like Yeebaagooon used to. ~Out Reach
    Zenophobia
    Irrational Fear
    posted 08 June 2012 07:27 PM EDT (US)     1019 / 1680       
    Do you mean you want the campaign heroes to be permanently dead?
    If so, then you could use v triggers.
    target units that are in their death action (3) and dead state (4). then use v destroy.

    [This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
    Xyteran
    Mortal
    posted 08 June 2012 09:25 PM EDT (US)     1020 / 1680       
    Is there a way to run a trigger every time building X is created, or building X is destroyed? If not, here's a conditional request:


    Name - Building created / building destroyed
    Description - Set as a loop, this condition should run the trigger every time building X is created / building X is destroyed.
    Example - Every time a player builds a settlement, the player gets +200 gold. Every time a player loses a settlement, the player loses 200 gold.

    [This message has been edited by Xyteran (edited 06-08-2012 @ 09:25 PM).]

    Ghostoo
    Mortal
    posted 08 June 2012 10:43 PM EDT (US)     1021 / 1680       
    there's no specific trigger for both entering and leaving that i have but what you can do is set two variables. for one variable, use a loop to set the variable to units in area (trQuestVarSet("asdf", trCountUnitsInArea(area parameters));. if that variable ever exceeds or deceits the second variable, do an action.

    so for example start with setting both vars (var A and var B) to 1 and use a loop to set var A by the number of settlements owned by player 1 on the map. If var A ever becomes different than var B do:
    grant resources (either +200 or -200)
    set var B by new var A

    just in case you don't have it, here's QV on units in area

    <Effect name="QV on units in area">
    <Param name="DstObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
    <Param name="Player" dispName="$$22301$$Player" VarType="player">0</Param>
    <Param name="UnitType" dispName="$$22302$$Unit Type" VarType="string">Unit</Param>
    <Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
    <Param name="QV" dispName="Set to QV" varType="string">QV1</Param>
    <Command>trQuestVarSet("%QV%", trCountUnitsInArea("%DstObject%",%Player%,"%UnitType%",%Dist%));</Command>
    </Effect>


    loop that^ on var A
    so for conditions do "QV compare".
    for a safety you can do +1 and -1 for each iteration just in case two settlements die/are created at once.

    [This message has been edited by Ghostoo (edited 06-08-2012 @ 11:48 PM).]

    Xyteran
    Mortal
    posted 09 June 2012 00:37 AM EDT (US)     1022 / 1680       
    Ugh, that's more annoyingly complicated than I was hoping, but it looks like that'll work. Thanks!
    perpetual_n00b
    Immortal
    posted 09 June 2012 07:43 AM EDT (US)     1023 / 1680       
    Xyteran, try this:

    <Condition name="Player Unit Count QV">
    <Param name="PlayerID" dispName="$$22301$$Player" varType="string">1</Param>
    <Param name="ProtoUnit" dispName="$$19160$$Unit" VarType="protounit">default</Param>
    <Param name="Op" dispName="$$22297$$Operator" VarType="operator">==</Param>
    <Param name="Count" dispName="$$23952$$Var Name" VarType="string">QV1</Param>
    <Expression>trPlayerUnitCountSpecific(%PlayerID%, "%ProtoUnit%") %Op% trQuestVarGet("%Count%")</Expression>
    </Condition>

    <Effect name="QV Set from Player Unit Count">
    <Param name="QVName" dispName="$$23952$$Var Name" VarType="string">QV1</Param>
    <Param name="PlayerID" dispName="$$22301$$Player" VarType="player">1</Param>
    <Param name="ProtoUnit" dispName="$$19160$$Unit" VarType="protounit">default</Param>
    <Command>trQuestVarSet("%QVName%", trPlayerUnitCountSpecific(%PlayerID%, "%ProtoUnit%"));</Command>
    </Effect>


    Trigger - Settlement_Built
    [x] Active
    [x] Loop
    [_] Run Immediately
    Priority = High

    Conditions
    Player Unit Count QV
    Player = 1
    Unit = Settlement Level 1 (or whatever it is)
    Operator is >
    Var Name = SettlementCountP1

    Effects
    QV Set from Player Unit Count
    Var Name = SettlementCountP1
    Player = 1
    Unit = Settlement Level 1 (or whatever it is)

    Grant Resources
    Player = 1
    Resource = Gold
    Amount = 200

    Trigger - Settlement_Lost
    [x] Active
    [x] Loop
    [_] Run Immediately
    Priority = High

    Conditions
    Player Unit Count QV
    Player = 1
    Unit = Settlement Level 1 (or whatever it is)
    Operator is <
    Var Name = SettlementCountP1

    Effects
    QV Set from Player Unit Count
    Var Name = SettlementCountP1
    Player = 1
    Unit = Settlement Level 1 (or whatever it is)

    Grant Resources
    Player = 1
    Resource = Gold
    Amount = -200
    Xyteran
    Mortal
    posted 09 June 2012 05:00 PM EDT (US)     1024 / 1680       
    I got it working, thanks!

    One more request:

    Name - Protounit Change Description
    Description - Changes the description of a specific unit.

    We have a Protounit Change Name trigger, so why not description too?
    Elrich
    Hero
    posted 15 June 2012 12:30 PM EDT (US)     1025 / 1680       
    I don't think you can change the description without modding the game itself changing it everywhere.

    In all your science of the mind, seeking blind through flesh and bone
    Find the blood inside this stone
    Well, I know I've never shown what I feel, I've always known
    I plan my vengeance on my own - and I was always alone
    « Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 39 40 41 42 43 ··· 50 ··· 60 ··· 68  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Mythology Heaven | HeavenGames