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

Scenario Design
Moderated by MosheLevi, Mister SCP

Hop to:    
Welcome! You are not logged in. Please Login or Register.847 replies, Sticky
Age of Empires III Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
Bottom
Topic Subject:Have a Trigger Request? Post it here!
« Previous Page  1 ··· 8 9 10 11 12 ··· 20 ··· 30 ··· 34  Next Page »
Mister SCP
Scenario Reviewer
posted 05-22-09 02:11 AM EDT (US)         
So you have a 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.


    ------------------------------------------------------------ --------------------

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

    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 AOE§ installation folder. C:\Program Files\Microsoft Games\Age of Empires3 by default).
    Now open the trigger folder if you use vanilla -trigger1, if you use TWC -trigger2, and finally if you use TAD go to -trigger3.
    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 ,
    if you requested an effect paste it right above . Note the "s" at the end of both tags.

    Notes:

  • When copying the trigger from someone please click first and only then copy the required code.

  • If you're still uncomfortable with installing triggers please backup the original typetest file, i.e. copy the original to another folder.

    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.


    Help! My triggers have stopped working! If this doesnt help you can send an email including your scenario to mister.scp@gmail.com.


    ------------------------------------------------------------ --------------------

    Recommended Downloads:
    -Advanced Trigger Set
    -My Trigger Set
    -Gunner`s Trigger Set
    -Random22`s Trigger Set
    -Hedanito`s Trigger Set
    -Kolt`S Trigger Set
    -SH Trigger
    -M925's Trigger Set

    ------------------------------------------------------------ --------------------


    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. An example can be a great help when requesting complex triggers.

    [b]Name[/b]
    [b]Description[/b]
    [b]Params[/b]
    (A List of Params. If you are pretty nice you set them in the context with your request.)


    Unfinished Requests

    -a lot

    Finished Requests
    -even more (list isnt up to date)

    Not Possible:
    -Fixing Modify Protounit
    -Fixing Chat Contain
    -Change name of the protounit which affect also the name when you train it
    ------------------------------------------------------------ --------------------
    Additional: XS - Basics (mostly based on pftq's guide for XS - Effects + Conditions)

    XS - Triggers are a bit different from other triggers, since they use strings instead for e.g. PlayerID, Unit Select...
    The key highlight of these effects/conditions is to allow Unit Selections to be specified by number or QV. This makes great use of the effects which set QV to an OBJECT ID and opens up a whole new world of possibilites.

    This includes all original and new effects/conditions with ALL appliable fields set to use ANY form of data, including but not limited to:
  • -- Quest Var Code: enter trQuestVarGet("QVNAME")
  • -- Player Stats: enter trGetStatValue(PLAYER, STATID_NUMBER) e.g. trGetStatValue(1, 2)-> count "Enemy Units Killed" for Player 1
  • -- Math Operations: (5*PlayerStat) ...allowed are + - * / as Math Operations
  • -- Any XS Code: (just open the typetest.xml and start digging!)

    typical strings: (strings with * have additional informations on the bottom)
  • Amount (of resources), Radius, Headings, Duration, Damage Percent, Count (e.g. in Army Deploy), Rate (e.g. of Construction), Value
  • the table of PlayerID´s is a string
  • Operators* (don't use any numbers for them!)
  • Center Unit OBJECT ID/Source Unit OBJECT ID/Target Unit OBJECT ID **
  • Unit Type ID /ProtounitID ***



  • *Operators you can use are:
    == equal to
    >= equal to or higher
    <= equal to or lower
    > higher
    < lower
    != is not equal to

  • **The Unit Selections require an OBJECT ID. This is NOT the same as a NAME ID (like in Reyk's triggers). To find an OBJECT ID, use the supplied "QV Set.. OBJECT ID" effects OR select a unit and open the "Object Info" window. Open the Object Debug Info Window if you are using Age of Empires III and the ID is not readily available in the "Object Info".


    The first amount show you the Unit ID, every unit have a unique one. The third amount show you the Unit Type ID/ Protounit ID. Every MercJaeger have the ProtounitID -387-. Note that you can select ALL Units with Unit ID's but not even all with Protounit ID like cinematic blocks.

    1. ***TO USE NAME IDS: If you have the Name ID of a unit, you can convert it to OBJECT ID by using the kbGetBlockID("") function.
    2. ***For string (text) IDs, example: kbGetBlockID("ThisIsMyUnit")
    3. ***For QV, example: kbGetBlockID(""+trQuestVarGet("ThisIsMyQV"))
    4. ***For # NAME ID, example: kbGetBlockID("NUMBER")
      *** Generally, you can use kbGetBlockID(""+ID) for all, except text. As said above, enclose the text entirely with the quotes.


~MisterSCP


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 08-21-2011 @ 03:07 AM).]

AuthorReplies:
musketeer925
Skirmisher
posted 02-17-10 03:20 PM EDT (US)     226 / 847       
Back again; Do you think you could make an QV Exponential Growth effect? (I'll explain this, since it's a bit of tricky algrebra.)

y=abx

Params: Input (a QV) This is the A
Growth Rate; This is B, input for this is another QV
Power: x, this one also yet another QV
Output: y, this would be a QV whre the answer gets put...
and maybe one thats an On or Off button for replacing or adding to the output QV

THis would be really great. I could do this with just a lot of effects, but that takes forever, and I'm lazy.

[This message has been edited by musketeer925 (edited 02-17-2010 @ 03:27 PM).]

Mister SCP
Scenario Reviewer
posted 02-17-10 05:34 PM EDT (US)     227 / 847       
<Effect name="QV Exponent (ab^x) *TL*"> <Param name="a" dispName="a" VarType="string">1.0</Param> <Param name="b" dispName="b" VarType="string">1.0</Param> <Param name="x" dispName="x (integers)" VarType="string">2</Param> <Param name="R2" dispName="post/neg x " varType="bool">true</Param> <Param name="QV" dispName="Count(Var name)" VarType="string">QV1</Param> <Param name="R3" dispName="Clear QV first " varType="bool">false</Param> <Param name="Note" dispName="Note" VarType="string">If you set 'clear QV first' as -false- the current value will add to the result so you can count multiple units under same QV.</Param> <Command>if (%R3%==false)trQuestVarSet("%QV%", 0);</Command> <Command>fla=1; for (i=%x%;>0) fla=fla*%b%;</Command> <Command>if (%R2%)trQuestVarSet("%QV%",trQuestVarGet("%QV%")+fla*%a%);</Command> <Command>else trQuestVarSet("%QV%",trQuestVarGet("%QV%")+%a%*(1.0/fla));</Command> </Effect>


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 02-18-2010 @ 04:35 AM).]

musketeer925
Skirmisher
posted 02-17-10 05:56 PM EDT (US)     228 / 847       
Thanks alot, I expected that to take longer, but anyway, I probably won't need negative values.
Mister SCP
Scenario Reviewer
posted 02-17-10 06:04 PM EDT (US)     229 / 847       
neg values added+floating number support
new version requires typeloader

keep in mind that a+b might works better if you do it with "."
e.g 1.0 instead of 1 or 25.0 instead of 25

Do not write in "x" e.g. -4. Write 4 and press the booler for neg values

btw. tell me if you need square roots ;-)


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 02-18-2010 @ 04:34 AM).]

Mister SCP
Scenario Reviewer
posted 02-18-10 04:33 AM EDT (US)     230 / 847       
        <Effect name="QV Exponent (ab^x) *TL*">
<Param name="a" dispName="a" VarType="string">1.0</Param>
<Param name="b" dispName="b" VarType="string">1.0</Param>
<Param name="x" dispName="x (integers)" VarType="string">2</Param>
<Param name="QV" dispName="Count(Var name)" VarType="string">QV1</Param>
<Param name="R3" dispName="Clear QV first " varType="bool">false</Param>
<Param name="Note" dispName="Note" VarType="string">If you set 'clear QV first' as -false- the current value will add to the result so you can count multiple units under same QV.</Param>
<Command>if (%R3%==true)trQuestVarSet("%QV%", 0);</Command>
<Command>if (%x%>=0){</Command>
<Command>fla=1; for (i=%x%;>0) fla=fla*%b%;</Command>
<Command>trQuestVarSet("%QV%",trQuestVarGet("%QV%")+fla*%a%);}</Command>
<Command>else {fla=1; for (i=0;>%x%) fla=fla*%b%;</Command>
<Command>trQuestVarSet("%QV%",trQuestVarGet("%QV%")+%a%*(1.0/fla));}</Command>
</Effect>

latest version:
fix->no more pos/neg switch, you can type in directly if you need a negativ or positiv exponent
fix->Clear QV first (worked if you set it false and didnt worked if you set it true)

especially with neg. exponents use 1.0 instead of 1 (with a and b) else your numbers might not be exact (e.g. 0.4 ->0, 0.62->0, 5.97->5 since it cut all decimals if you don't do
       <Effect name="QV Count Units in Area">
<Param name="DstObject" dispName="Center Unit" VarType="unit">default</Param>
<Param name="Player" dispName="Player" VarType="player">1</Param>
<Param name="UnitType" dispName="$$22302$$Unit Type" VarType="string">Unit</Param>
<Param name="Dist" dispName="Radius" VarType="float">10</Param>
<Param name="QV" dispName="Count(Var name)" VarType="string">QV1</Param>
<Param name="R3" dispName="Clear QV first " varType="bool">false</Param>
<Param name="Note" dispName="Note" VarType="string">If you set 'clear QV first' as -false- the current value will add to the result so you can count multiple units under same QV.</Param>
<Command>if (%R3%==true)trQuestVarSet("%QV%", 0);</Command>
<Command>trQuestVarSet("%QV%",trQuestVarGet("%QV%")+trCountUnitsInArea("%DstObject%",%Player%,"%UnitType%",%Dist%));</Command>
</Effect>
->fix: Clear QV first


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
musketeer925
Skirmisher
posted 02-18-10 05:44 PM EDT (US)     231 / 847       
I've managed to make my typetest stop working, would you mind emailing me your trigger folder? (Yeh, the whole thing, just cause I've added a lot of triggers to my typetest, and if you send me your whole folder, I'll be sure to get them all.)

Nevermind, I'm good. I got tired of waiting, so I overcame my laziness and redownloaded everything, and realized there were some I had never downloaded, so now I have more than before! (Yay!)

On a not as happy note, I finally got to looking the the Exponential Growth effect, and I found it wasn't quite what I wanted. I kinda wanted (and less wanted, more needed for my scenario to work) The inputs like a, b, and x to be QVs, so I can say, have "a" be QV5 or whatever.

Also, I'm asuming the Param you have titled "Count(Var name)" is the output QV? That could certainly be better titled. (Ofc, I know how to change that, but not the rest, and if your in there anyway...)


And lastly, (Wow... this post is turning into an essay it's so long.) while I was reinstalling all the triggers, I found/remebered the trigger I made:


<Effect name="Forbid Age IV Asian Civs">
<Param name="PlayerID" dispName="$$22301$$Player" VarType="player">1</Param>
<Command>trForbidProtounit(%PlayerID%, "ypWJToshoguShrine4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWJGoldenPavillion4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWJGiantBuddha4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWJToriiGates4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWJShogunate4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWCWhitePagoda4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWCTempleOfHeaven4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWCSummerPalace4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWCPorcelainTower4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWCConfucianAcademy4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWITowerOfVictory4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWITajMahal4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWIKarniMata4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWICharminarGate4");</Command>
<Command>trForbidProtounit(%PlayerID%, "ypWIAgraFort4");</Command>
</Effect>


It forbids all the wonders so the Asian civs cant age up to Age IV with a vil. Very useful in a CnM scenario/rms.

[This message has been edited by musketeer925 (edited 02-19-2010 @ 07:38 PM).]

Mister SCP
Scenario Reviewer
posted 02-21-10 08:10 AM EDT (US)     232 / 847       

<Effect name="QV Exponent (ab^x) *TL*">
<Param name="QV1" dispName="a" VarType="string">QV1</Param>
<Param name="QV2" dispName="b" VarType="string">QV2</Param>
<Param name="QV3" dispName="x (integers)" VarType="string">QV3</Param>
<Param name="QV" dispName="Output" VarType="string">QV4</Param>
<Param name="R3" dispName="Clear QV first " varType="bool">false</Param>
<Param name="Note" dispName="Note" VarType="string">If you set 'clear QV first' as -false- the current value will add to the result so you can count multiple units under same QV.</Param>
<Command>if (%R3%==true)trQuestVarSet("%QV%", 0);</Command>
<Command>if (trQuestVarGet("%QV3%")>=0){</Command>
<Command>fla=1; for (i=trQuestVarGet("%QV3%");>0) fla=fla*trQuestVarGet("%QV2%");</Command>
<Command>trQuestVarSet("%QV%",trQuestVarGet("%QV%")+fla*trQuestVarGet("%QV1%"));}</Command>
<Command>else {fla=1; for (i=0;>trQuestVarGet("%QV3%")) fla=fla*trQuestVarGet("%QV2%");</Command>
<Command>trQuestVarSet("%QV%",trQuestVarGet("%QV%")+trQuestVarGet("%QV1%")*(1.0/fla));}</Command>
</Effect>

just a small hint instead of numbers you could use QV's by typing trQuestVarGet("QVName") for the number fields.


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 02-22-2010 @ 12:04 PM).]

As_Saffah
Scenario Reviewer
posted 02-22-10 02:36 PM EDT (US)     233 / 847       
Say MisterSCP, can you make a trigger that replaces a particular unit's speech sounds with a given file set? Cross-posting from here. Basically I need to have several SPC and some mercenary units speak Lakota (or another language set, later on in the scenario) but do not want to write a mod.

If a trigger exists for this action, or condition and effect exist for this, what would the trigger be?

Crunkatog on ESO
Bart331 balance suggestion: aztec: remove civ
Voltiguer: Ender, Sioux in 1.04 will be a top civ, no matter how many layers of Sioux goggles you put on
schildpad on Elephants: ...their mansabdar unit sucks so hard it looks like a black hole
Crunkatog on Steam.
Mister SCP
Scenario Reviewer
posted 02-23-10 10:05 AM EDT (US)     234 / 847       
Say MisterSCP, can you make a trigger that replaces a particular unit's speech sounds with a given file set? Cross-posting from here. Basically I need to have several SPC and some mercenary units speak Lakota (or another language set, later on in the scenario) but do not want to write a mod.
In mp it is not really possible. Even if you figure out a way to replace it on the right moments everyone would hear this sounds

in sp a possible structure could be
Condition: Unit Selected+Unit Action changed
Effect:Block All Sounds
Sound Filename
Unblock all Sounds


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
musketeer925
Skirmisher
posted 02-23-10 04:10 PM EDT (US)     235 / 847       

<Effect name="QV Exponent (ab^x) *TL*">
<Param name="QV1" dispName="a" VarType="string">QV1</Param>
<Param name="QV2" dispName="b" VarType="string">QV2</Param>
<Param name="QV3" dispName="x (integers)" VarType="string">QV3</Param>
<Param name="QV" dispName="Output" VarType="string">QV4</Param>
<Param name="R3" dispName="Clear QV first " varType="bool">false</Param>
<Param name="Note" dispName="Note" VarType="string">If you set 'clear QV first' as -false- the current value will add to the result so you can count multiple units under same QV.</Param>
<Command>if (%R3%==true)trQuestVarSet("%QV%", 0);</Command>
<Command>if (trQuestVarGet("%QV3%")>=0){</Command>
<Command>fla=1; for (i=trQuestVarGet("%QV3%");>0) fla=fla*trQuestVarGet("%QV2%");</Command>
<Command>trQuestVarSet("%QV%",trQuestVarGet("%QV%")+fla*trQuestVarGet("%QV1%"));}</Command>
<Command>else {fla=1; for (i=0;>trQuestVarGet("%QV3%")) fla=fla*trQuestVarGet("%QV2%");</Command>
<Command>trQuestVarSet("%QV%",trQuestVarGet("%QV%")+trQuestVarGet("%QV1%")*(1.0/fla));}</Command>
</Effect>

It appears it still doesn't quite work, It's not outputing to the output. It does claer the output QV/ or not, whatever you said, but it doesn't actually add the result of abx to the output QV.

[This message has been edited by musketeer925 (edited 02-23-2010 @ 04:11 PM).]

Mister SCP
Scenario Reviewer
posted 02-24-10 09:54 AM EDT (US)     236 / 847       
It appears it still doesn't quite work, It's not outputing to the output. It does claer the output QV/ or not, whatever you said, but it doesn't actually add the result of abx to the output QV.
check:
Clear QV true:->clears Qv
false:->don't clear QV
-1>x>1 will everytime result 0


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
musketeer925
Skirmisher
posted 02-24-10 08:56 PM EDT (US)     237 / 847       
Why does between -1 and 1 make it 0? x was 1, I assume that also makes it 0? I guess i can make it like 1.001 or something, lol.
Mister SCP
Scenario Reviewer
posted 03-09-10 04:13 PM EDT (US)     238 / 847       
totally forgot about this post.
well exponent work like
e.g. a²
a*a
for a^5
a*a*a*a*a
a^0
is handled like a=1, but i didn't thought of this case when creating this trigger so in case a^0->y=b*(0*a). Since this looping thing could only work with integers 1,2 for x will bring same result as 1.

for adding numbers which are no integers I need to take roots of the numbers and i have no clue how to take the fith root (x 0,4->exponent would be 2 and then i need to do the fith root. For 1,2 ->exponent would be 6 and i would need the fith root. But i don't know how to tell it which root is required...

well i could add the case that a is 0 (1>a>-1)


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 03-09-2010 @ 04:15 PM).]

musketeer925
Skirmisher
posted 04-05-10 12:43 PM EDT (US)     239 / 847       
Ok, back again. Can you make a trigger: (What else would I be here for?)

Damage Units near Protounit

Params:

Center Protounit
Player
Protounit (The one being Damages)
Player
Damage(Amount)
Radius
And I guess the Alive Dead thing from the below trigger, wasn't really sure what that did.

This trigger seems to be the best thing to start with:

<Effect name="Unit Create At Protounit">
<Param name="PlayerID" dispName="Object Player" varType="string">0</Param>
<Param name="Object" dispName="Object Protounit" varType="protounit">Villager</Param>
<Param name="Heading" dispName="Object Heading" varType="string">0</Param>
<Param name="Target" dispName="Target Protounit" varType="protounit">Villager</Param>
<Param name="PlayerID2" dispName="Target Player" varType="string">0</Param>
<Param name="Condition" dispName="Target Alive/Dead" varType="bool">true</Param>
<Command>for(Qid=1;>0) {}</Command>
<Command>xsSetContextPlayer(%PlayerID2%);</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>Qid=kbUnitQueryCreate("QueryProtounit");</Command>
<Command>kbUnitQuerySetPlayerID(Qid, %PlayerID2%, true);</Command>
<Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%Target%"));</Command>
<Command>if(%Condition%==true)kbUnitQuerySetState(Qid, 2);</Command>
<Command>else kbUnitQuerySetState(Qid, 4);</Command>
<Command>for(i=kbUnitQueryExecute(Qid)-1;>-1)</Command>
<Command>trUnitCreate("%Object%", "default", xsVectorGetX(kbUnitGetPosition(kbUnitQueryGetResult(Qid, i))),xsVectorGetY(kbUnitGetPosition(kbUnitQueryGetResult(Qid, i))),xsVectorGetZ(kbUnitGetPosition(kbUnitQueryGetResult(Qid, i))), %Heading%, %PlayerID%);</Command>
</Effect>
Mister SCP
Scenario Reviewer
posted 04-05-10 12:50 PM EDT (US)     240 / 847       
    <Effect name="Damage Units in areas">
<Param name="Object" dispName="Center Unit" varType="unit">default</Param>
<Param name="UnitId" dispName="Unit Type ID (Optional)" varType="string">-1</Param>
<Param name="FromPlayer" dispName="Select units from player or 99 for ALL" varType="string">99</Param>
<Param name="Booler" dispName="Include Center Unit" varType="bool">false</Param>
<Param name="PlayerID2" dispName="Damage Units from Player" VarType="player">2</Param>
<Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
<Param name="Damage" dispName="$$25479$$Damage" varType="float">50</Param>
<Param name="UnitType" dispName="$$22302$$Unit Type" VarType="unittype">Unit</Param>
<Command>trQuestVarSet("convarea", 0);</Command>
<Command>trQuestVarSet("ffweho",0);</Command>
<Command>if(%FromPlayer%!=99) trQuestVarSet("vroom", %FromPlayer%);</Command>
<Command>trQuestVarSet("warthog", 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>xsSetContextPlayer(0);</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>if(%FromPlayer%!=99) trQuestVarSet("blarg",%FromPlayer%);</Command>
<Command>if(%FromPlayer%==99) {</Command>
<Command>trQuestVarSet("blarg",0);</Command>
<Command>trQuestVarSet("vroom",8);</Command>
<Command>}</Command>
<Command>trQuestVarSet("i",trQuestVarGet("blarg"));</Command>
<Command>while(trQuestVarGet("vroom")>=trQuestVarGet("i")) {</Command>
<Command>trQuestVarSet("convarea", kbUnitQueryCreate("convarea"));</Command>
<Command>kbUnitQuerySetPlayerID(trQuestVarGet("convarea"), trQuestVarGet("i"));</Command>
<Command>kbUnitQuerySetUnitType(trQuestVarGet("convarea"), trQuestVarGet("zeep"));</Command>
<Command>kbUnitQuerySetPosition(trQuestVarGet("convarea"), kbGetBlockPosition(""+1*%Object%));</Command>
<Command>kbUnitQuerySetMaximumDistance(trQuestVarGet("convarea"), 1000);</Command>
<Command>kbUnitQuerySetAscendingSort(trQuestVarGet("convarea"), true);</Command>
<Command>kbUnitQueryResetResults(trQuestVarGet("convarea"));</Command>
<Command>trQuestVarSet("warthog", kbUnitQueryExecute(trQuestVarGet("convarea")));</Command>
<Command>while(trQuestVarGet("warthog")>0) {</Command>
<Command>trQuestVarSet("warthog", trQuestVarGet("warthog")-1);</Command>
<Command>trQuestVarSet("ffweho", kbUnitQueryGetResult(trQuestVarGet("convarea"), trQuestVarGet("warthog")));</Command>
<Command>trQuestVarSet("ffweho2", trQuestVarGet("ffweho"));</Command>
<Command>if(%Booler%==true) {</Command>
<Command>if(trQuestVarGet("ffweho2")==kbGetBlockID(""+1*%Object%)) {trQuestVarSet("ffweho2", trQuestVarGet("ffweho")+1);}}</Command>
<Command>if(trQuestVarGet("ffweho2")!=kbGetBlockID(""+1*%Object%)) {</Command>
<Command>trUnitSelectClear();</Command>
<Command>trUnitSelectByID(1*trQuestVarGet("ffweho"));</Command>
<Command>trDamageUnitsInArea(%PlayerID2%,"%UnitType%",%Dist%,Úmage%);</Command>
<Command>}}</Command>
<Command>trQuestVarSet("i", trQuestVarGet("i")+1);}</Command>
<Command>xsSetContextPlayer(trQuestVarGet("lastpl"));</Command>
</Effect>
thats what i had did, ino my english isnt that good, so i cant thinnk of such a good title


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 04-05-2010 @ 12:51 PM).]

As_Saffah
Scenario Reviewer
posted 04-05-10 01:19 PM EDT (US)     241 / 847       
pftq had a similar trigger, and it looks like you've adapted it to a new use. I have to look carefully at the code for each, maybe it should be renamed if it does something different.

edit: the trigger you made does what musketeer wants.

It should be renamed "Damage Units in Any Area Near Protounit" because it can be multifocal.

Crunkatog on ESO
Bart331 balance suggestion: aztec: remove civ
Voltiguer: Ender, Sioux in 1.04 will be a top civ, no matter how many layers of Sioux goggles you put on
schildpad on Elephants: ...their mansabdar unit sucks so hard it looks like a black hole
Crunkatog on Steam.

[This message has been edited by As_Saffah (edited 04-05-2010 @ 01:20 PM).]

musketeer925
Skirmisher
posted 04-05-10 08:35 PM EDT (US)     242 / 847       
I changed the name when I added it to my trigger file, he just forgot to change it.
Rangerharry
Skirmisher
posted 05-25-10 02:28 AM EDT (US)     243 / 847       
A new request:
Change unit type in area
A similiar to change unit type but changes all units type in area
Params:
center unit
whose players units change (just one player or all)
area
protounit the units change to
Mister SCP
Scenario Reviewer
posted 05-25-10 04:15 PM EDT (US)     244 / 847       
If you want do with ID's use:
<Effect name="Change All Units In Area (Center Unit)"> <Param name="Object" dispName="Center Unit" varType="unit">default</Param> <Param name="Dst" dispName="Radius" varType="string">10.0</Param> <Param name="UnitId" dispName="Unit Type ID (Optional)" varType="string">-1</Param> <Param name="FromPlayer" dispName="From Player or 99 for ALL" varType="string">99</Param> <Param name="To" dispName="Protounit" varType="protounit">default</Param> <Param name="Booler" dispName="Include Center Unit" varType="bool">false</Param> <Command>trQuestVarSet("convarea", 0);</Command> <Command>trQuestVarSet("ffweho",0);</Command> <Command>if(%FromPlayer%!=99) trQuestVarSet("vroom", %FromPlayer%);</Command> <Command>trQuestVarSet("warthog", 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>xsSetContextPlayer(0);</Command> <Command>kbLookAtAllUnitsOnMap();</Command> <Command>if(%FromPlayer%!=99) trQuestVarSet("blarg",%FromPlayer%);</Command> <Command>if(%FromPlayer%==99) {</Command> <Command>trQuestVarSet("blarg",0);</Command> <Command>trQuestVarSet("vroom",8);</Command> <Command>}</Command> <Command>trQuestVarSet("i",trQuestVarGet("blarg"));</Command> <Command>while(trQuestVarGet("vroom")>=trQuestVarGet("i")) {</Command> <Command>trQuestVarSet("convarea", kbUnitQueryCreate("convarea"));</Command> <Command>kbUnitQuerySetPlayerID(trQuestVarGet("convarea"), trQuestVarGet("i"));</Command> <Command>kbUnitQuerySetUnitType(trQuestVarGet("convarea"), trQuestVarGet("zeep"));</Command> <Command>kbUnitQuerySetPosition(trQuestVarGet("convarea"), kbGetBlockPosition(""+1*%Object%));</Command> <Command>kbUnitQuerySetMaximumDistance(trQuestVarGet("convarea"), %Dst%);</Command> <Command>kbUnitQuerySetAscendingSort(trQuestVarGet("convarea"), true);</Command> <Command>kbUnitQueryResetResults(trQuestVarGet("convarea"));</Command> <Command>trQuestVarSet("warthog", kbUnitQueryExecute(trQuestVarGet("convarea")));</Command> <Command>while(trQuestVarGet("warthog")>0) {</Command> <Command>trQuestVarSet("warthog", trQuestVarGet("warthog")-1);</Command> <Command>trQuestVarSet("ffweho", kbUnitQueryGetResult(trQuestVarGet("convarea"), trQuestVarGet("warthog")));</Command> <Command>trQuestVarSet("ffweho2", trQuestVarGet("ffweho"));</Command> <Command>if(%Booler%==true) {</Command> <Command>if(trQuestVarGet("ffweho2")==kbGetBlockID(""+1*%Object%)) {trQuestVarSet("ffweho2", trQuestVarGet("ffweho")+1);}}</Command> <Command>if(trQuestVarGet("ffweho2")!=kbGetBlockID(""+1*%Object%)) {</Command> <Command>trUnitSelectClear();</Command> <Command>trUnitSelectByID(1*trQuestVarGet("ffweho"));</Command> <Command>trUnitChangeProtoUnit("%To%");</Command> <Command>}}</Command> <Command>trQuestVarSet("i", trQuestVarGet("i")+1);}</Command> <Command>xsSetContextPlayer(trQuestVarGet("lastpl"));</Command> </Effect>
(credit goes to pftq)
If you want do it with unit names do:

<Effect name="Change All Units In Area 2 (Center Unit)"> <Param name="Object" dispName="Center Unit" varType="unit">default</Param> <Param name="Dst" dispName="Radius" varType="string">10.0</Param> <Param name="PN" dispName="$$19160$$Unit" VarType="protounit">Villager</Param> <Param name="FromPlayer" dispName="From Player or 99 for ALL" varType="string">99</Param> <Param name="To" dispName="Protounit" varType="protounit">default</Param> <Param name="Booler" dispName="Include Center Unit" varType="bool">false</Param> <Command>trQuestVarSet("convarea", 0);</Command> <Command>trQuestVarSet("ffweho",0);</Command> <Command>if(%FromPlayer%!=99) trQuestVarSet("vroom", %FromPlayer%);</Command> <Command>trQuestVarSet("warthog", 0);</Command> <Command>trQuestVarSet("lastpl", xsGetContextPlayer());</Command> <Command>xsSetContextPlayer(0);</Command> <Command>kbLookAtAllUnitsOnMap();</Command> <Command>if(%FromPlayer%!=99) trQuestVarSet("blarg",%FromPlayer%);</Command> <Command>if(%FromPlayer%==99) {</Command> <Command>trQuestVarSet("blarg",0);</Command> <Command>trQuestVarSet("vroom",8);</Command> <Command>}</Command> <Command>trQuestVarSet("i",trQuestVarGet("blarg"));</Command> <Command>while(trQuestVarGet("vroom")>=trQuestVarGet("i")) {</Command> <Command>trQuestVarSet("convarea", kbUnitQueryCreate("convarea"));</Command> <Command>kbUnitQuerySetPlayerID(trQuestVarGet("convarea"), trQuestVarGet("i"));</Command> <Command>kbUnitQuerySetUnitType(trQuestVarGet("convarea"), kbGetProtoUnitID("%PN%"));</Command> <Command>kbUnitQuerySetPosition(trQuestVarGet("convarea"), kbGetBlockPosition(""+1*%Object%));</Command> <Command>kbUnitQuerySetMaximumDistance(trQuestVarGet("convarea"), %Dst%);</Command> <Command>kbUnitQuerySetAscendingSort(trQuestVarGet("convarea"), true);</Command> <Command>kbUnitQueryResetResults(trQuestVarGet("convarea"));</Command> <Command>trQuestVarSet("warthog", kbUnitQueryExecute(trQuestVarGet("convarea")));</Command> <Command>while(trQuestVarGet("warthog")>0) {</Command> <Command>trQuestVarSet("warthog", trQuestVarGet("warthog")-1);</Command> <Command>trQuestVarSet("ffweho", kbUnitQueryGetResult(trQuestVarGet("convarea"), trQuestVarGet("warthog")));</Command> <Command>trQuestVarSet("ffweho2", trQuestVarGet("ffweho"));</Command> <Command>if(%Booler%==true) {</Command> <Command>if(trQuestVarGet("ffweho2")==kbGetBlockID(""+1*%Object%)) {trQuestVarSet("ffweho2", trQuestVarGet("ffweho")+1);}}</Command> <Command>if(trQuestVarGet("ffweho2")!=kbGetBlockID(""+1*%Object%)) {</Command> <Command>trUnitSelectClear();</Command> <Command>trUnitSelectByID(1*trQuestVarGet("ffweho"));</Command> <Command>trUnitChangeProtoUnit("%To%");</Command> <Command>}}</Command> <Command>trQuestVarSet("i", trQuestVarGet("i")+1);}</Command> <Command>xsSetContextPlayer(trQuestVarGet("lastpl"));</Command> </Effect>

Params might differ but it shouldnt be a problem


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
Rangerharry
Skirmisher
posted 05-26-10 07:54 AM EDT (US)     245 / 847       
Thanks, both of them work fine, but can I get one or both of them to change all military units, and not just single unit type like in your trigger or only military units and not buildings too like in pqft's one with unit type ID -1?
Mister SCP
Scenario Reviewer
posted 05-26-10 12:53 PM EDT (US)     246 / 847       
use the ID 1857 (means "unit")


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
Jelmer
Skirmisher
posted 06-05-10 01:41 PM EDT (US)     247 / 847       
Hello,

I need a trigger, I don't know if someone already made it but this is what i need:
CONDITION:unit type killed (you can choose wich unit and how much)
I also need this effect:
EFFECT:show quest var (So that you can see on wich nuber it is at the moment, and you have to be able to choose the text in front of it like you can in: counter:add timer/counter:add unit.
EDIT:You can also call it; counter:add QV

P.S. When reading, i saw that modify proto unit cant be fixed, but it works fine on my game, or did es fix it for TWC?

If you did not understand something, feel free to ask.

[This message has been edited by Jelmer (edited 06-05-2010 @ 01:52 PM).]

Mister SCP
Scenario Reviewer
posted 06-07-10 09:54 AM EDT (US)     248 / 847       
Well the first part of this post should show you some now functions in trigonometrie (thx to Mythic Freak and invent00r for developping it for AOM so 95% of credit goes to them)

update Typeloader:


<Effect name="Typeloader (TL)">
<Param name="info1" dispName="Info" varType="string">This trigger loads custom functions that can be used by other triggers.</Param>
<Param name="info2" dispName="Info" varType="string">Please load this effect in an empty trigger before you add triggers that need this.</Param>
<Param name="info3" dispName="Info" varType="string">The triggers requiring this should mention it somewhere. Not all triggers need it.</Param>
<Param name="luis" dispName="AI Get Random:" VarType="strwing">%u</Param>
<Param name="mod" dispName="Don't touch this!" varType="strwing">%%</Param>
<Command>}</Command>
<Command>}</Command>
<Command>const float PI = 3.14159265358979323846;</Command>
<Command>const float e = 2.71828182845904523536;</Command>
<Command>/**/ int tla=0;</Command>
<Command>/**/ int tlb=0;</Command>
<Command>/**/ int tlc=0;</Command>
<Command>/**/ int tlpla=0;</Command>
<Command>/**/ int ucxs=0;</Command>
<Command>/**/ int ress=0;</Command>
<Command>/**/ float fla=0;</Command>
<Command>/**/ float flb=0;</Command>
<Command>/**/ float flc=0;</Command>
<Command>/**/ float flucs=0;</Command>
<!-- Fact n! Math_fact(n)-->
<Command>float Math_fact(int n = 0) {</Command>
<Command> float r = 1;</Command>
<Command>for(i = n; >= 1) {r = r * i;}</Command>
<Command>return (r);</Command>
<Command>}</Command>
<!-- Exponent n^x Math_pow(n,x)-->
<Command>float Math_pow(float n = 0, int x = 0) {</Command>
<Command>float r = n;</Command>
<Command>if (x >=0 ) {</Command>
<Command>for(i = x; > 1) r = r * n;</Command>
<Command>}</Command>
<Command>else</Command>
<Command>{</Command>
<Command>for(i = 0.0-x; > 1) r = r * n;</Command>
<Command>r=1.0/r;}</Command>
<Command>return (r);</Command>
<Command>}</Command>
<!-- Sine ->Radians<- Math_sinRad(n)-->
<Command>float Math_sinRad(float n = 0) { //Matei</Command>
<Command> float r = n;</Command>
<Command> <![CDATA[for(i = 1; < 100) {]]></Command>
<Command> int j = i * 2 + 1;</Command>
<Command> float k = Math_pow(n,j) / Math_fact(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> return (r);</Command>
<Command>}</Command>
<!-- Sine ->Degrees<- Math_sin(n)-->
<Command>float Math_sin(float n = 0) { //Matei</Command>
<Command>n=n*PI/180.0;</Command>
<Command> float r = n;</Command>
<Command> <![CDATA[for(i = 1; < 100) {]]></Command>
<Command> int j = i * 2 + 1;</Command>
<Command> float k = Math_pow(n,j) / Math_fact(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> return (r);</Command>
<Command>}</Command>
<Command>rule _DeclareGlobalsEnd</Command>
<Command>inactive</Command>
<Command>{</Command>
<Command>if (1==1) {</Command>
</Effect>


It finally supports now
a)sinus,factorize and exponents
Sinus: (degrees)
use the function Math_sin(Your Number)
E.G. in QV Set
QV1->Math_Sin(50)

for Radiants use Math_sinRad(Your Number)

Math_fact :Returns the factorial of the given param.
Math_pow(n,x) :Returns the value of the first argument raised to the power of the second argument.



Hello,

I need a trigger, I don't know if someone already made it but this is what i need:
CONDITION:unit type killed (you can choose wich unit and how much)
Well this is not possible. Just possible if you can't anymore build this unit, in this case you can raise kill costs and check the kill costs with another trigger
I also need this effect:
EFFECT:show quest var (So that you can see on wich nuber it is at the moment, and you have to be able to choose the text in front of it like you can in: counter:add timer/counter:add unit.
EDIT:You can also call it; counter:add QV
I ve just in mind to use sth like (do it with 2 QV's)

Trigger1
Condition: Always
QV Set: Your QV
Effect: FakeCounter Set Text ->Your Text "+1*trQuestVarGet("YOUR QV")+" more text here if needed<-

Trigger2
Condition
Quest Var Compare "Your QV" == "Your QV2"
+tick the "NOT"
Effect: same as above+ Quest Var Copy "Your QV2"-"Your QV"

This would also make that if your QV changes it automaticly also change this field. If you need Numbers like 2.300000 instead of just 2 you have to remove "1*" (in front of trQustvarget)



well modify protounit is somehow stupid becase it is e.g. restricted in Attack modify or range


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 06-07-2010 @ 09:59 AM).]

Kaapo
Skirmisher
posted 06-08-10 09:14 AM EDT (US)     249 / 847       
Hi, I got 2 trigger requests relating to each other:

Name: QV grant resources

Description: Grants the QV value amount to a certain resource

and

Name: Set QV by resource value

Description: Assigns a QV for a resource value, updating the QV as the resource value changes

don't know about the parameters, sorry, but I think that gives the picture... I've worked with the editor for a long time but have no idea whatsoever about scripting.
So what I basically would need for the scenario Im making right now, is to grant players an amount of gold each minute depending on their total xp. It could be done with just one trigger too but I thought splitting it into those 2 triggers would make it useful in a lot more different situations... so I'd really appreciate having those 2 triggers, they wouldn't just save a lot of trouble but would rather open a lot new opportunities. Thanks in advance.

EDIT: I didnt look through all pages, so dont know if this has been brought up earlier on

[This message has been edited by Kaapo (edited 06-08-2010 @ 09:17 AM).]

EL_tres
Skirmisher
posted 06-08-10 09:56 AM EDT (US)     250 / 847       
I just need a simple trigger. And I haven't been able to find anything in the forums or online that can help me.


Unit "is killed"(or "delivers lethal dmg") by specific player
« Previous Page  1 ··· 8 9 10 11 12 ··· 20 ··· 30 ··· 34  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires III Heaven | HeavenGames