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.849 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 ··· 10 11 12 13 14 ··· 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:
Mister SCP
Scenario Reviewer
posted 07-18-10 07:02 AM EDT (US)     276 / 849       
Update of Trigpack

Trigpack (by Musk925)

News: The Array Tech System is finally working now
all the kb commands dont work so i finally cant do the army stuff. (Instead of a army you could also use the unit id's and order them in an array)


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 07-18-2010 @ 01:22 PM).]

Pezinator
Skirmisher
posted 07-25-10 10:11 PM EDT (US)     277 / 849       
I need a trigger like 'Distance to unit' but works when the target unit is moving. Can you help me or is there a downloadable trigger like that?
musketeer925
Skirmisher
posted 07-26-10 08:58 AM EDT (US)     278 / 849       
Here you go! Enjoy!

<Condition name="Distance to Unit - Formula">
<Param name="SrcObject" dispName="$$22295$$Source Units" VarType="unit">default</Param>
<Param name="DstObject" dispName="$$22296$$Target Unit" VarType="unit">default</Param>
<Param name="Op" dispName="$$22297$$Operator" VarType="operator">==</Param>
<Param name="Dist" dispName="$$22298$$Distance" VarType="float">0</Param>
<Command>trQuestVarSet("SrcXPos", xsVectorGetX(kbGetBlockPosition(""+1*%SrcObject%)));</Command>
<Command>trQuestVarSet("SrcYPos", xsVectorGetY(kbGetBlockPosition(""+1*%SrcObject%)));</Command>
<Command>trQuestVarSet("SrcZPos", xsVectorGetZ(kbGetBlockPosition(""+1*%SrcObject%)));</Command>
<Command>trQuestVarSet("DstXPos", xsVectorGetX(kbGetBlockPosition(""+1*%DstObject%)));</Command>
<Command>trQuestVarSet("DstYPos", xsVectorGetY(kbGetBlockPosition(""+1*%DstObject%)));</Command>
<Command>trQuestVarSet("DstZPos", xsVectorGetZ(kbGetBlockPosition(""+1*%DstObject%)));</Command>
<Command>trQuestVarSet("AAABBBCCC111222333", trQuestVarGet("DstXPos") - trQuestVarGet("SrcXPos"));</Command>
<Command>trQuestVarSet("BBBCCCAAA222333111", trQuestVarGet("DstZPos") - trQuestVarGet("SrcZPos"));</Command>
<Command>trQuestVarSet("AAABBBCCC111222333", trQuestVarGet("AAABBBCCC111222333") * trQuestVarGet("AAABBBCCC111222333"));</Command>
<Command>trQuestVarSet("BBBCCCAAA222333111", trQuestVarGet("BBBCCCAAA222333111") * trQuestVarGet("BBBCCCAAA222333111"));</Command>
<Command>trQuestVarSet("CCCAAABBB333111222", trQuestVarGet("AAABBBCCC111222333") + trQuestVarGet("BBBCCCAAA222333111"));</Command>
<Command>trQuestVarSet("DDDAAABBB444111222", %Dist% * 100);</Command>
<Expression>trQuestVarGet("CCCAAABBB333111222") %Op% trQuestVarGet("DDDAAABBB444111222")</Expression>
</Condition>

[This message has been edited by musketeer925 (edited 07-26-2010 @ 10:06 AM).]

musketeer925
Skirmisher
posted 07-26-10 10:28 AM EDT (US)     279 / 849       
--M925 Trigger Set Updated--
Now includes Array triggers and the trigger in the above post.
BlazinAmmo
Skirmisher
posted 07-27-10 08:50 PM EDT (US)     280 / 849       
Hi, I'm new to triggers and I have some questions regarding them. In my game, enemies spawn and then come and attack you, and when I playtest the game, everything works fine. However, when I try to play online, nothing works. Here is an example of one of my army triggers, and if you guys know of a way to fix this one then it will work for all of them because they are all formed the same way, just with different units and more of the same triggers. Here it is:

Trigger Name: CPUarmy1
Set to Active with Priority on normal
Condition: Timer 10 seconds
Effects: Army Deploy: Army: Ply3Army11 Proto Name: Lancer Count: 2 and the area is set outside of an enemies wall in which you spawn inside of.

ArmyMoveToUnit: Army: TargetUnit: Set to Player 1s Dopplesoldner Attack Move: ON

AI Attack Unit List: Army: Ply3Army11 Army To Attack: Ply1Army11 (Player 1s Dopplesoldner.

The Other triggers for CPUarmy1 are the same but configured for player 2.

Please if you guys could provide any help at all it would be greatly appreciated.
musketeer925
Skirmisher
posted 07-28-10 09:41 AM EDT (US)     281 / 849       
Army triggers do not work for AI or Gaia in multiplayer.

You'll have to make you're attacking units Change Unit Type from some preplaced cinematic blocks, or something of the sort.

Another possibility is using Unit Create Multi and then using Move From Area (a custom effect) to achieve the effects that you are wanting.
Mister SCP
Scenario Reviewer
posted 08-06-10 04:56 AM EDT (US)     282 / 849       
Army triggers do not work for AI or Gaia in multiplayer.

You'll have to make you're attacking units Change Unit Type from some preplaced cinematic blocks, or something of the sort.

Another possibility is using Unit Create Multi and then using Move From Area (a custom effect) to achieve the effects that you are wanting.
OR create them for a human player and use army convert

btw here is a new trigger (taken by aom and reworked so it works for AOE3)
<Effect name = "Army Deploy in front of unit *TL*">
<Param name="SrcArmy" dispName="Army" varType="group">default</Param>
<Param name="ProtoName" dispName="Protounit" varType="protounit">Villager</Param>
<Param name="Count" dispName="Count" varType="string">1</Param>
<Param name="Object" dispName="Target Unit" varType="unit">default</Param>
<Param name="Distance" dispName="Distance" varType="string">1</Param>
<Param name="Heading" dispName="Heading QV" varType="string">QV1</Param>
<Param name="Clear" dispName="$$22464$$Clear Existing Units:" varType="bool">true</Param>
<Command>vector v1=kbGetBlockPosition("%Object%");</Command>
<Command>vector v2=xsVectorSet(1.0*%Distance%*Math_sin(trQuestVarGet("%Heading%")),0,1.0*%Distance%*Math_cos(trQuestVarGet("%Heading%")));</Command>
<Command>v1=v1+v2;</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", %Count%,xsVectorGetX(v1),0,xsVectorGetZ(v1), 0, %Clear%);</Command>
</Effect>
(typeloader required (4.0 or above))
+ to be able to use it you must have launched this one
<Effect name="EL IN Unit Heading Into QV"> 
<Param name="DstObject" dispName="Select Unit" varType="unit">default</Param>
<Param name="qvname" dispName="QV name to store heading" varType="string">QV1</Param>
<Command>trQuestVarSet("uhiq%DstObject%newx", xsVectorGetX(kbGetBlockPosition("%DstObject%")));</Command>
<Command>if(trQuestVarGet("uhiq%DstObject%oldx") > trQuestVarGet("uhiq%DstObject%newx")) trQuestVarSet("%qvname%",360.0 - trUnitGetHeading("%DstObject%"));</Command>
<Command>else if(trQuestVarGet("uhiq%DstObject%newx") > trQuestVarGet("uhiq%DstObject%oldx")) trQuestVarSet("%qvname%",trUnitGetHeading("%DstObject%"));</Command>
<Command>trQuestVarSet("uhiq%DstObject%oldx",trQuestVarGet("uhiq%DstObject%newx"));</Command>
</Effect>
this one store the heading in a QV


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
As_Saffah
Scenario Reviewer
posted 08-06-10 11:49 AM EDT (US)     283 / 849       
Oh man this is a lot of new stuff to put in the wiki.

Glad to have you on board as a significant contributor M925.

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.
musketeer925
Skirmisher
posted 08-06-10 12:37 PM EDT (US)     284 / 849       
Glad to be helping. It gives me a sense of importance.
sufjanfan
Skirmisher
posted 08-06-10 09:36 PM EDT (US)     285 / 849       
Okay, I don't usually ask for help here, but I'm a little stuck because I'm moving into the realm of triggers. What I want to know is, is it possible to test a player's score? I know there is an "aiGetScore" command, but there doesn't seem to be a "trGetScore" command.

If this isn't possible, does anyone know a rough estimate of the formula for score, taking into account resources and population?

If that doesn't work either, I could always go by resources.
Mister SCP
Scenario Reviewer
posted 08-08-10 09:23 AM EDT (US)     286 / 849       
nah there is no getscore command. I think there is a formula in the AImain itself but didnt checke that too much. With Pop and resources you should be able to create a formula if this one in the ai isnt that usefull

btw whats the purpose for te score?


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
sufjanfan
Skirmisher
posted 08-08-10 10:22 AM EDT (US)     287 / 849       
I've decided to use XP.

I can't really tell you what it's for at the moment. All I'm going to say is that it's for a map to be included in WotTA. Unfortunately, I'm getting really weird trigger bugs.
Yuttho
Scenario Expert
posted 08-12-10 03:01 PM EDT (US)     288 / 849       
What AI should I use to make the enemy computer attack walls. They attack units but not walls--without using custom stuff.

And also, how do I change all the unit's names of a particular unit (not just 1 unit). I did it before with change name. But I don't remember how I did it.

Creator of The Great War Campaign

[This message has been edited by Yuttho (edited 08-12-2010 @ 03:31 PM).]

sufjanfan
Skirmisher
posted 08-12-10 03:43 PM EDT (US)     289 / 849       
I'm not entirely sure about the first question. You'll have to look through all the campaign AI's and find one that suits if you don't want to make a new one.
Yuttho
Scenario Expert
posted 08-12-10 03:45 PM EDT (US)     290 / 849       
Anywhere I can find out which one does what? Because they're all just a bunch of letters and numbers.

Creator of The Great War Campaign
Mister SCP
Scenario Reviewer
posted 08-12-10 04:46 PM EDT (US)     291 / 849       
<Effect name="Change Name 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="Namer" dispName="Change Display Name" varType="string">Insert Name Here</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>trUnitChangeName("%Namer%");</Command> <Command>}}</Command> <Command>trQuestVarSet("i", trQuestVarGet("i")+1);}</Command> <Command>xsSetContextPlayer(trQuestVarGet("lastpl"));</Command> </Effect> from pftq's trigpack
About AI i just have looked at the ai main and never coded ai but i discovered (hopefully) some very usefull guides in the past so maybe we could fix your wall 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
Yuttho
Scenario Expert
posted 08-12-10 05:28 PM EDT (US)     292 / 849       
how do i use that? lol

Edit: Another question. I'm trying to do a teleport trigger. Unfortunately, it doesn't work. What I did was units in area, effect: teleport units. But, it says I need source units. I even tried it and nothing happened. Any other options to doing this?

Creator of The Great War Campaign

[This message has been edited by Yuttho (edited 08-12-2010 @ 09:05 PM).]

As_Saffah
Scenario Reviewer
posted 08-12-10 11:58 PM EDT (US)     293 / 849       
You may need to adapt pftq's "Damage Units in Area (Center Unit)" effect to trTeleportUnit or somesuch. That's the only code framework I'm aware of that can tag any units within radius (or specify player specific units, or specific protounit) for a blanket effect.

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 08-12-2010 @ 11:59 PM).]

Yuttho
Scenario Expert
posted 08-13-10 00:19 AM EDT (US)     294 / 849       
I don't know nothing about the code framework of triggers lol. All I do is just click, click, click on the editor.

Creator of The Great War Campaign
As_Saffah
Scenario Reviewer
posted 08-13-10 09:48 AM EDT (US)     295 / 849       
Then my comment is directed more at Mister SCP

Or maybe I can do it. (I am terrible at code, it is a mysterious creature that teases and beckons, but when you get too close, blows up in your face and makes your game go OOS, much like a woman).

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 08-13-10 04:47 PM EDT (US)     296 / 849       


<Effect name="Teleport 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="Area" dispName="" varType="area">0, 0, 0</Param>
<Param name="Booler" dispName="Include Center Unit" varType="bool">false</Param>
<Param name="position" dispName="Retain Unit Positions" 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>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>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>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>trQuestVarSet("oiwghogwhywhlocx", xsVectorGetX(vector(%Area%)));</Command>
<Command>if(%position%==true) trQuestVarSet("oiwghogwhywhlocx", xsVectorGetX(vector(%Area%))- (xsVectorGetX(kbGetBlockPosition(""+1*%Object%))-xsVectorGetX(kbUnitGetPosition(1*trQuestVarGet("ffweho")))));</Command>
<Command>trQuestVarSet("oiwghogwhywhlocz", xsVectorGetZ(vector(%Area%)));</Command>
<Command>if(%position%==true) trQuestVarSet("oiwghogwhywhlocz", xsVectorGetZ(vector(%Area%))- (xsVectorGetZ(kbGetBlockPosition(""+1*%Object%))-xsVectorGetZ(kbUnitGetPosition(1*trQuestVarGet("ffweho")))));</Command>
<Command>trUnitTeleport(1*trQuestVarGet("oiwghogwhywhlocx"), xsVectorGetY(vector(%Area%)), 1*trQuestVarGet("oiwghogwhywhlocz"));</Command>
<Command>}}</Command>
<Command>trQuestVarSet("i", trQuestVarGet("i")+1);}</Command>
<Command>xsSetContextPlayer(trQuestVarGet("lastpl"));</Command>
</Effect>


Should Work! How to use em(show up in editor):
First:go to install direction/trigger3
Second:Open typetest and paste the codes in (between and <Effect name="...

OR dl orginal Trigpacks and copy the xml in your trigger3 folder

Guide Using/Storing Playernames (Pro Version):
(taken from Operation Stonewall, my current scenario)
Requires: My trigpack (Array Create,Typeloader[must be version 4.0 or above])
Musks Trigpack (Array: set Playername)
XS- User Code


<Effect name="XS User Code 6">
<Param name="zC1" dispName=" " VarType="stringid"></Param>
<Param name="zC2" dispName=" " VarType="stringid"></Param>
<Param name="zC3" dispName=" " VarType="stringid"></Param>
<Param name="zC4" dispName=" " VarType="stringid"></Param>
<Param name="zC5" dispName=" " VarType="stringid"></Param>
<Param name="zC6" dispName=" " VarType="stringid"></Param>
<Command>/**/ %zC1%</Command>
<Command>/**/ %zC2%</Command>
<Command>/**/ %zC3%</Command>
<Command>/**/ %zC4%</Command>
<Command>/**/ %zC5%</Command>
<Command>/**/ %zC6%</Command>
</Effect>
Trigger1:Typeloader
Trigger2:activ,not looped,...
Condition:Always
Effects:
Array Create (2[means Array for Store Strings],Array Name, Amount of Position (PlayerNames*2+1)->4 Players=9
Array Set: Playername(ArrayName,PlayerID,PlayerID)
repeat for each Player

Part 3 of the Trigger creates player names for show relation
e.g. Consti's House; Dieter's House; Hans' House

Xs User Code 6(lines can be taken by copy (control+c) and paste (control+v))
1.Line


string i2=" ";

Creates a temporary string called i2
2.Line


for(i=4;>=1){

Creates a loop i=your Player amount (mine is 4)
3.Line


if(String_charAt(""+kbGetPlayerName(i), String_length(""+kbGetPlayerName(i)))=="s")i2="'";

if last letter of the Player Name is a s set i2 to '
4.Line


else i2="'s";

else i2 is 's
5.Line


xsArraySetString(trQuestVarGet("QVA1"), i+4, ""+kbGetPlayerName(i) +""+i2);}

-----------------------
QVA1->replayce by your Array Name
4->replace by your Player Amount
-----------------------
Set Array data
-i+4 =Position to store (1-4=Player Names;5-8 Player relation thing...however it is called)
-it will add i2 to the Playername (either ' or 's)

How to finally use that
In later triggers you can use
this form where ever you can insert strings (chats/unit change name)
Send Chat: Additional Text"+xsArrayGetString(trQuestVarGet("QVA1"),1)+"Additional Text
e.g. Hello, "+xsArrayGetString(trQuestVarGet("QVA1"),1)+" (Hello, Sir_Constantin (if he is Player1)
Unit Change Name:
"+xsArrayGetString(trQuestVarGet("QVA1"),5)+" House (Sir_Constantin's House (if he is Player1 AND you have 4 Players (remember i+4[4=PlayerNumber]))

Hope sb. might use it in the future
Critism is always wished


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

sufjanfan
Skirmisher
posted 08-13-10 08:59 PM EDT (US)     297 / 849       
I have a trigger request:

Name: Destroy Units in Area
Params: RefObject, Radius, UnitType, PlayerID
Mister SCP
Scenario Reviewer
posted 08-14-10 08:27 AM EDT (US)     298 / 849       
    <Effect name="Destroy units in area">
<Param name="Object" dispName="Center Unit" varType="unit">default</Param>
<Param name="Dst" dispName="Radius" varType="string">10.0</Param>
<Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
<Param name="FromPlayer" dispName="From Player or 99 for ALL" varType="string">99</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("%ProtoName%"));</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>trUnitDestroy();</Command>
<Command>}}</Command>
<Command>trQuestVarSet("i", trQuestVarGet("i")+1);}</Command>
<Command>xsSetContextPlayer(trQuestVarGet("lastpl"));</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
Yuttho
Scenario Expert
posted 08-14-10 07:24 PM EDT (US)     299 / 849       
I installed the advanced and your trigger set. I open up a blank scenario and look at my triggers. Teleport units in area (center unit) to unit, has a button for Center Unit and Target Unit.

However, when I open up my Great War scenario, I look at the same teleport trigger, it doesn't have the buttons for center and target unit. Instead, it says Center Unit Object ID and same with Target Unit Object ID.

How do I use Object ID and why is there no button?

Creator of The Great War Campaign

[This message has been edited by Yuttho (edited 08-14-2010 @ 07:53 PM).]

sufjanfan
Skirmisher
posted 08-14-10 08:46 PM EDT (US)     300 / 849       
Thanks Mister SCP! I tried to make one that looked similar to that by modifying the Advanced Trigger Set's "Change Name In Area", but it was buggy.
« Previous Page  1 ··· 10 11 12 13 14 ··· 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