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

Scenario Design
Moderated by MosheLevi, Mister SCP

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Have a Trigger Request? Post it here!
« Previous Page  1 2 3 4 5 6 ··· 10 ··· 20 ··· 30 ··· 34  Next Page »
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).]

Replies:
posted 07-08-09 02:36 AM EDT (US)     76 / 851  
the first unit u can select via this effect is the "center 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
posted 07-08-09 12:59 PM EDT (US)     77 / 851  
well then in that case i have 4 target units, but i have alot of center units in a certain area

AGE OF EMPIRES 3 USERNAME - KevTheGreat :::: DAWN OF WAR 2 USERNAME - KEVTHEGREATEST :::: STEAM USERNAME - 何健龍
Some of my aoe3 scenarios here,
Most Popular: The Race 2 4.7/5.0 Global Wars 4.4/5.0 The Great Colosseum 4.6/5.0 Arab Desert 4V2 3.9/5.0 The Race 4.2/5 Fort of War 3.9/5.0
don't click this?
Follow me on Twitter
我知廣東話, 你知唔知廣東話?? 如果你知 contact me !!
posted 07-09-09 04:35 AM EDT (US)     78 / 851  
use these two effects in the SAME trigger without ANY effect between.
 <Effect name="Protounits work on Units (KEV)">
<Param name="PlayerID" dispName="$$22444$$From Player" VarType="player">1</Param>
<Param name="SrcObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
<Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
<Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
<Param name="DstObject" dispName="Target Unit" VarType="unit">default</Param>
<Param name="DstObject2" dispName="Target Unit2" VarType="unit">default</Param>
<Param name="DstObject3" dispName="Target Unit3" VarType="unit">default</Param>
<Command>for(Qid=0;>1){}</Command>
<Command>for(a=0;>1){}</Command>
<Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>
<Command>Qid=kbUnitQueryCreate("QDUA_%PlayerID%_%ProtoName%");</Command>
<Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%, true);</Command>
<Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%ProtoName%"));</Command>
<Command>kbUnitQuerySetPosition(Qid, kbGetBlockPosition("%SrcObject%"));</Command>
<Command>kbUnitQuerySetMaximumDistance(Qid, %Dist%);</Command>
<Command>kbUnitQuerySetAscendingSort(Qid, false);</Command>
<Command>kbUnitQuerySetState(Qid,2);</Command>
<Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>
<Command>a=a+1;</Command>
<Command>if (a==5) a=1;</Command>
<Command>trUnitSelectClear();</Command>
<Command>trUnitSelectByID(1*kbUnitQueryGetResult(Qid,i));</Command>
<Command>if (a==1) trUnitDoWorkOnUnit("%DstObject%");</Command>
<Command>else if (a==2) trUnitDoWorkOnUnit("%DstObject2%");</Command>
<Command>else if (a==3) trUnitDoWorkOnUnit("%DstObject3%");</Command>
</Effect>
<Effect name="Protounits work on Units (KEV2)">
<Param name="DstObject4" dispName="Target Unit4" VarType="unit">default</Param>
<Command>else trUnitDoWorkOnUnit("%DstObject4%");</Command>
<Command>}</Command>
</Effect>

Have also made two new effects which change the light settings in your scenario. You should be able with a few tries to create custom lightnings which isnt depending that much on your gfx settings means this doesn't automaticly create fog on some comps
   <Effect name="Set Terrain Ambient">
<Param name="R" dispName="R (0-255)" varType="long">0</Param>
<Param name="G" dispName="G (0-255)" varType="long">0</Param>
<Param name="B" dispName="B (0-255)" varType="long">0</Param>
<Command>/**/ terrainAmbient(%R%,%G%,%B%);</Command>
</Effect>
<Effect name="Set Sun Color">
<Param name="R" dispName="R (0-255)" varType="long">0</Param>
<Param name="G" dispName="G (0-255)" varType="long">0</Param>
<Param name="B" dispName="B (0-255)" varType="long">0</Param>
<Command>/**/ sunColor(%R%,%G%,%B%);</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 08-18-2009 @ 03:38 PM).]

posted 07-09-09 12:29 PM EDT (US)     79 / 851  
thx will test it out once i can get my scenario up and running

AGE OF EMPIRES 3 USERNAME - KevTheGreat :::: DAWN OF WAR 2 USERNAME - KEVTHEGREATEST :::: STEAM USERNAME - 何健龍
Some of my aoe3 scenarios here,
Most Popular: The Race 2 4.7/5.0 Global Wars 4.4/5.0 The Great Colosseum 4.6/5.0 Arab Desert 4V2 3.9/5.0 The Race 4.2/5 Fort of War 3.9/5.0
don't click this?
Follow me on Twitter
我知廣東話, 你知唔知廣東話?? 如果你知 contact me !!
posted 07-09-09 05:10 PM EDT (US)     80 / 851  
I need a trigger that the player with most units around a building gets it. So it can be an effect or only a condition where I have to put the player.
posted 07-09-09 05:26 PM EDT (US)     81 / 851  
lazy SH posted this a while ago in the AOM thread...

Dont't know if I can create it up to tomorrow since my vacations start then for 3 weeks. Biggest Problem is that trUnitsInArea maybe only make the same fault as in Crazies Trigger (which i havent noticed in short testing period) that it just count the units in the max range and not between the min and max range. Will see if I get the same issue. However it is worth a try :P.

The only thing I can say you is that it will become a 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 07-09-2009 @ 05:27 PM).]

posted 07-10-09 05:41 AM EDT (US)     82 / 851  
At AoM no one answered -.-

I tried it myself some months ago with something like that (don't remember only remember that it was a condition)

trunitsinarea(...) > trunitsinarea(...)
and that 7 times for seven enemy players

[This message has been edited by Sir_Hans (edited 07-10-2009 @ 05:42 AM).]

posted 07-14-09 00:23 AM EDT (US)     83 / 851  
Request:

Timer upward

An effect timer that counts upward so 0:01, 0:02 and onward. Basically like the countdown timer but reversed.


Timer lived

When a player loses an overlay text displays how long that player lived.

AGE OF EMPIRES 3 USERNAME - KevTheGreat :::: DAWN OF WAR 2 USERNAME - KEVTHEGREATEST :::: STEAM USERNAME - 何健龍
Some of my aoe3 scenarios here,
Most Popular: The Race 2 4.7/5.0 Global Wars 4.4/5.0 The Great Colosseum 4.6/5.0 Arab Desert 4V2 3.9/5.0 The Race 4.2/5 Fort of War 3.9/5.0
don't click this?
Follow me on Twitter
我知廣東話, 你知唔知廣東話?? 如果你知 contact me !!

[This message has been edited by KevTheGreat (edited 07-14-2009 @ 00:32 AM).]

posted 08-01-09 01:08 PM EDT (US)     84 / 851  
Is there a condition like player unit dies, with the effect play sound file, send message or something, without specifically making a trigger for each unit.
Building on that, if a player loses a few units at a time it plays a different sound?
posted 08-03-09 03:04 AM EDT (US)     85 / 851  
1st the Easiest ->
Is there a condition like player unit dies, with the effect play sound file, send message or something, without specifically making a trigger for each unit.
We need not an entirely new trigger just create a trigger like this

Trigger1: killed units (activ,looped,immediate,high priority)
Condition: QV State Value (gunner's trigpack)
fill in:
Fake Player = 1
Stat Type = Lost Units
Operator ">="
QVPointZero = QV1
Value = 1
Condition 2 - timer (depends on how long your "Sound" is)
Effect:
QV Set Value
fill in
VarName = QV1 really important that you use the same as in the condition but a unique one for every trigger.
Fake Player = 1
Stat Type = Lost Units

Effect 2 - Sound Filename

For Player 2 you change the Fake Player to 2 and the Variable QV1 to QV2. This you do with all players you wish
Building on that, if a player loses a few units at a time it plays a different sound?
instead of >= as operator use == and build a second trigger where the value is 2, a third where it is 3... but keep in mind that your highest amount need again the operator >=. If you don't do this and the amount is one time bigger then the whole trigger won't work anymore AND do not change the QV for the same player

kev's trigger is now in work.

@Hans what should happen if there is a tie (player 1 has 10 units and player 2 in this area)? Does the owner of the building still should own it then? is it randomly?

Edit:
       <Effect name="Get Total Time (overlay Text)">
<Param name="TextB" dispName="Text Before" VarType="stringid">Default</Param>
<Param name="TextA" dispName="Text After" VarType="stringid">Default</Param>
<Param name="Duration" dispName="$$22390$$Fade Duration" varType="float">3.0</Param>
<Param name="Background" dispname="$$42876$$Background" varType="string">None</Param>
<Command>int a=trTime(); int b=0; int c=0;</Command>
<Command>while (a>=60) {b=b+1; a=a-60;}</Command>
<Command>while (a>=10) {c=c+1;a=a-10;}</Command>
<Command>trOverlayText("%TextB% "+b+":"+c+""+a+" %TextA%", %Duration%, -1, -1, -1, "ºckground%");</Command>
</Effect>
        <Effect name="QV to Time Converter">
<Param name="TextB" dispName="Text Before" VarType="stringid">Default</Param>
<Param name="TextA" dispName="Text After" VarType="stringid">Default</Param>
<Param name="PlayerID" dispName="$$22444$$From Player" VarType="player">1</Param>
<Param name="QV1" dispName="$$32954$$Var Name" VarType="string">QV1</Param>
<Command>int a=trQuestVarGet("%QV1%"); int b=0; int c=0;</Command>
<Command>while (a>=60) {b=b+1; a=a-60;}</Command>
<Command>while (a>=10) {c=c+1;a=a-10;}</Command>
<Command>trChatSend(%PlayerID%,"%TextB% "+b+":"+c+""+a+" %TextA%",);</Command>
</Effect>
use this like
Trigger1: LOOPED, IMMEDIATE, high priority.
Condition: QV Check (< 30)
Condition2:Timer (1)
Effect: QV Modify (+1)
Effect2:QV to Timer Converter

Never ever use QVs like 34.7 or 129.78. Since the Trigger converts the Reals (QV's with 6 decimals) to Integer with no decimals. If you don't follow this rule your scen will break.


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-18-2009 @ 03:37 PM).]

posted 08-04-09 09:43 AM EDT (US)     86 / 851  
My Pack is updated to V3.1. The main change is the typeloader. It's an effect which declare all variables. The cool thing is now that it declare as global variable and not annymore are local variables needed.

This have positive Effects
1.You can stack now all effects from my typetest not like before that some aren't useable more as one time per trigger
2.A Command less is used in the code and this affect the performence

Also another effect is included "Disable Trigger2" which works also if the normal disable trigger don't work anymore.

Keep in mind that you have to create the typeloader-trigger BEFORE using any of my effects. The best position for this is Trigger #1. More details about that are included in the docs.

Here is a dl-link for the filehttp://aoe3.heavengames.com/downloads/showfile.php?fileid=2419


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-04-2009 @ 09:45 AM).]

posted 08-05-09 03:05 AM EDT (US)     87 / 851  
Oops, I posted this as a new topic when I really should have posted it here. Forgive the "newbie" for that mistake please. Anyway...

I have a scenario where I want to have certain wall sections auto-repair themselves (like manually selecting the hammer icon when you select that wall section). I only want them to auto-repair when they have been damaged 40% or more. I do not want them to be invulnerable, so if they end up being 100% damaged due to a super-heavy attack, then they would go away just like if they did not have auto-repair.

Although there is a trigger condition that allows a percent damage to be determined, I have not been able to find a trigger effect that simulates the repair function (hammer icon for a building). Am I missing something? If not, then does someone have a solution to auto-repair a wall under certain conditions?

Thanks in advance.
posted 08-05-09 03:41 AM EDT (US)     88 / 851  
<Effect name="Repair Unit">
<Param name="UnitID" dispName="Target Unit" varType="unit">default</Param>
<Command>repairUnit(kbGetBlockID(""+1*%UnitID%));</Command>
</Effect>
some notes
This is handeled like the normal "repair"-effect means it costs resources and can be only used when it is not under attacking (+3 secs after attacking) therefor it might be sensefull to loop it and add to your conditions the Condition Timer (5 secs should do it).
-Mr SCP

Edit: In addition to that trigger this one might also help you
<Effect name="Cancel Repair Unit">
<Param name="UnitID" dispName="Target Unit" varType="unit">default</Param>
<Command>cancelRepairUnit(kbGetBlockID(""+1*%UnitID%));</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 08-18-2009 @ 03:40 PM).]

posted 08-05-09 04:27 AM EDT (US)     89 / 851  
Thank you for your reply Mr. SCP! Yup, that is what I wanted.
posted 08-05-09 04:32 AM EDT (US)     90 / 851  
np, This was an easier one which don't took much time


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
posted 08-13-09 07:03 AM EDT (US)     91 / 851  
When you re-load your saved game in single player, there is a pause window. Is it possible to make a condition using that window?

Example:
Trigger1: Active
Condition: Pause window : On

There is a 'force' pause game effect. So it should be possible to make a condition?

Damari
posted 08-14-09 10:17 AM EDT (US)     92 / 851  
sry I am not able to do this.
As you said there is a Effect. This one include a COMMAND which tells what to do. If ou want to make a CONDITION. You need an Expression that become true in your scenario (e.g. timer=5sec). This is the reason why i cannot do it.
So you could tell me now what you want to do with this trigger and i might be able to give you suggestions on how to do it.


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
posted 08-14-09 11:31 AM EDT (US)     93 / 851  
Mister SCP,

I have an idea how to deal with the save issue. But I need some type of condition to fire after the player re-loads from a save. So I was looking for something that is different after the re-load, this is why I thought the pause window would do it.

I don't want a 'player' controlled condition. If you can think of something, please let me know. Because I think this would be an important issue to fix.

Thanks for your help,

Damari
posted 08-14-09 01:44 PM EDT (US)     94 / 851  
Why don't you just place a building and tell the player in the instructions that he should click that building after he loaded a saved game.
Then, when the building is selected, fire a choice dialog "Did you just load a savegame?", and if the player clicks yes, fire whatever triggers you wanted to fire.

Play my scenarios! You won't believe how much fun they are!
posted 08-14-09 11:38 PM EDT (US)     95 / 851  
Darthcast,

Problem with that is, the player can (and probably will) click that building even if they didn't save, getting the extra upgrades. This is why I need a condition that is not player controlled and after a re-load.

Someone out there must have an idea what changes in code accrue after a save. Right now all I know is a pause window opens and HC cards are reset. Because, logically thinking, if a change accrues, then a condition should be able to point to this change.

Damari
posted 08-15-09 04:25 PM EDT (US)     96 / 851  
You need to trust the player to not ruin the game for himself.
I also use HC cards, and I simply state at the download pages that bugs occur if you load a savegame. I didn't make RPGs though...

I don't know much about triggers, but afaik only things can be used that were defined by ES/BHG... That means not everything is possible...

Play my scenarios! You won't believe how much fun they are!
posted 08-16-09 02:30 AM EDT (US)     97 / 851  
I also use HC cards, and I simply state at the download pages that bugs occur if you load a savegame. I didn't make RPGs though...
rpg's are a great genre. Since you allready take a look on some you should have mention that they easily take longer then other genre (not include your defend the fort with 30 mins timer )
I don't know much about triggers, but afaik only things can be used that were defined by ES/BHG... That means not everything is possible...
true, mainly for conditions it is hard to find new ones

@damari: I ve an idea about using tech triggers. Just need to test it. btw does it include all HC cards (also from triggers used ones or just which the player activate from his homecity shipments?


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
posted 08-16-09 04:03 PM EDT (US)     98 / 851  
Mister SCP,

Thank you so much for looking into this. I don't have HC shipments in my scenarios, so it's caused through triggers and from what I can tell it's all HC cards.

Damari
posted 08-16-09 10:43 PM EDT (US)     99 / 851  
rpg's are a great genre. Since you already take a look on some you should have mention that they easily take longer then other genre
RPG is one of my favorite genres - but not AoE RPGs, real ones.
Also by saying that I haven't made any RPGs I implied that those take longer than other scenarios.
(not include your defend the fort with 30 mins timer )
LOL, I guess this is a running gag now.

Play my scenarios! You won't believe how much fun they are!
posted 08-18-09 10:59 AM EDT (US)     100 / 851  
Hi, Wow it's the 100th post now. I am happy that this thread isn't dissapered and archived since it exist now a few months

However:@damari I ve finally found sth and made out of it a trigger!!!
Post this Condition in your typetest
                <Condition name="QV Check HP">
<Param name="QV1" dispName="QV Name" varType="string">QV1</Param>
<Param name="Player" dispName="Player" varType="player">1</Param>
<Param name="SrcObject" dispName="$$19160$$Unit" varType="unit">default</Param>
<Command>xsSetContextPlayer(%Player%);</Command>
<Expression>trQuestVarGet("%QV1%")>kbUnitGetMaximumHitpoints(kbGetBlockID(""+1*%SrcObject%))</Expression>
</Condition>

Aswell this Effect:
           <Effect name="QV Set Max HP">
<Param name="QV1" dispName="R" varType="string">QV1</Param>
<Param name="Player" dispName="Player" varType="player">1</Param>
<Param name="SrcObject" dispName="$$19160$$Unit" varType="unit">default</Param>
<Command>xsSetContextPlayer(%Player%);</Command>
<Command>trQuestVarSet("%QV1%",kbUnitGetMaximumHitpoints(kbGetBlockID(""+1*%SrcObject%)));</Command>
</Effect>
Now I want explain how it works.
1.Create a trigger with "QV Set Max HP" (must be before you are using this effect). In case that you make it for your cudgel scenario use the following Parameters:
QV Name=Musket
Player:1
Unit: Musket of Player1

This Effect gets the current Max hp amount of your unit

2. Create a Trigger with the Condition -QV Check HP-
use the same Parameters as above! This Condition is now able to check when the scenario is reloaded since it start with 602 hp then and not with 750(?) hp. More details you will get in the trigger list which you will see down at the site.

3.Whenether you are upgrading hp of your unit use QV Set Max Hp in the same effect as your upgrade (with again same parameters)

Additional: Remembering of How often your Tech was used
                     <Effect name="QV Set Number Tech Activ">
<Param name="PlayerID" dispName="$$22301$$Player" varType="player">1</Param>
<Param name="QV1" dispName="QV Name" varType="string">QV1</Param>
<Param name="TechID" dispName="$$22311$$Tech" varType="tech">0</Param>
<Param name="QV2" dispName="QV Name2" varType="string">QV2</Param>
<Param name="TechID" dispName="$$22311$$Tech" varType="tech">0</Param>
<Param name="QV3" dispName="QV Name3" varType="string">QV3</Param>
<Param name="TechID" dispName="$$22311$$Tech" varType="tech">0</Param>
<Command>tla=trQuestVarGet("%QV1%");</Command>
<Command>while (tla>=1) {trTechSetStatus(%PlayerID%, %TechID%, 2);tla=tla-1;}</Command>
<Command>tla=trQuestVarGet("%QV2%");</Command>
<Command>while (tla>=1) {trTechSetStatus(%PlayerID%, %TechID2%, 2);tla=tla-1;}</Command>
<Command>tla=trQuestVarGet("%QV3%");</Command>
<Command>while (tla>=1) {trTechSetStatus(%PlayerID%, %TechID3%, 2);tla=tla-1;}</Command>
</Effect>
4.Add in your upgrade Trigger a QV Modify and grant e.g. the QV- "Comb4a" for 1 point. For other triggers you can also do this but remeber every upgrade a unique tech
5.Additional to step2 you add now in the same trigger the "QV Set Number Activ"-Effect which can give you back the same amount of used HCCards (e.g. 3xHCIinfanterIroquisCombat)by using the QV's.

Trigger Structure
Trigger0: check box doesnt matter
Condition:always
Effect:Typeloader (only if you want use the effect QV Set Number Tech Active)

Trigger1:Active, Not Looped, Run Immediate,High Priority
Condition:Always
Effect:QV Set Max HP

Trigger2:Active, Not Looped,...
Condition:Always
Effect:a tech upgrade
Effect2:QV Modify ("QVMusket" + 1)
Effect3:QV Set Max HP


Trigger3:Active,Looped, Run Immediate,Medium Priority
-Condition: Check QV HP
-Effect:QV Set Number Tech Activ (Player 1, Your Tech+your QV which you have used in Trigger2)
-Effect2:QV Set Max HP

I hope you are not disappointet that it took that long but I upgraded my comp to windows 7 RC
~Consti


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-20-2009 @ 08:23 AM).]

« Previous Page  1 2 3 4 5 6 ··· 10 ··· 20 ··· 30 ··· 34  Next Page »
Age of Empires III Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Empires III Heaven | HeavenGames