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 ··· 25 26 27 28 29 ··· 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 15 August 2009 01:20 AM EDT (US)     651 / 2506  
    I just double checked by pasting the trigger back into my typetest from the forum and it worked fine for me.

    Is it possible there's another trigger in the xml file with a syntax error? Take this one out and see if any of the other triggers show in the list.

    A quick way to check if an xml file got broken by a syntax error is opening it in internet explorer.
    posted 15 August 2009 02:57 AM EDT (US)     652 / 2506  
    HailToTheOboe: So is it now possible to create the unit heading towards unit trigger?

    ____________
    +|||The Noble One|||+
    A Proud Member Of
    0==[==========>
    ValorStudios
    <==========]==0
    posted 15 August 2009 04:27 PM EDT (US)     653 / 2506  
    I need HELP

    Can someone post the:

    Conditional effects start
    Conditional effects end

    I have for some idiotic reason lost these files and cannot progress on my project.

    The Gods have left us, therefore making the old world crumble and turn into ashes...

    But as the gods return, from the ashes of the old world, shall rise a more beautiful and powerful new world, and life will begin once more, if they hadn't closed...dang you ES.
    posted 15 August 2009 05:09 PM EDT (US)     654 / 2506  
    No such effects as conditional start - the condition itself is the start. Then end trigger is called conditional zend. You might have it but looking in the wrong place as I added the z to put it at the end of the list to make it easier to find.

    Here it is anyway:
       <Effect name="conditional zEND">
    <Command>}</Command>
    </Effect>

    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 15 August 2009 08:05 PM EDT (US)     655 / 2506  
    The conditional start was the one with the QV as int he condition:

    If QV <,=,> X

    The Gods have left us, therefore making the old world crumble and turn into ashes...

    But as the gods return, from the ashes of the old world, shall rise a more beautiful and powerful new world, and life will begin once more, if they hadn't closed...dang you ES.
    posted 15 August 2009 08:10 PM EDT (US)     656 / 2506  
    Conditional Quest Var Check?

    There is no separate "start" for the conditionals, the conditional effect itself is the beginning.
    Conditionals work like this:

    if (x == true)
    {
    effect
    effect
    effect
    }

    The conditional effect contains the "if (x = true) {" part
    and conditional zEnd contains the last "}"


    ySearch on the other hand, has separate start and end effects.
    posted 15 August 2009 11:55 PM EDT (US)     657 / 2506  
    Thanks, indeed these triggers are the same as the ones I had, thanks ;p.

    The Gods have left us, therefore making the old world crumble and turn into ashes...

    But as the gods return, from the ashes of the old world, shall rise a more beautiful and powerful new world, and life will begin once more, if they hadn't closed...dang you ES.
    posted 16 August 2009 00:41 AM EDT (US)     658 / 2506  
    still doing that change random unit effect. I just haven't had more than a few minutes at the computer at a time this weekend.


    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
    posted 16 August 2009 01:28 AM EDT (US)     659 / 2506  
    HailToTheOboe: So is it now possible to create the unit heading towards unit trigger?
    Yep. I've got one that works for me using my updated loader. We just need Mythic_Freak to apply the fix to the real thing so other people can re-download it.

    Here is the trigger:
    <Effect name="Unit Heading Towards Unit TL">
    <Param name="SrcUnit" dispName="Source Unit" varType="unit">default</Param>
    <Param name="TrgUnit" dispName="Target Unit" varType="unit">default</Param>
    <Param name="Shift" dispName="Angle Offset" varType="string">0</Param>
    <Command>trUnitSelectClear();</Command>
    <Command>trUnitSelect("%SrcUnit%");</Command>
    <Command>trUnitSetHeading(%Shift%+Math_atan2(xsVectorGetX(kbGetBlockPositio n("%TrgUnit%"))-xsVectorGetX(kbGetBlockPosition("%SrcUnit%")),xsVectorGetZ(kbGetBlockPosition("%TrgUnit%"))-xsVectorGetZ(kbGetBlockPosition("%SrcUnit%")))*180.0/PI);</Command>
    </Effect>


    To make it work properly, you'll have to either wait for a new release of the loader, or make the change yourself like I did.

    If you open up your typeLoaderX.xml, search for
    Math_atan(float n = 0)
    replace that block of code with this:

    <Command>float Math_atan(float n = 0) {</Command>
    <Command> float m = n;</Command>
    <Command> if(n > 1.0) m = 1.0 / n;</Command>
    <Command> if(-1.0 > n) m = -1.0 / n;</Command>
    <Command> float r = m;</Command>
    <Command> <![CDATA[for(i = 1; < 100) {]]></Command>
    <Command> int j = i * 2 + 1;</Command>
    <Command> float k = Math_pow(m,j) / j;</Command>
    <Command> if(k == 0) break;</Command>
    <Command> if(i %mod% 2 == 0) r = r + k;</Command>
    <Command> if(i %mod% 2 == 1) r = r - k;</Command>
    <Command> }</Command>
    <Command> if(n > 1.0 || -1.0 > n) r = PI / 2.0 - r;</Command>
    <Command> if(-1.0 > n) r = 0.0 - r;</Command>
    <Command> return (r);</Command>
    <Command>}</Command>


    And you'll be set to go.

    It might be a good idea to save a copy of the old loader in case something goes wrong.
    posted 16 August 2009 01:55 AM EDT (US)     660 / 2506  
    ok thanks Elrich.

    My Upcoming website!
    The Black Hand RPG - Revived
    Join my Facebook Group :P
    Nazi Zombie Verukkt sound files
    Mess With The BesT DiE LiKe ThE ReST
    Argh!! It's EXOLAR not xEXOLARx get it right!!
    posted 16 August 2009 12:22 PM EDT (US)     661 / 2506  
       <Effect name="EL Convert Random Unit(s) In Selection">
    <Param name="SrcObject" dispName="Unit(s)" varType="unit">default</Param>
    <Param name="PlayerID" dispName="Convert to Player#" varType="player">2</Param>
    <Param name="convcount" dispName="Convert this many" varType="string">1</Param>
    <Command>for(convcount = 0; > 1){}</Command>
    <Command>for(selcount = 0; > 1){}</Command>
    <Command>for(idxunit= 0; > 1){}</Command>
    <Command>for(unconverted = 0; > 1){}</Command>
    <Command> unconverted=1;</Command>
    <Command>convcount=%convcount%;</Command>
    <Command loop="" loopParm="SrcObject">selcount++;</Command>//count selected units
    <Command><![CDATA[ if(selcount < convcount) convcount=selcount;]]></Command>//can't convert more than we have
    <Command><![CDATA[while(convcount > 0 && unconverted >0 ) {]]></Command>//while still more to convert and not all have been converted
    <Command>trQuestVarSetFromRand("tmprand",1,selcount,true);</Command>//choose a random unit
    <Command>trUnitSelectClear();</Command>
    <Command>idxunit=0;</Command>//counter for each selected unit
    <Command loop="" loopParm="SrcObject">idxunit++;if(trQuestVarGet("tmprand")==idxunit)trUnitSelect("%SrcObject%");</Command>
    <Command> if(trUnitIsOwnedBy(%PlayerID% ))convcount=convcount;</Command>
    <Command> else {trUnitConvert(%PlayerID% );convcount--;}</Command>
    <Command>unconverted=selcount;</Command>//counter for each selected unit
    <Command loop="" loopParm="SrcObject">trUnitSelectClear();trUnitSelect("%SrcObject%");if(trUnitIsOwnedBy(%PlayerID% )) unconverted--;</Command>
    <Command> } </Command>
    </Effect>

    <Effect name="EL Convert QV Random Unit(s) In Selection">
    <Param name="SrcObject" dispName="Unit(s)" varType="unit">default</Param>
    <Param name="PlayerID" dispName="Convert to Player#" varType="player">2</Param>
    <Param name="qvconvcount" dispName="QV with no to convert" varType="string">QV1</Param>
    <Command>for(convcount = 0; > 1){}</Command>
    <Command>for(selcount = 0; > 1){}</Command>
    <Command>for(idxunit= 0; > 1){}</Command>
    <Command>for(unconverted = 0; > 1){}</Command>
    <Command> unconverted=1;</Command>
    <Command>convcount=trQuestVarGet("%qvconvcount%");</Command>
    <Command loop="" loopParm="SrcObject">selcount++;</Command>//count selected units
    <Command><![CDATA[ if(selcount < convcount) convcount=selcount;]]></Command>//can't convert more than we have
    <Command><![CDATA[while(convcount > 0 && unconverted >0 ) {]]></Command>//while still more to convert and not all have been converted
    <Command>trQuestVarSetFromRand("tmprand",1,selcount,true);</Command>//choose a random unit
    <Command>trUnitSelectClear();</Command>
    <Command>idxunit=0;</Command>//counter for each selected unit
    <Command loop="" loopParm="SrcObject">idxunit++;if(trQuestVarGet("tmprand")==idxunit)trUnitSelect("%SrcObject%");</Command>
    <Command> if(trUnitIsOwnedBy(%PlayerID% ))convcount=convcount;</Command>
    <Command> else {trUnitConvert(%PlayerID% );convcount--;}</Command>
    <Command>unconverted=selcount;</Command>//counter for each selected unit
    <Command loop="" loopParm="SrcObject">trUnitSelectClear();trUnitSelect("%SrcObject%");if(trUnitIsOwnedBy(%PlayerID% )) unconverted--;</Command>
    <Command> } </Command>
    </Effect>

    [This message has been edited by Elrich (edited 08-22-2009 @ 10:01 AM).]

    posted 16 August 2009 12:36 PM EDT (US)     662 / 2506  
    Above is the convert unit in two versions. Here's how to use it:

    Unit(s): choose one or more units (up to 30) to create the group
    Convert to Player#: what player to convert them to
    (first version of the effect)
    Convert this many: number of units in the group to convert
    (QV version)
    QV with no to convert: the quest var that hold the number that should be converted.

    This effect will count how many units you have selected and randomly choose from the group to convert as many as you specified to the player you specified. The advantage of the QV version is that you can change how many of the group are converted at will in the game. The only thing that might confuse the result is if the units you have selected are already owned by the player # you specified.

    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 08-16-2009 @ 12:48 PM).]

    posted 16 August 2009 12:39 PM EDT (US)     663 / 2506  
    A modification of the trigger by pftq I believe is needed!
    Qv set units in area(army)

    ____________
    +|||SwordOfValor|||+
    A Proud Member Of
    0==[==========>
    ValorStudios
    <==========]==0
    posted 16 August 2009 12:59 PM EDT (US)     664 / 2506  
    Count the dead units in the area in a qv
    cool. I didn't even realize that unit queries could check the unit state.
    There is a lot to be learned from pftq triggers, I should spend a bit of time looking at them.
    But holy carp they are the hardest thing in the world to read. blargs zweeps vrooms and fwehhos everywhere.


    You should give trigger coding a try for yourself sometime sword, a lot of these little modifications are not hard at all once you get the hang of it and being able to create your own tools is incredibly useful.
    <Effect name="QV Set Units in Area (Center Army)">
    <Param name="SrcArmy" dispName="Center Army" varType="group">0,0</Param>
    <Param name="FromPlayer" dispName="Player (99 for ALL)" varType="string">99</Param>
    <Param name="UnitId" dispName="Unit Type ID (Optional)" varType="string">-1</Param>
    <Param name="unitstate" dispName="State ID (2=Alive, 255=Any, 4=Dead...)" varType="string">2</Param>
    <Param name="actionid" dispName="Action ID (Optional)" varType="string">-1</Param>
    <Param name="Dst" dispName="Radius" varType="string">10</Param>
    <Param name="QVName" dispName="QV" varType="string">QV1</Param>
    <Command>trQuestVarSet("convarea", 0);</Command>
    <Command>trQuestVarSet("ffweho",0);</Command>
    <Command>trQuestVarSet("lastpl", xsGetContextPlayer());</Command>
    <Command>for(id=0;>1) {}</Command>
    <Command>for(Pid=xsVectorGetX(vector(%SrcArmy%,0));>Pid+1){} for(Aid=xsVectorGetY(vector(%SrcArmy%,0));>Aid+1){}</Command>
    <Command>xsSetContextPlayer(Pid); id = kbArmyGetUnitID(Aid,0);</Command>
    <Command>if(%FromPlayer%!=99) trQuestVarSet("vroom", %FromPlayer%);</Command>
    <Command>trQuestVarSet("%QVName%", 0);</Command>
    <Command>trQuestVarSet("zeep", 0);</Command>
    <Command>if(%UnitId%>=0) {</Command>
    <Command>trQuestVarSet("zeep", %UnitId%);</Command>
    <Command>}</Command>
    <Command>if(0>%UnitId%) {</Command>
    <Command>while(kbGetUnitTypeName(trQuestVarGet("zeep"))!="All") {</Command>
    <Command>trQuestVarSet("zeep", trQuestVarGet("zeep")+1);</Command>
    <Command>}}</Command>
    <Command>trQuestVarSet("lastpl", xsGetContextPlayer());</Command>
    <Command>if(%FromPlayer%!=99) trQuestVarSet("blarg",%FromPlayer%);</Command>
    <Command>if(%FromPlayer%==99) {</Command>
    <Command>trQuestVarSet("blarg",0);</Command>
    <Command>trQuestVarSet("vroom",12);</Command>
    <Command>}</Command>
    <Command>trQuestVarSet("i",trQuestVarGet("blarg"));</Command>
    <Command>while(trQuestVarGet("vroom")>=trQuestVarGet("i")) {</Command>
    <Command>xsSetContextPlayer(trQuestVarGet("i"));</Command>
    <Command>kbLookAtAllUnitsOnMap();</Command>
    <Command>trQuestVarSet("convarea", kbUnitQueryCreate("convarea"));</Command>
    <Command>kbUnitQuerySetPlayerID(trQuestVarGet("convarea"), trQuestVarGet("i"));</Command>
    <Command>kbUnitQuerySetUnitType(trQuestVarGet("convarea"), trQuestVarGet("zeep"));</Command>
    <Command>kbUnitQuerySetState(trQuestVarGet("convarea"), 1*%unitstate%);</Command>
    <Command>if(¬tionid%!=-1) kbUnitQuerySetActionType(trQuestVarGet("convarea"), 1*¬tionid%);</Command>
    <Command>kbUnitQuerySetPosition(trQuestVarGet("convarea"), kbUnitGetPosition(id));</Command>
    <Command>kbUnitQuerySetMaximumDistance(trQuestVarGet("convarea"), %Dst%);</Command>
    <Command>kbUnitQuerySetAscendingSort(trQuestVarGet("convarea"), true);</Command>
    <Command>kbUnitQueryResetResults(trQuestVarGet("convarea"));</Command>
    <Command>trQuestVarSet("%QVName%", trQuestVarGet("%QVName%")+kbUnitQueryExecute(trQuestVarGet("convarea")));</Command>
    <Command>trQuestVarSet("i", trQuestVarGet("i")+1);}</Command>
    <Command>xsSetContextPlayer(trQuestVarGet("lastpl"));</Command>
    </Effect>


    95% of the work in the above trigger was done by pftq. I just changed about 3 lines.
    posted 16 August 2009 02:39 PM EDT (US)     665 / 2506  
    Ok maybe these might belong in the question thread, but its pretty complicated triggers here, so i need the help from a trigger master.

    First, i have tried to make a quest var system to make a unit be healed, like a normal hero. here it is

    Trigger One, high priority, active, looping
    Condition : Unit action ID, 9 (idle)
    Efect: Modify quest var Camelhero = 1

    Trigger two, high priority, active, looping
    Condition : Unit action ID, 10 (moveing)
    Efect: Modify quest var Camelhero = 2

    Trigger three, high priority, active, looping
    Condition : Unit action ID, 17 (working)(like attacking)
    Efect: Modity quest var Camelhero = 3

    Trigger one part two, high priority, active, looping
    Condition: Quest var check, Camelhero =1, Timer 0.5 seconds
    Efect: Damage unit, The camelry, -1 damage

    Trigger two part two, high priority, active, looping
    Condition: Quest var check, Camelhero =2, Timer 1.45 second
    Effect: Damage unit, The camelry, -1 damage

    Trigger three part two, high priority, active, looping
    Condition: Quest var check, Camelhero =3, Timer 2 seconds
    Effect: Damage unit, the camelry, -1 damage

    So that is it, also, I want you to know , that I DID have a trigger that fired before these that was quest var set to set the Camelhero var to 0. And so the way it goes i think, is that the camelry will be healed fast if idle, slower if moving, and slowest if fighting. And I do not know why, but my problem is that it does not work! Every time i test my map with these triggers, the game shuts down and goes to the desktop and I have to restart. Help me please.


    Also, I wonder, when I use the transform trigger to turn a hespirides tree into a unit, so the god power block effect stays, every time, when it turns into that unit, the unit is there, but i can not see it or control it, I can select and delete it though. Also, with the transform, I transform a spy eye into something, it works fine if its a building, but if its a unit, the unit is half sunk into the ground. Why? Fix?

    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 16 August 2009 02:56 PM EDT (US)     666 / 2506  
    Timer 1.45
    Is the problem. You can't use decimals here.


    Try this condition instead (made by invent00r), using milliseconds instead of seconds.

       <Condition name="Timer ms Proactive">      
    <Param name="Timer" dispName="$$22293$$Milliseconds" VarType="long">250</Param>
    <Command>static int myTimer = -1;</Command>
    <Command>if(trTimeMS() > (myTimer + %Timer%))</Command>
    <Command> myTimer = trTimeMS();</Command>
    <Expression>myTimer == trTimeMS()</Expression>
    </Condition>


    The default Timer MS condition doesn't work properly because it takes the time in MS and compares it to the trigger activation time in seconds*1000, which would be fine if it stored decimals but it doesn't.

    However, if I were doing a regen system like you are, I would do it like this:

    Looped
    Conditon Timer: 1
    Effect Damage unit: trQuestVarGet("RegenRate")

    And have a trigger for each action (looped on low frequency, depending on how quickly you want it to respond to a change in action - or you could do it in one trigger with conditionals)
    Condition Unit Action
    Effect Quest Var Set: RegenRate to whatever value corresponds to the action.

    Or another alternative method which is more like what you're doing

    Looped
    Condition Timer ms Proactive: trQuestVarGet("RegenTime")
    Effect Damage unit: -1

    And again, have a trigger for each action.
    Condition Unit Action
    Effect Quest Var Set: RegenTime to whatever value corresponds to the action.

    Here are some other triggers you may find helpful
    <Effect name="Conditional Unit Action">  
    <Param name="PlayerID" dispName="$$22301$$Player" varType="string">0</Param>
    <Param name="SrcObject" dispName="Unit" VarType="unit">default</Param>
    <Param name="zActionID" dispName="Action ID" VarType="long">9</Param>
    <Command>trUnitSelectClear();</Command>
    <Command>for(id=0;>1){} id = kbGetBlockID("%SrcObject%"); </Command>
    <Command>xsSetContextPlayer(%PlayerID%);</Command>
    <Command>if(kbUnitGetActionType(id) == %zActionID%){</Command>
    </Effect>


    <Effect name ="Unit Action QV set">
    <Param name="PlayerID" dispName="$$22301$$Player" varType="string">0</Param>
    <Param name="SrcObject" dispName="Unit" VarType="unit">default</Param>
    <Param name="QV" dispName="QV" VarType="string">Action</Param>
    <Command>trUnitSelectClear();</Command>
    <Command>for(id=0;>1){} id = kbGetBlockID("%SrcObject%"); </Command>
    <Command>xsSetContextPlayer(%PlayerID%);</Command>
    <Command>trQuestVarSet("%QV%",kbUnitGetActionType(id));</Command>
    </Effect>


    I like the last one because then I have one trigger to update the unit action QV periodically, and all my other triggers can use the quest var check condition, which seems to be faster, but if lag is no problem it doesn't matter.
    posted 16 August 2009 03:12 PM EDT (US)     667 / 2506  
    Oh wow, cant beleive it was one thing, because when i first found quest vars i immediately understood them, and this made me think that quest vars don't work for me. Thanks much Hail, but just to clarify, for the timer ms proactive, if its in milliseconds, then if i type 1000 in the box it would be one second? And then for it could i type in 1500 for 1.5 seconds? And also, for some reason, the unit action trigger doesn't seem to like me, i did 10 for move, as in the list, (this was testing elsewhere, just with the unit action) and then when my unit obviously was moving, the effect never fired. Also, i tried 17 for work, because i think that is the default setting for any unit doing stuff to another unit, like attacking, and when my unit attacked, it didnt work.

    Also, what about the transform trigger problems im having? Need those fixed as well.
    Or another alternative method which is more like what you're doing

    Looped
    Condition Timer ms Proactive: trQuestVarGet("RegenTime")
    Effect Damage unit: -1

    And again, have a trigger for each action.
    Condition Unit Action
    Effect Quest Var Set: RegenTime to whatever value corresponds to the action.
    So hail, for this line up, which, I will be doing, in the top one, the timer ms ppro, do i type in trQuestVarGet("THE NAME OF MY QUEST VAR HERE?")

    And then in the bottom trigg, do i do qv set?, and the value would be the time i want heal? if in timer ms, then 1500 for 1.5 second? And couldnt i set the var before on a different trigg and then use modify var instead of set each action?

    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.

    [This message has been edited by WinstonShnozwick (edited 08-16-2009 @ 03:19 PM).]

    posted 16 August 2009 03:59 PM EDT (US)     668 / 2506  
    for the timer ms proactive, if its in milliseconds, then if i type 1000 in the box it would be one second? And then for it could i type in 1500 for 1.5 seconds?
    Bingo.
    And also, for some reason, the unit action trigger doesn't seem to like me, i did 10 for move, as in the list, (this was testing elsewhere, just with the unit action) and then when my unit obviously was moving, the effect never fired. Also, i tried 17 for work, because i think that is the default setting for any unit doing stuff to another unit, like attacking, and when my unit attacked, it didnt work.
    It's weird. Try 11 (MoveByGroup) instead of just Move. I don't know why, but that seems to be the action that is used for moving. I'm not sure what to do for work, probably HandAttack or RangedAttack. I'm not sure if the generic Attack (18) will do it.

    To figure out what the action IDs are, you can use the unit action set QV effect I just posted, and use Quest Var Echo, then tell your unit to do various things.
    So hail, for this line up, which, I will be doing, in the top one, the timer ms ppro, do i type in trQuestVarGet("THE NAME OF MY QUEST VAR HERE?")
    Yes, but if the box doesn't let you type it, you have to type it somewhere else (trigger or effect names let you type) and copy/paste it into the right box.
    And then in the bottom trigg, do i do qv set?, and the value would be the time i want heal? if in timer ms, then 1500 for 1.5 second? And couldnt i set the var before on a different trigg and then use modify var instead of set each action?
    You could do that, but if the unit stayed at the same action for a while, wouldn't the regen right keep running away in the same direction? You could do that as well, but I would recommend setting some bounds (using conditional Quest Var Check).
    Another alternative would be to set the different regeneration rights as QVs - something like RegenIdle = 1.0, RegenMove = 1.5, RegenWork = 2.
    And instead of using quest var set, use quest var copy, and copy the value from the appropriate QV into your current regen rate. This means that if you decide to change the regen rates, you can do it all in one spot instead of chasing it from trigger to trigger.

    [This message has been edited by HailToTheOboe (edited 08-16-2009 @ 04:00 PM).]

    posted 16 August 2009 05:25 PM EDT (US)     669 / 2506  
    Great, don't know how you can put up with all this hail, but thanks lots. You fixed all my problems there, which i needed alot for my combination effects, Ill put you in the credits for that one.

    And finally, just 2 more things. Im going to go with the simplest path on my regen system.
    Regen Trigger: High priority, loop, active
    Condition: Timer ms Proactive: trQuestVarGet("RegenTime")
    Effect Damage unit: -1

    And then a trigger for each action.(idle, move, and attack)
    Condition: Unit Action
    Effect Quest Var Set: RegenTime to whatever value corresponds to the action.

    But im worried, that for the qvset, will it just change that one RegenTime qv to the new number? Or will it spam up thousands of qv's all called regentime, as it is qvset.
    Or would i also be able to use qvmodify Regentime = my number? or is = not something i can do for modify.


    Second request, final hopefully, then you can rest.

    I just want two triggers here, simple one for you.

    Type: Effect
    Name: Convert Protounit
    Description: This is like the transform trigger, simple, you just have two boxes, first to select the protounit to convert, the second to select the player to convert to. And it converts every single protounit on the map to the designated player. And it works reguardless of what players the units belonged to before. It converts from all players to the selected player.

    I read about this one from a nottud forumn thread,

    Type: Effect
    Name: Change All Units on the map
    Description: Just like transform, all the same, except it changes all protounits to new instead of transforming. And if you could, maybe make it specific to player? so i can select the players units i want to change. But give me both versions still if you can.

    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.

    [This message has been edited by WinstonShnozwick (edited 08-16-2009 @ 05:26 PM).]

    posted 16 August 2009 06:28 PM EDT (US)     670 / 2506  
    I never rest.

    For QV Set, you don't need to worry about it, it sets the value of the old QV instead of generating a new one, so there is no problem setting the same QV many times.


    I made this one a while ago based on some other effects from invent00r's Proactive triggers. To use the whole map, just make the area really big.
    <Effect name="Convert Units in Area">
    <Param name="DstObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
    <Param name="PlayerID" dispName="From Player" VarType="long">1</Param>
    <Param name="PlayerID2" dispName="To Player" VarType="long">0</Param>
    <Param name="ProtoName" dispName="$$22434$$FromProtoName" varType="protounit">Villager</Param>
    <Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</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, %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>trUnitConvert(%PlayerID2%);</Command>
    <Command>xsSetContextPlayer(oldPlayer);</Command>
    </Effect>

    edit: woops that one only works from 1 player to another. I think pftq might have something helpful for converting from all players to 1. I'll go looking. /edit.

    For Change All Units on Map, I believe those were a precursor to nottud's ySearch triggers. You're better off looking up the search triggers and using them; I believe their performance was significantly improved and they have much greater flexibility. You'd use them sort of like this

    ySearch Start (w reboot system)
    yCondition - Is Protounit
    yChange Type
    yCondition zEnd
    ySearch End (w reboot system)

    [This message has been edited by HailToTheOboe (edited 08-16-2009 @ 06:29 PM).]

    posted 16 August 2009 08:42 PM EDT (US)     671 / 2506  
    I have a request:

    I need some kind of trigger "system" that will allow me to change the type of unit corpses that are near a unit (Which is obviously alive) into shades.

    If you don't understand what I want, it is basically to accomplish this PASSIVE ability:
    Name: Carleith the Necromancer
    Creator: Henrz - Pharaoh
    Description:An untrustworthy man, after suffering a near death experience, he had gained the ability to contact the world of the death and introduce it to the world of the living, now he offers his services to the empire that saved his life.
    Passive: Seal of Death- All units that die near Carleith turn into shades to avenge their own deaths.
    Ability 1: Play Dead- Carleith turns into a dead body for 10 seconds. (Invincible, low attack)
    Ability 2: Summon the Dead- Summons several invincible minions from the ground (Invincible, low attack)
    Ability 3: Undead- When Carleith dies he turns into an Undead, and doesn't lose a life, which is 5 times as strong, but has less health and you turn into the normal Pharaoh with half your health when you die (No other ability can be used with this).

    All his abilities have been made except for his passive, I seriously need nottud to make the search magic for Carleith's seal of death ;p.

    The Gods have left us, therefore making the old world crumble and turn into ashes...

    But as the gods return, from the ashes of the old world, shall rise a more beautiful and powerful new world, and life will begin once more, if they hadn't closed...dang you ES.
    posted 16 August 2009 09:51 PM EDT (US)     672 / 2506  
    If you want to count the deat units in an area, and deploy that many shades/minions, take a look at the QV Set Units in Area (army) I just made for SoV, or the non-army version by pftq.

    Maybe it'll work.
    posted 16 August 2009 09:54 PM EDT (US)     673 / 2506  
    The most I've done is change a number into a qv. I think thats just about all the triggers I'll need but you never know lol. Thank you again. You will recieve endless credit.:P

    ____________
    +|||SwordOfValor|||+
    A Proud Member Of
    0==[==========>
    ValorStudios
    <==========]==0

    [This message has been edited by SwordOfValor (edited 08-16-2009 @ 10:05 PM).]

    posted 17 August 2009 05:41 AM EDT (US)     674 / 2506  
    Thanks Elrich I'll give yo credit in my map for making that effect

    My Upcoming website!
    The Black Hand RPG - Revived
    Join my Facebook Group :P
    Nazi Zombie Verukkt sound files
    Mess With The BesT DiE LiKe ThE ReST
    Argh!! It's EXOLAR not xEXOLARx get it right!!
    posted 17 August 2009 08:53 AM EDT (US)     675 / 2506  
    you're quite welcome

    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 ··· 25 26 27 28 29 ··· 40 ··· 50 ··· 60 ··· 70 ··· 80 ··· 90 ··· 100 ··· 101  Next Page »
    Age of Mythology Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
    Top
    You must be logged in to post messages.
    Please login or register
    Hop to:    
    Age of Mythology Heaven | HeavenGames