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 ··· 19 20 21 22 23 ··· 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:
THYPAVLACK
Skirmisher
posted 04-09-11 09:09 AM EDT (US)     501 / 849       
Im pretty sure they can, in warchiefs campaign valley forge militia can build manors and chop wood.

And the modify protounit trigger DOES NOT WORK.

Strangly, the convert army trigger works for me, even though people say it doesn't.

[This message has been edited by THYPAVLACK (edited 04-09-2011 @ 09:12 AM).]

musketeer925
Skirmisher
posted 04-09-11 09:34 AM EDT (US)     502 / 849       
Issue #1:

The Colonial Militia that builds things is a different protounit than the normal Colonial Militia.

If you really want to argue about it I'll show you proof from the game's code.

Skirmishers cannot be made to build walls.

Issue #2:

The Modify Protounit trigger does work -- but only some fields. None of its attack parameters work, but the HP, Speed, Cost Food, Cost Coin, Cost Wood, LOS, Train Points, Build Points, Population Count, Build Limit, Cost Ships, and Cost Export do work on most units that those stats would apply to.

This is not a defining list though, some of the parameters only work on certain units and others I have simply never used.

Issue #3:

Who said army convert doesn't work?


Also, I would recommend reading a general tutorial about triggers -- you don't seem to have quite figured out how exactly the work.

Heres a few decent ones:
http://wiki.heavengames.com/age/Triggers
http://forum.agecommunity.com/forums/thread/909609.aspx

The first one has a better explanation of triggers and how they work, and the second one has more nice-looking pictures.

And yes, the first one is the same one that kjn gave you at AgeComm.

[This message has been edited by musketeer925 (edited 04-09-2011 @ 09:44 AM).]

maxulino
Skirmisher
posted 04-09-11 12:03 PM EDT (US)     503 / 849       
And read my trigger tutorial it is the most complete one also you can change the militia thing with modding and never forget that to upgrade unit atack you can use set tech status : hcxp siox combat or something like that
Mister SCP
Scenario Reviewer
posted 04-10-11 02:41 AM EDT (US)     504 / 849       

<Effect name="Conditional Units in Area *TL*">
<Param name="DstObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
<Param name="Player" dispName="$$22301$$Player" VarType="string">1</Param>
<Param name="UnitType" dispName="$$22302$$Unit Type" VarType="unittype">Unit</Param>
<Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
<Param name="Op" dispName="$$22297$$Operator" VarType="string">!=</Param>
<Param name="Count" dispName="$$22304$$Count" VarType="float">1</Param>
<Command>truefalse = (trCountUnitsInArea("%DstObject%",%Player%,"%UnitType%",%Dist%) %Op% %Count%);</Command>
<Command>if (truefalse){</Command>
</Effect>

<Effect name="Conditional End">
<Command>}</Command>
</Effect>

This is a conditional Effect

e.g.
Condition: Timer=1

Effect:
Conditional Units in area (if true)
Then Unit Create
Conditional End (required else there is a triggerlock)

For those who it still cause Triggerlock->
Create a Trigger: (always)
Typeloader Tester Start:
fill in bool truefalse =true;
Typeloader Tester End

it dont show up for some reason

Edit: it shows up: did saved it as a "datei" file not as xml


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-11-2011 @ 10:17 AM).]

maxulino
Skirmisher
posted 04-10-11 09:54 PM EDT (US)     505 / 849       
hey sir constatin can you make a AG trigger set for aoe3 just like the aom ones see more info about them here :http://aom.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=13,24608,0,10


Ididnt test it maybe it works for aoe3 too but It hink it dont
Mister SCP
Scenario Reviewer
posted 04-11-11 08:19 AM EDT (US)     506 / 849       
yes i can (not sure if i create a totally new trigpack)

Edit: I am not totally done but since you need to have the new typeloader for this trigger I updated my triggerpack.

(3006 lines of code)
go to line 2964 and remove <!-- in front of <Effect name...

go to line 2989 and remove --> after

You should have it unlocked now.

Set Up:

Use:

Condition:
Timer+
QV Check (to disable the trigger)
Effect:
AG Start
AG Move Object
(AG Move Object)
(AG Move Object)

The intern disabling isnt supported yet but easy to do later

http://aoe3.heavengames.com/downloads/showfile.php?fileid=2419

The problem is that the code is really hard to take over (lots of trash QV's) and so i decided to rewrite it with Vectors instead of QV's so mine is also a lot shorter. And I cant use most of his parts. Note that my attraction is absolute and not relative (100 and 200 is not the same as 1 and 2).

0 is not moving
+ Numbers attract
- Numbers scare (or the other way ;) )

The latest problem is the formula how much it should effect the unit in the distance.
My current solution is Attraction*10/Distance but I might change it later and make a power function or whatever

I might also try to involve a speed formula so closer units move faster then units which are farther away
btw:Plz post a working link next time it was hard to open that in school with my smartphone

btw: I learned how usefull my inventory system is in my latest scenario even if I never use it for inventory (I store Event Names (Names of the Triggers which I can fire then with ;) so it wont double activate a event), Player Numbers for dynamic players,...)


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-11-2011 @ 11:38 AM).]

maxulino
Skirmisher
posted 04-11-11 03:56 PM EDT (US)     507 / 849       
really nice work are you a mage?

lol never seen anyone make some really complica=ted triggers so fast grats this will be very useful to all and |I am sure you and musk can solve the bugs
Mister SCP
Scenario Reviewer
posted 04-11-11 05:04 PM EDT (US)     508 / 849       
this are not bugs this are just not supported features because they need testing (expect the qv one because it's pretty simple)

e.g. I could make a few ways to set the run speed but i dunno yet what works best

edit: As you might seen before Conditional Units in Area is useable now (I saved my triggers with. the wrong exension (datei instead of xml)

edit: new formula for distance influence and qv thing is also realized
the best new thing is that it autoscale vectors now so units which are farthet away will move less finally (done by vector/distance). The setting of attracr factor is the most important thing now in.order to let the units move smoothly. a simple run speed set up will follow. i will update the trigger in lile 5 hours (i am in school right now)

important: max range is for now 60!


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-12-2011 @ 06:03 AM).]

Mister SCP
Scenario Reviewer
posted 04-12-11 10:48 AM EDT (US)     509 / 849       
I have 4 effects now: (choose one of the 3 AG Start Triggers). The 2 units can be used if you want to keep away the player from a line. I designed the 3 players one for my minigame were you have to chase for a sheep (every player gets one villie)

AG Move works smoothly now. I used values like 2 and -2 for testing (attraction weight). QV disabling works. Minimum range is for disabling moving if the unit is too far away and get a move command for a distance like 0.2 (less then a half tile). I used it with 1.5.

The allowed Maximum range is 60 because the distance function is a f(x)=axē+bx+c function with a minimum at 60. After 60 it will grow so e.g. at the distance of 119 it would walk the same way as at the distance of 1. This was due to the reason to get a realistic decreasing of the walking range.
<Effect name = "AG Start *TL*">
<Param name="Object" dispName="Moving Unit" vartype="unit">0</Param>
<Param name="Note" dispName="Note" vartype="string">Max Distance is 60</Param>
<Command>xsSetContextPlayer(0); //Mr. SCP</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>v1=xsVectorSet(xsVectorGetX(kbUnitGetPosition(%Object%)),0,xsVectorGetZ(kbUnitGetPosition(%Object%)));</Command>
</Effect>
<Effect name = "AG Start 2 Units *TL*">
<Param name="Object" dispName="Moving Unit" vartype="unit">0</Param>
<Param name="Object2" dispName="Moving Unit" vartype="unit">0</Param>
<Param name="Note" dispName="Note" vartype="string">Max Distance is 60, this effect will use the middle of both units. e.g. to scare a unit from a line it shouldnt pass</Param>
<Command>xsSetContextPlayer(0); //Mr. SCP</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>v1=xsVectorSet((xsVectorGetX(kbUnitGetPosition(%Object%))+xsVectorGetX(kbUnitGetPosition(%Object2%)))/2.0,0,(xsVectorGetZ(kbUnitGetPosition(%Object%))</Command>
<Command>+xsVectorGetZ(kbUnitGetPosition(%Object2%)))/2.0);</Command>
</Effect>
<Effect name = "AG Start 3 Units *TL*">
<Param name="Object" dispName="Moving Unit" vartype="unit">0</Param>
<Param name="Object2" dispName="Moving Unit" vartype="unit">0</Param>
<Param name="Object3" dispName="Moving Unit" vartype="unit">0</Param>
<Param name="Note" dispName="Note" vartype="string">Max Distance is 60, this effect will use the middle of zhe three units. e.g. to scare a unit from a line it shouldnt pass</Param>
<Command>xsSetContextPlayer(0); //Mr. SCP</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>v1=xsVectorSet((xsVectorGetX(kbUnitGetPosition(%Object%))+xsVectorGetX(kbUnitGetPosition(%Object2%))+xsVectorGetX(kbUnitGetPosition(%Object3%))</Command>
<Command>)/3.0,0,(xsVectorGetZ(kbUnitGetPosition(%Object%))+xsVectorGetZ(kbUnitGetPosition(%Object2%))+xsVectorGetZ(kbUnitGetPosition(%Object3%)))/3.0);</Command>
</Effect>

<Effect name = "AG Move Object *TL*">
<Param name="Object" dispName="Object" vartype="unit">0</Param>
<Param name="t" dispName="Attraction weight" varType="string">-1.0</Param>
<Param name="QV" dispName="ON (0) OFF (1)" varType="string">QV1</Param>
<Param name="Dist" dispName="Max range" varType="string">15.0</Param>
<Param name="AttackMove" dispName="Attack Move" varType="bool">true</Param>
<Param name="MinDist" dispName="Minimum Walk Distance" varType="string">0.5</Param>
<Command>if (QVGet("%QV%")==0){ v2=xsVectorSet(xsVectorGetX(kbUnitGetPosition(%Object%)),0,xsVectorGetZ(kbUnitGetPosition(%Object%))); //Mr. SCP</Command>
<Command>v3 = v2-v1;</Command>
<Command>fla=xsVectorLength(v3); // store distance</Command>
<Command>flb=0.0002777*fla*fla-0.033333*fla+1; //decrease influence by distance</Command>
<Command>flb=5.0*flb*%t%/fla; //influence*unit vector</Command>
<Command><![CDATA[if ((%Dist%>fla) && (60>fla)){]]></Command>
<Command>v3=xsVectorSet(xsVectorGetX(v2)+flb*(xsVectorGetX(v1)-xsVectorGetX(v2)),0,xsVectorGetZ(v2)+flb*(xsVectorGetZ(v1)-xsVectorGetZ(v2)));</Command>
<Command>if (xsVectorLength(v3-v2)>=%MinDist%){</Command>
<Command>trUnitSelectClear();</Command>
<Command>trUnitSelect("%Object%");</Command>
<Command>trUnitMoveToPoint(xsVectorGetX(v3),0,xsVectorGetZ(v3), -1, %AttackMove%, false, 1.0);}}}</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
loard of peace
Skirmisher
posted 04-14-11 02:03 PM EDT (US)     510 / 849       
hey
Mr. SPC or Muketeer can u tell my what is wrong about this trigger,because i tested it with firefox but it's says that there is no error,but when i put the file to to porgramms/MicrosoftGames/aoe III/trigger3 i cant see the trigger in the editor...

here is the trigger

<Condition name ="shop sp (gold) "> <Param name="PlayerID" dispName="$$22301$$Player" VarType="player">1</Param> <Param name="SrcObject" dispName="$$22295$$Source Units" VarType="unit">default</Param> <Param name="DstPoint" dispName="" varType="area">0</Param> <Param name="Op" dispName="$$22297$$Operator" VarType="operator">==</Param> <Param name="Dist" dispName="$$22298$$Distance" VarType="float">0</Param> <Param name="CostGold" dispName="Gold cost" varType="long">0</Param> <Param name="ShopID" dispName="Shop ID" VarType="string">0</Param> <Command>trUnitSelectClear();</Command> <Command loop="" loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command> <Command>if(trUnitDistanceToPoint(%DstPoint%) %Op% %Dist%)</Command> <Command>{</Command> <Command>if(trPlayerResourceCount(%PlayerID%, "gold")>=%CostGold%)</Command> <Command>{</Command> <Command>trPlayerTribute(%PlayerID%,"gold",%CostGold%,0)</Command> <Command>trQuestVarSet("sp shop %ShopID%", 1)</Command> <Command>}</Command> <Command>}</Command> <Expression>trQuestVarGet("sp shop %ShopID%") != 0</Expression> </Condition>

Edit:sry for the bad view but i cant change it and i'm too lazy to use html :P

but i think that you can help me :P

spielbubi xD

[This message has been edited by loard of peace (edited 04-14-2011 @ 02:16 PM).]

Mister SCP
Scenario Reviewer
posted 04-14-11 03:35 PM EDT (US)     511 / 849       
to end Commands you need ";" (not the if-clauses)
   <Command>trPlayerTribute(%PlayerID%,"gold",%CostGold%,0);</Command> 
<Command>trQuestVarSet("sp shop %ShopID%", 1);</Command>
+add his as your first Command line
<Command>trQuestVarSet("sp shop %ShopID%", 0);</Command> 

I have another problem: in my scenario the boats of player 7 move all to one location (only in multiplayer) . Why? Anyway a move to self should stop that!


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
loard of peace
Skirmisher
posted 04-15-11 07:23 AM EDT (US)     512 / 849       
ok,
and thanks for ur help ;D
Mister SCP
Scenario Reviewer
posted 04-17-11 08:52 AM EDT (US)     513 / 849       
Here are some more effects:

Notes:
-Heal Units in Area *TL* Pack1 is in my current Triggerpack (not declared as Pack1)
-if Pack 1 triggers not work for you try the Pack2 one (posted as 2nd trigger).Because it has another code for get the current Hitpoints (thx to Prawny who gave me a scenario to debug it)
-if you wish I could post all my Heal Triggers for PACK2
BRAND NEW ARMY TRIGGERS. I FOUND A WAY TO SELECT UNITS FROM AN ARMY!!! (heal triggers are the starters) (My crash trigger has also another usefull function lol)
@scripters: keep in mind to use the Is Alive Condition. If the Army is not alive it might return 0 or might be able to crash the Game

btw: thx to invent00r who used these army effects before me but in another context

Coming Soon: Resource Triggers (Sharing, Paying,Checking) + (maybe) Dynamic Player Triggers

-both is ready but I dont feel like sharing yet

<Effect name="Heal Units in Area *TL* PACK1">
<Param name="DstObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
<Param name="UnitType" dispName="$$22302$$Unit Type" VarType="unittype">Unit</Param>
<Param name="PlayerID2" dispName="Player" varType="string">0</Param>
<Param name="Dist" dispName="$$22303$$Radius" VarType="string">10</Param>
<Param name="ScenName" dispName="HP Bonus" varType="string">50</Param>
<Param name="Booler" dispName="Include Center Unit" varType="bool">false</Param>
<Param name="Note" dispName="Note" varType="string">In case Heal Triggers from PACK1 dont work try to use PACK2</Param>
<Command>for(all=1600;>=-1){ if (kbGetUnitTypeName(all)=="%UnitType%") break;}</Command>
<Command>tla=xsVectorGetX(queryUnits(all, %PlayerID2%,kbGetBlockPosition("%DstObject%"),%Dist%));</Command>
<Command>for(i=kbUnitQueryExecute(tla)-1;>-1){</Command>
<Command>trUnitSelectClear();</Command>
<Command>trUnitSelectByID(kbUnitQueryGetResult(tla,i));</Command>
<Command>trUnitSetHP(kbUnitGetCurrentHitpoints(kbGetBlockID(""+1*kbUnitQueryGetResult(tla, i)))+%ScenName%);}</Command>
</Effect>
<Effect name="Heal Units in Area *TL* PACK2">
<Param name="DstObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
<Param name="UnitType" dispName="$$22302$$Unit Type" VarType="unittype">Unit</Param>
<Param name="PlayerID2" dispName="Player" varType="string">0</Param>
<Param name="Dist" dispName="$$22303$$Radius" VarType="string">10</Param>
<Param name="ScenName" dispName="HP Bonus" varType="string">50</Param>
<Param name="Booler" dispName="Include Center Unit" varType="bool">false</Param>
<Param name="Note" dispName="Note" varType="string">In case Heal Triggers from PACK1 dont work try to use PACK2</Param>
<Command>for(all=1600;>=-1){ if (kbGetUnitTypeName(all)=="%UnitType%") break;}</Command>
<Command>tla=xsVectorGetX(queryUnits(all, %PlayerID2%,kbGetBlockPosition("%DstObject%"),%Dist%));</Command>
<Command>for(i=kbUnitQueryExecute(tla)-1;>-1){</Command>
<Command>trUnitSelectClear();</Command>
<Command>trUnitSelectByID(kbUnitQueryGetResult(tla,i));</Command>
<Command>trUnitSetHP(kbUnitGetCurrentHitpoints(1*kbUnitQueryGetResult(tla, i))+%ScenName%);}</Command>
</Effect>

<Effect name="Army Save IDs in Array *TL*">
<Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
<Param name="ProtoName2" dispName="Protounit of Army" varType="protounit">Villager</Param>
<Param name="Array" dispName="Array" varType="string">XY</Param>
<Param name="Clear" dispName="Cler Existing Units" varType="bool">true</Param>
<Command>trArmySelect("%SrcArmy%");</Command>
<Command>if(trUnitAlive()==true){</Command>
<Command>xsArraySetInt(trQuestVarGet("%Array%"),0,trGetNumberSelectedUnitIDs());</Command>
<Command>for(count=trGetNumberSelectedUnitIDs();>=0){</Command>
<Command>xsArraySetInt(trQuestVarGet("%Array%"),count+1,trGetSelectedUnitID(count));}}</Command>
</Effect>

<Effect name="Heal Army *TL* + Int Array PACK1">
<Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
<Param name="Array" dispName="Do it in Array" varType="string">QVA1</Param>
<Param name="HPBonus" dispName="HP Bonus" varType="string">50</Param>
<Command>trArmySelect("%SrcArmy%");</Command>
<Command>if(trUnitAlive()==true){</Command>
<Command>xsArraySetInt(trQuestVarGet("%Array%"),0,trGetNumberSelectedUnitIDs());</Command>
<Command>for(count=trGetNumberSelectedUnitIDs();>=0){</Command>
<Command>xsArraySetInt(trQuestVarGet("%Array%"),count+1,trGetSelectedUnitID(count));}</Command>
<Command>for(count=trGetNumberSelectedUnitIDs();>=0){</Command>
<Command>xsSetContextPlayer(trGetUnitOwner(""+xsArrayGetInt(trQuestVarGet("%Array%"),count+1)));</Command>
<Command>trUnitSetHP(kbUnitGetCurrentHitpoints(kbGetBlockID(""+xsArrayGetInt(trQuestVarGet("%Array%"),count+1)))+%HPBonus%);}}</Command>
</Effect>
<Effect name="Heal One Man Army *TL* PACK1">
<Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
<Param name="HPBonus" dispName="HP Bonus" varType="string">50</Param>
<Command>trArmySelect("%SrcArmy%");</Command>
<Command>if(trUnitAlive()==true){</Command>
<Command>xsSetContextPlayer(trGetUnitOwner(""+trGetSelectedUnitID(0)));</Command>
<Command>trUnitSetHP(kbUnitGetCurrentHitpoints(kbGetBlockID(""+trGetSelectedUnitID(0)))+%HPBonus%);}</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 04-17-2011 @ 08:58 AM).]

Mister SCP
Scenario Reviewer
posted 05-04-11 09:23 AM EDT (US)     514 / 849       
My latest project: editor tools
http://imageshack.us/photo/my-images/850/screen77.jpg/


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
loard of peace
Skirmisher
posted 05-04-11 01:18 PM EDT (US)     515 / 849       
hey

i need ur help again :P

well this is my easy levl up efefct for heros but it is somewhere a mistake pls help me :P

<Effect name="sp easy levl up (heros by foot)">
<Param name="PlayerID" dispName="$$22301$$Player" VarType="player">1</Param>
<Param name="ProtoUnit" dispName="$$22449$$ProtoUnit" varType="protounit">Villager</Param>
<Param name="HeroName" dispName="Heros szen name" varType="stringid">Name</Param>
<Param name="HP" dispName="HP bonus" varType="float">1.0</Param>
<Param name="Speed" dispName="Speed bonus" varType="float">1.0</Param>
<Param name="Armor" dispName="Armor bonus" varType="float">1.0</Param>
<Param name="Attack" dispName="Attack bonus" varType="float">1.0</Param>
<Command>trQuestVarSet("speasylevlupfor%ProtoUnit%fromplayer%PlayerID%", 1);</Command>
<Command>trQuestVarSet("speasylevlupfor%ProtoUnit%fromplayer%PlayerID%", +1);</Command>
<Command>trQuestVarSet("speasylevlupattackfor%ProtoUnit%fromplayer%PlayerID%", %Attack%);</Command>
<Command>trModifyProtounit("%ProtoUnit%", %PlayerID%, 0, %HP%);</Command>
<Command>trModifyProtounit("%ProtoUnit%", %PlayerID%, 1, %Speed%);</Command>
<Command>trModifyProtounit("%ProtoUnit%", %PlayerID%, 31, %Armor%);</Command>
<Command>if(trQuestVarGet("speasylevlupattackfor%ProtoUnit%fromplayer%PlayerID%") !=0)</Command>
<Command>{</Command>
<Command>trQuestVarSet("speasylevlupattackfor%ProtoUnit%fromplayer%PlayerID%", trQuestVarGet("speasylevlupattackfor%ProtoUnit%fromplayer%PlayerID%") / 3);</Command>
<Command>for(i=trQuestVarGet("speasylevlupattackfor%ProtoUnit%fromplayer%PlayerID%");>0)</Command>
<Command>{</Command>
<Command>trTechSetStatus(%PlayerID%, 1189, 2);</Command>
<Command>}</Command>
<Command>}</Command>
<Command><![CDATA[trChatSend(%PlayerID%, "%HeroName% <color=1.0,0,0>levl up "+1*QVGet("speasylevlupfor%ProtoUnit%fromplayer%PlayerID%"));]]></Command>
<Command><![CDATA[trChatSend(%PlayerID%, "Attack plus <color=0.0,0.0,1.0>%Attack%");]]></Command>
<Command><![CDATA[trChatSend(%PlayerID%, "Hitpionts plus <color=0.0,0.0,1.0>%HP%");]]></Command>
<Command><![CDATA[trChatSend(%PlayerID%, "Speed plus <color=0.0,0.0,1.0>%Speed%");]]></Command>
<Command><![CDATA[trChatSend(%PlayerID%, "Armor plus <color=0.0,0.0,1.0>%Armor%");]]></Command>
</Effect>

btw some Advertising for my trigger set it contains some -i think- useful and timeseaving effects xD try it

klick here to follow the link ;D

spielbubi
Mister SCP
Scenario Reviewer
posted 05-04-11 01:48 PM EDT (US)     516 / 849       
I made powers now available to launch for singleplayer and editor

See here the power tool http://imageshack.us/photo/my-images/845/screen79.jpg

Spielbubi you might try to comment out parts with
or with // or /**/
<Command>QVSet("MYQV",1);[b]//[/b]QVSet("MYQV",2);</Command>
will only Set MyQV to 1

<Command>[b]/*[/b]QVSet("MYQV",1);[b]*/[/b]QVSet("MYQV",2);</Command>

first Command is marked as a command so it used for your trigger.


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

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

[This message has been edited by Mister SCP (edited 05-04-2011 @ 02:29 PM).]

loard of peace
Skirmisher
posted 05-09-11 10:44 AM EDT (US)     517 / 849       
ok thanks but i found the mistake i iwll tell it u on eso:P
loard of peace
Skirmisher
posted 05-30-11 11:16 AM EDT (US)     518 / 849       
new shop for 4 player (only for p1-4)

made be by me

<Condition name ="sp Shop gold (4 players)">
<Param name="SrcObjectP1" dispName="Shopper Player 1" VarType="unit">default</Param>
<Param name="SrcObjectP2" dispName="Shopper Player 2" VarType="unit">default</Param>
<Param name="SrcObjectP3" dispName="Shopper Player 3" VarType="unit">default</Param>
<Param name="SrcObjectP4" dispName="Shopper Player 4" VarType="unit">default</Param>
<Param name="DstPoint" dispName="" varType="area">0</Param>
<Param name="Costs" dispName="Gold cost" varType="string">0</Param>
<Param name="ShopID" dispName="Shop ID" VarType="string">0</Param>
<Command>if((trTime()-cActivationTime) >= 3)</Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopIDŽtive", 1);</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP1">trUnitSelect("%SrcObjectP1%");</Command>
<Command><![CDATA[if((trUnitDistanceToPoint(%DstPoint%) <= 2)&&]]></Command>
<Command><![CDATA[(trPlayerResourceCount(1, "gold")>=%Costs%))]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player1", 1);</Command>
<Command>trPlayerGrantResources(1, "gold", -%Costs%);</Command>
<Command>}</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP2">trUnitSelect("%SrcObjectP2%");</Command>
<Command><![CDATA[if((trUnitDistanceToPoint(%DstPoint%) <= 2)&&]]></Command>
<Command><![CDATA[(trPlayerResourceCount(2, "gold")>=%Costs%))]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player2", 1);</Command>
<Command>trPlayerGrantResources(2, "gold", -%Costs%);</Command>
<Command>}</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP3">trUnitSelect("%SrcObjectP3%");</Command>
<Command><![CDATA[if((trUnitDistanceToPoint(%DstPoint%) <= 2)&&]]></Command>
<Command><![CDATA[(trPlayerResourceCount(3, "gold")>=%Costs%))]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player3", 1);</Command>
<Command>trPlayerGrantResources(3, "gold", -%Costs%);</Command>
<Command>}</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP4">trUnitSelect("%SrcObjectP4%");</Command>
<Command><![CDATA[if((trUnitDistanceToPoint(%DstPoint%) <= 2)&&]]></Command>
<Command><![CDATA[(trPlayerResourceCount(4, "gold")>=%Costs%))]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player4", 1);</Command>
<Command>trPlayerGrantResources(4, "gold", -%Costs%);</Command>
<Command>}</Command>
<Command>}</Command>
<Expression>((trTime()-cActivationTime) >= 3)</Expression>
</Condition>

<Condition name ="sp Shop food (4 players)">
<Param name="SrcObjectP1" dispName="Shopper Player 1" VarType="unit">default</Param>
<Param name="SrcObjectP2" dispName="Shopper Player 2" VarType="unit">default</Param>
<Param name="SrcObjectP3" dispName="Shopper Player 3" VarType="unit">default</Param>
<Param name="SrcObjectP4" dispName="Shopper Player 4" VarType="unit">default</Param>
<Param name="DstPoint" dispName="" varType="area">0</Param>
<Param name="Costs" dispName="Food cost" varType="string">0</Param>
<Param name="ShopID" dispName="Shop ID" VarType="string">0</Param>
<Command>if((trTime()-cActivationTime) >= 3)</Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopIDŽtive", 1);</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP1">trUnitSelect("%SrcObjectP1%");</Command>
<Command><![CDATA[if((trUnitDistanceToPoint(%DstPoint%) <= 2)&&]]></Command>
<Command><![CDATA[(trPlayerResourceCount(1, "food")>=%Costs%))]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player1", 1);</Command>
<Command>trPlayerGrantResources(1, "food", -%Costs%);</Command>
<Command>}</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP2">trUnitSelect("%SrcObjectP2%");</Command>
<Command><![CDATA[if((trUnitDistanceToPoint(%DstPoint%) <= 2)&&]]></Command>
<Command><![CDATA[(trPlayerResourceCount(2, "food")>=%Costs%))]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player2", 1);</Command>
<Command>trPlayerGrantResources(2, "food", -%Costs%);</Command>
<Command>}</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP3">trUnitSelect("%SrcObjectP3%");</Command>
<Command><![CDATA[if((trUnitDistanceToPoint(%DstPoint%) <= 2)&&]]></Command>
<Command><![CDATA[(trPlayerResourceCount(3, "food")>=%Costs%))]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player3", 1);</Command>
<Command>trPlayerGrantResources(3, "food", -%Costs%);</Command>
<Command>}</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP4">trUnitSelect("%SrcObjectP4%");</Command>
<Command><![CDATA[if((trUnitDistanceToPoint(%DstPoint%) <= 2)&&]]></Command>
<Command><![CDATA[(trPlayerResourceCount(4, "food")>=%Costs%))]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player4", 1);</Command>
<Command>trPlayerGrantResources(4, "food", -%Costs%);</Command>
<Command>}</Command>
<Command>}</Command>
<Expression>((trTime()-cActivationTime) >= 3)</Expression>
</Condition>

<Condition name ="sp Shop wood (4 players)">
<Param name="SrcObjectP1" dispName="Shopper Player 1" VarType="unit">default</Param>
<Param name="SrcObjectP2" dispName="Shopper Player 2" VarType="unit">default</Param>
<Param name="SrcObjectP3" dispName="Shopper Player 3" VarType="unit">default</Param>
<Param name="SrcObjectP4" dispName="Shopper Player 4" VarType="unit">default</Param>
<Param name="DstPoint" dispName="" varType="area">0</Param>
<Param name="Costs" dispName="Wood cost" varType="string">0</Param>
<Param name="ShopID" dispName="Shop ID" VarType="string">0</Param>
<Command>if((trTime()-cActivationTime) >= 3)</Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopIDŽtive", 1);</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP1">trUnitSelect("%SrcObjectP1%");</Command>
<Command><![CDATA[if((trUnitDistanceToPoint(%DstPoint%) <= 2)&&]]></Command>
<Command><![CDATA[(trPlayerResourceCount(1, "wood")>=%Costs%))]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player1", 1);</Command>
<Command>trPlayerGrantResources(1, "wood", -%Costs%);</Command>
<Command>}</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP2">trUnitSelect("%SrcObjectP2%");</Command>
<Command><![CDATA[if((trUnitDistanceToPoint(%DstPoint%) <= 2)&&]]></Command>
<Command><![CDATA[(trPlayerResourceCount(2, "wood")>=%Costs%))]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player2", 1);</Command>
<Command>trPlayerGrantResources(2, "wood", -%Costs%);</Command>
<Command>}</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP3">trUnitSelect("%SrcObjectP3%");</Command>
<Command><![CDATA[if((trUnitDistanceToPoint(%DstPoint%) <= 2)&&]]></Command>
<Command><![CDATA[(trPlayerResourceCount(3, "wood")>=%Costs%))]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player3", 1);</Command>
<Command>trPlayerGrantResources(3, "wood", -%Costs%);</Command>
<Command>}</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP4">trUnitSelect("%SrcObjectP4%");</Command>
<Command><![CDATA[if((trUnitDistanceToPoint(%DstPoint%) <= 2)&&]]></Command>
<Command><![CDATA[(trPlayerResourceCount(4, "wood")>=%Costs%))]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player4", 1);</Command>
<Command>trPlayerGrantResources(4, "wood", -%Costs%);</Command>
<Command>}</Command>
<Command>}</Command>
<Expression>((trTime()-cActivationTime) >= 3)</Expression>
</Condition>

<Effect name ="sp Shop (4 PL.) unit create multi">
<Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
<Param name="Count" dispName="$$22435$$Count" varType="long">0</Param>
<Param name="LocationP1" dispName="Spawn P1" varType="area">0,0,0</Param>
<Param name="LocationP2" dispName="Spawn P2" varType="area">0,0,0</Param>
<Param name="LocationP3" dispName="Spawn P3" varType="area">0,0,0</Param>
<Param name="LocationP4" dispName="Spawn P4" varType="area">0,0,0</Param>
<Param name="ShopID" dispName="Shop ID" VarType="string">0</Param>
<Command>if(trQuestVarGet("spshopfor4player%ShopIDŽtive") >=0)</Command>
<Command>{</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player1")>0)]]></Command>
<Command>{</Command>
<Command>for (i=0; <%Count%)</Command>
<Command>{</Command>
<Command>trUnitCreate("%ProtoName%", "default", %LocationP1%, 0,, 1);</Command>
<Command>}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player1", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player2")>0)]]></Command>
<Command>{</Command>
<Command>for (i=0; <%Count%)</Command>
<Command>{</Command>
<Command>trUnitCreate("%ProtoName%", "default", %LocationP2%, 0,, 2);</Command>
<Command>}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player2", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player3")>0)]]></Command>
<Command>{</Command>
<Command>for (i=0; <%Count%)</Command>
<Command>{</Command>
<Command>trUnitCreate("%ProtoName%", "default", %LocationP3%, 0,, 3);</Command>
<Command>}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player3", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player4")>0)]]></Command>
<Command>{</Command>
<Command>for (i=0; <%Count%)</Command>
<Command>{</Command>
<Command>trUnitCreate("%ProtoName%", "default", %LocationP4%, 0,, 4);</Command>
<Command>}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player4", -1);</Command>
<Command>}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopIDŽtive", -1);</Command>
<Command>}</Command>
</Effect>

<Effect name ="sp Shop (4 PL.) Set Tech Status">
<Param name="TechID" dispName="$$22311$$Tech" varType="tech">0</Param>
<Param name="Status" dispName="$$22340$$Status" varType="techstatus">2</Param>
<Param name="ShopID" dispName="Shop ID" VarType="string">0</Param>
<Param name="Note" dispName="Note" varType="string">Important Use the same ID number for this as you used in the condition (sp Shop (4 PL.)) of this trigger.</Param>
<Command>if(trQuestVarGet("spshopfor4player%ShopIDŽtive") >=0)</Command>
<Command>{</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player1")>0)]]></Command>
<Command>{</Command>
<Command>trTechSetStatus(1, %TechID%, %Status%);</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player1", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player2")>0)]]></Command>
<Command>{</Command>
<Command>trTechSetStatus(2, %TechID%, %Status%);</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player2", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player3")>0)]]></Command>
<Command>{</Command>
<Command>trTechSetStatus(3, %TechID%, %Status%);</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player3", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player4")>0)]]></Command>
<Command>{</Command>
<Command>trTechSetStatus(4, %TechID%, %Status%);</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player4", -1);</Command>
<Command>}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopIDŽtive", -1);</Command>
<Command>}</Command>
</Effect>

<Effect name ="sp Shop (4 PL.) Modify Protounit">
<Param name="ProtoUnit" dispName="$$22449$$ProtoUnit" varType="protounit">Villager</Param>
<Param name="Field" dispName="$$25417$$Field" varType="pufield">0</Param>
<Param name="Delta" dispName="$$25418$$Delta" varType="float">1.0</Param>
<Param name="ShopID" dispName="Shop ID" VarType="string">0</Param>
<Param name="Note" dispName="Note" varType="string">Important Use the same ID number for this as you used in the condition (sp Shop (4 PL.)) of this trigger.</Param>
<Command>if(trQuestVarGet("spshopfor4player%ShopIDŽtive") >=0)</Command>
<Command>{</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player1")>0)]]></Command>
<Command>{</Command>
<Command>trModifyProtounit("%ProtoUnit%", 1, %Field%, Þlta%);</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player1", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player2")>0)]]></Command>
<Command>{</Command>
<Command>trModifyProtounit("%ProtoUnit%", 2, %Field%, Þlta%);</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player2", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player3")>0)]]></Command>
<Command>{</Command>
<Command>trModifyProtounit("%ProtoUnit%", 3, %Field%, Þlta%);</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player3", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player4")>0)]]></Command>
<Command>{</Command>
<Command>trModifyProtounit("%ProtoUnit%", 4, %Field%, Þlta%);</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player4", -1);</Command>
<Command>}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopIDŽtive", -1);</Command>
<Command>}</Command>
</Effect>

<Effect name ="sp Shop (4 PL.) Grant Resources">
<Param name="ResName" dispName="$$22455$$Resource" varType="resource">food</Param>
<Param name="Amount" dispName="$$22456$$Amount" varType="long">100</Param>
<Param name="ShopID" dispName="Shop ID" VarType="string">0</Param>
<Param name="Note" dispName="Note" varType="string">Important Use the same ID number for this as you used in the condition (sp Shop (4 PL.)) of this trigger.</Param>
<Command>if(trQuestVarGet("spshopfor4player%ShopIDŽtive") >=0)</Command>
<Command>{</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player1")>0)]]></Command>
<Command>{</Command>
<Command>trPlayerGrantResources(1, "%ResName%", %Amount%);</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player1", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player2")>0)]]></Command>
<Command>{</Command>
<Command>trPlayerGrantResources(2, "%ResName%", %Amount%);</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player2", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player3")>0)]]></Command>
<Command>{</Command>
<Command>trPlayerGrantResources(3, "%ResName%", %Amount%);</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player3", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player4")>0)]]></Command>
<Command>{</Command>
<Command>trPlayerGrantResources(4, "%ResName%", %Amount%);</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player4", -1);</Command>
<Command>}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopIDŽtive", -1);</Command>
<Command>}</Command>
</Effect>

<Effect name ="sp Shop (4 PL.) Modify All Protounits">
<Param name="Field" dispName="$$25417$$Field" varType="pufield">0</Param>
<Param name="Delta" dispName="$$25418$$Delta" varType="float">1.0</Param>
<Param name="ShopID" dispName="Shop ID" VarType="string">0</Param>
<Param name="Note" dispName="Note" varType="string">Important Use the same ID number for this as you used in the condition (sp Shop (4 PL.)) of this trigger.</Param>
<Command>if(trQuestVarGet("spshopfor4player%ShopIDŽtive") >=0)</Command>
<Command>{</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player1")>0)]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("ModProtoRandomQV", 0);</Command>
<Command>while(1500>=trQuestVarGet("ModProtoRandomQV")) {</Command>
<Command>trModifyProtounit(""+kbGetProtoUnitName(trQuestVarGet("ModProtoRandomQV")), 1, %Field%, Þlta%);</Command>
<Command>trQuestVarSet("ModProtoRandomQV",trQuestVarGet("ModProtoRandomQV")+1);}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player1", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player2")>0)]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("ModProtoRandomQV", 0);</Command>
<Command>while(1500>=trQuestVarGet("ModProtoRandomQV")) {</Command>
<Command>trModifyProtounit(""+kbGetProtoUnitName(trQuestVarGet("ModProtoRandomQV")), 2, %Field%, Þlta%);</Command>
<Command>trQuestVarSet("ModProtoRandomQV",trQuestVarGet("ModProtoRandomQV")+1);}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player2", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player3")>0)]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("ModProtoRandomQV", 0);</Command>
<Command>while(1500>=trQuestVarGet("ModProtoRandomQV")) {</Command>
<Command>trModifyProtounit(""+kbGetProtoUnitName(trQuestVarGet("ModProtoRandomQV")), 3, %Field%, Þlta%);</Command>
<Command>trQuestVarSet("ModProtoRandomQV",trQuestVarGet("ModProtoRandomQV")+1);}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player3", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player4")>0)]]></Command>
<Command>{</Command>
<Command>trQuestVarSet("ModProtoRandomQV", 0);</Command>
<Command>while(1500>=trQuestVarGet("ModProtoRandomQV")) {</Command>
<Command>trModifyProtounit(""+kbGetProtoUnitName(trQuestVarGet("ModProtoRandomQV")), 4, %Field%, Þlta%);</Command>
<Command>trQuestVarSet("ModProtoRandomQV",trQuestVarGet("ModProtoRandomQV")+1);}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player4", -1);</Command>
<Command>}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopIDŽtive", -1);</Command>
<Command>}</Command>
</Effect>

<Effect name ="sp Shop (4 PL.) Forbid and Disable Unit">
<Param name="ProtoUnit" dispName="$$22421$$Unit" VarType="protounit">default</Param>
<Param name="ShopID" dispName="Shop ID" VarType="string">0</Param>
<Param name="Note" dispName="Note" varType="string">Important Use the same ID number for this as you used in the condition (sp Shop (4 PL.)) of this trigger.</Param>
<Command>if(trQuestVarGet("spshopfor4player%ShopIDŽtive") >=0)</Command>
<Command>{</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player1")>0)]]></Command>
<Command>{</Command>
<Command>trForbidProtounit(1, "%ProtoUnit%");</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player1", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player2")>0)]]></Command>
<Command>{</Command>
<Command>trForbidProtounit(2, "%ProtoUnit%");</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player2", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player3")>0)]]></Command>
<Command>{</Command>
<Command>trForbidProtounit(3, "%ProtoUnit%");</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player3", -1);</Command>
<Command>}</Command>
<Command><![CDATA[if(trQuestVarGet("spshopfor4player%ShopID%Player4")>0)]]></Command>
<Command>{</Command>
<Command>trForbidProtounit(4, "%ProtoUnit%");</Command>
<Command>trQuestVarSet("spshopfor4player%ShopID%Player4", -1);</Command>
<Command>}</Command>
<Command>trQuestVarSet("spshopfor4player%ShopIDŽtive", -1);</Command>
<Command>}</Command>
</Effect>

xDDDDDDDDDD

or download the whole trigger set here

Spielbubi

[This message has been edited by loard of peace (edited 05-30-2011 @ 11:17 AM).]

Mister SCP
Scenario Reviewer
posted 05-31-11 02:49 AM EDT (US)     519 / 849       
the fourm killed your working code like

spshopfor4player%ShopIDŽtive


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
loard of peace
Skirmisher
posted 05-31-11 09:57 AM EDT (US)     520 / 849       
oh, u are right
bad forum =(..
musketeer925
Skirmisher
posted 06-17-11 11:47 AM EDT (US)     521 / 849       
Alright SCP, I've bee stumped by a trigger. Can't get it working. Can ya find anything wrong with it?


<Effect name="Units in Area Work Units in Area">
<Param name="Player1" dispName="Source Player" VarType="string">1</Param>
<Param name="UnitType1" dispName="Source Unit Type" VarType="unittype">Unit</Param>
<Param name="DstPoint1" dispName="$$22410$$X" varType="area">0</Param>
<Param name="Dist1" dispName=" SourceRadius" VarType="string">10</Param>
<Param name="Player" dispName="Target Player" VarType="string">1</Param>
<Param name="UnitType" dispName="Target Unit Type" VarType="unittype">Unit</Param>
<Param name="DstPoint" dispName="$$22410$$X" varType="area">0</Param>
<Param name="Dist" dispName="Target Radius" VarType="string">10</Param>
<Command>for (allx=1600;>=-1){ if (kbGetUnitTypeName(all)=="%UnitType1%") break;}</Command>
<Command>for(Qid1=0;>1){}</Command>
<Command>xsSetContextPlayer(%Player1%);kbLookAtAllUnitsOnMap();</Command>
<Command>Qid1=kbUnitQueryCreate("QDUA_%Player1%_%UnitType1%");</Command>
<Command>kbUnitQuerySetPlayerID(Qid1, %Player1%, true);</Command>
<Command>kbUnitQuerySetUnitType(Qid1, allx);</Command>
<Command>kbUnitQuerySetPosition(Qid1, vector(%DstPoint1%));</Command>
<Command>kbUnitQuerySetMaximumDistance(Qid1, %Dist1%);</Command>
<Command>kbUnitQuerySetAscendingSort(Qid1, true);</Command>
<Command>kbUnitQuerySetState(Qid1, 2);</Command>
<Command>kbUnitQueryResetResults(Qid1);</Command>
<Command>kbUnitQueryExecute(Qid1);</Command>
<Command>for (all=1600;>=-1){ if (kbGetUnitTypeName(all)=="%UnitType%") break;}</Command>
<Command>for(Qid=0;>1){}</Command>
<Command>xsSetContextPlayer(%Player%);kbLookAtAllUnitsOnMap();</Command>
<Command>Qid=kbUnitQueryCreate("QDUA_%Player%_%UnitType%");</Command>
<Command>kbUnitQuerySetPlayerID(Qid, %Player%, true);</Command>
<Command>kbUnitQuerySetUnitType(Qid, all);</Command>
<Command>kbUnitQuerySetPosition(Qid, vector(%DstPoint%));</Command>
<Command>kbUnitQuerySetMaximumDistance(Qid, %Dist%);</Command>
<Command>kbUnitQuerySetAscendingSort(Qid, true);</Command>
<Command>kbUnitQuerySetState(Qid, 2);</Command>
<Command>kbUnitQueryResetResults(Qid);</Command>
<Command>kbUnitQueryExecute(Qid);</Command>
<Command>trUnitSelectClear();</Command>
<Command>trUnitSelect(""+kbUnitQueryGetResult(Qid1, 0)+"");</Command>
<Command>trUnitDoWorkOnUnit(""+kbUnitQueryGetResult(Qid, 0)+"",-1);</Command>
</Effect>


I've always sucked with queries.

[This message has been edited by musketeer925 (edited 06-17-2011 @ 11:50 AM).]

Mister SCP
Scenario Reviewer
posted 06-21-11 03:38 PM EDT (US)     522 / 849       
i need to test it. I can only try to debug it with trigtemp.xs


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 06-25-11 01:43 PM EDT (US)     523 / 849       
So you need my trigtemp from when I used it?

[This message has been edited by musketeer925 (edited 06-25-2011 @ 01:44 PM).]

bendaninja
Skirmisher
posted 06-28-11 03:47 AM EDT (US)     524 / 849       
my request is an effect that places a "grouping" in an area

something that looks like:

grouping name: ___________
set area show area

im wanting this trigger for a scenario idea i have, about a new maze armies where parts of the maze randomly change every set amount of time.
mattios550
Skirmisher
posted 06-29-11 10:58 AM EDT (US)     525 / 849       
Is there a way to block cheats for all players in the Scenario Editor?

mattios550

(C) All rights reserved.
« Previous Page  1 ··· 10 ··· 19 20 21 22 23 ··· 30 ··· 34  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires III Heaven | HeavenGames