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

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Have a Trigger Request? Post it here!
« Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 60 ··· 70 ··· 80 ··· 90 ··· 95 96 97 98 99  Next Page »
posted 04 October 2007 11:46 AM EDT (US)   
So you have a question trigger request?

You can post it here!



Hello and Welcome to the Trigger Request Thread (TRT). This thread purpose is only to place trigger request and discuss about them. If you have unrelated questions or need help with triggers, please use OmegasRage thread!



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

  1. What is a FAQ?
    The term "FAQ" (when pronounced, it rhymes with "back") is an acronym for Frequently Asked Questions.
  2. How do I install a trigger?
    First of all, you need to have Age of Mythology installed. If you have that, then you are half away done. Now you will need to find your way to your AoM installation folder, and open the trigger folder or the trigger2 folder if you pretend to install the new trigger on The Titans (the expansion). With the notepad, open a file called, typetest.xml - at this point, you need to copy the trigger from this page and paste it there. If you requested a condition, then place it under or under if it was an effect you requested.

    Notes:
    1. Please put the trigger at the end of each list so you can easly remove them and keep the integrity of the typetest file.
    2. When copying the trigger from someone, please click the edit image (), and only then copy the respective effect or condition.
    3. If this is your 1st trigger you're installing, please backup the original typetest file.

  3. So.. How exactly are new triggers done?
    AoM has a built-in engine that can prase XS code. Triggers are programmed and interpreted using this language through a serious of existing functions. Since there are over 600 functions, and only a few are used by the default triggers, this leaves plenty of room for a whole new set of advanced, usefull triggers - but it does have some limitations...
  4. I want to learn triggers, how do I do that?
    It takes a quite some time, but if you really wish to learn triggers, I recommend fully understanding XS language before you start making triggers, and for that you need to go here - Master XS. If you want to skip all that, and you want to be able to do only simple triggers, read this guide.
  5. Help! My triggers have stopped working!
    Triggers Stop Working Guide. Also using run immediately, linking camera tracks, sound timers and decimals in conditions like Timer and Distance to Unit effect, might cause this. Moreover, typing an invalid name on the Victory Conditions will cause a trigger block. But post these sort of questions in the Great Question thread.



Resources

Recommended Downloads:
  1. Trigger Loader 2 + Quest Vars (AoM && TT) by invent00r and Mythic_Freak
  2. SomeNewXTriggers 3 (TT) & SomeNewTriggers 4 (AoM) by Reyk
  3. Proactive Triggers (TT & AoM) by invent00r
  4. Advanced Triggers Set (TT) by pftq
  5. New Custom Triggers (TT) by Baseballkid14
  6. New triggers for TT v3 by nottud
  7. Conditonal Effects (TT & AoM) by nottud
  8. Angry Levels (TT & AoM) by angryzor
  9. SIMSTools (TT) by angryzor
  10. A list of all guides sorted by Paperfriend




Posting a Request

So you have read the FAQ and want to post a request? Ok, go for it, just be sure to use the following format:

Name - This should be as straightforward as possible.
Description - Always describe the actions that you want the trigger to perform. Please give atleast one example of use.

Remember that not all triggers are possible but I - and anyone who wants to help me -, will try our best.

Enjoy. .
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.

[This message has been edited by invent00r (edited 08-15-2008 @ 03:40 PM).]

Replies:
posted 20 December 2008 05:41 PM EDT (US)     2401 / 2502  
Could any of you good programmers fix this effect for me? I am basically a complete beginner so I don't know too much about this language. All I can do is copy and paste from other triggers. Btw, the army "1,10" should be the main character that buys the items and the army "1,11" is the army that all the units get spawned into.
   <Effect name="Shop Object">
<Param name="DstPoint" dispName="Point" varType="area">0</Param>
<Param name="Dist" dispName="$$22298$$Distance" VarType="float">0</Param>
<Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
<Param name="Location" dispName="" varType="area">0,0,0</Param>
<Param name="Count" dispName="$$22435$$Count" varType="long">0</Param>
<Command>trArmySelect("1,10");</Command>
<Command>if(trUnitDistanceToPoint(%DstPoint%) <= %Dist%) trArmyDispatch("1,11", "%ProtoName%", %Count%, %Location%, 0, true);</Command>
<Command>trArmySelect("2,10");</Command>
<Command>if(trUnitDistanceToPoint(%DstPoint%) <= %Dist%) trArmyDispatch("2,11", "%ProtoName%", %Count%, %Location%, 0, true);</Command>
<Command>trArmySelect("3,10");</Command>
<Command>if(trUnitDistanceToPoint(%DstPoint%) <= %Dist%) trArmyDispatch("3,11", "%ProtoName%", %Count%, %Location%, 0, true);</Command>
<Command>trArmySelect("4,10");</Command>
<Command>if(trUnitDistanceToPoint(%DstPoint%) <= %Dist%) trArmyDispatch("4,11", "%ProtoName%", %Count%, %Location%, 0, true);</Command>
<Command>trArmySelect("5,10");</Command>
<Command>if(trUnitDistanceToPoint(%DstPoint%) <= %Dist%) trArmyDispatch("5,11", "%ProtoName%", %Count%, %Location%, 0, true);</Command>
<Command>trArmySelect("6,10");</Command>
<Command>if(trUnitDistanceToPoint(%DstPoint%) <= %Dist%) trArmyDispatch("6,11", "%ProtoName%", %Count%, %Location%, 0, true);</Command>
</Effect>

[This message has been edited by Blobbyblob (edited 12-20-2008 @ 05:43 PM).]

posted 21 December 2008 12:58 PM EDT (US)     2402 / 2502  
COULD SOMEONE PLEASE MAKE THIS A CONDITION!!?:


I need a condition where something will occur AFTER a camera track plays. Such as making another camera track play after the one before it.

SO...a condition that says,

"after camera track"

I need to play dialogue, and play another track after another, my scenario is playable up to 10 minutes so far and I just need this condition.


THANKS
posted 21 December 2008 01:41 PM EDT (US)     2403 / 2502  
It should be rather easy to do that with fire event after the camera track has finished.

oh you can wait for what I can give
you know what I am so you know how I live
try to look proud but you’re not in the slightest
its happening now and it’s always been like this.
posted 21 December 2008 02:20 PM EDT (US)     2404 / 2502  
Okay here's my problem...

I'm making a Roman scenario, and my General dies. (really gets knocked out) I then have it fade to black when he dies, and the condition is 'Army is Killed' Or whatever. Then, I need to go to another camera track, which is where the General is in a German prison(inside a hillfort). I have the camera tracks and everything ready...BUT...I don't know what to use as a condition to play the prison camera track. I cant use anything like army dies because its only one unit, and when he dies the trigger is done. I just need to know if anyone knows a condition on how to play the next camera track.

Thanks,

Mini.

[This message has been edited by IVI i n i (edited 12-21-2008 @ 03:17 PM).]

posted 21 December 2008 04:52 PM EDT (US)     2405 / 2502  
Two options:

1) select a trigger in the dropdown box in the camera track effect. When the camera track is done, that trigger is activated.
2) Use the Timer condition, and have the time match the camera track time.

For single player, you can use either, for multiplayer you'd better use the second.
posted 21 December 2008 04:58 PM EDT (US)     2406 / 2502  
you can make an army using only one unit, so do that with the general. Set your triggers like this:

trigger1: general dies
condition: army is dead (general)
effect: fade to black (0,0,0)
effect: fire event trigger2 (gen in prison)

trigger2: Gen in prison
condition: timer 5 seconds (wait for fade to black to finish)
effect: fade to black (fade unchecked so it Un-fades)
effect: play camera track

In all your science of the mind, seeking blind through flesh and bone
Find the blood inside this stone
Well, I know I've never shown what I feel, I've always known
I plan my vengeance on my own - and I was always alone
posted 21 December 2008 05:02 PM EDT (US)     2407 / 2502  
Elrich I <33 you. I understand. SOOOO, after I hit fire event, and the trigger is on a timer, it will occur five seconds after it is activated. Okay, I just made an idiotic mistake. And yes, i know you can make an army with one unit. Wow, this is really gunna help me. Expect to see my scenario up in about 1-2 weeks. It will be about an hour long

[This message has been edited by IVI i n i (edited 12-21-2008 @ 05:05 PM).]

posted 21 December 2008 06:26 PM EDT (US)     2408 / 2502  
I would like a trigger that checks if an Army or a Unit (Preferably an Army) is attacking/fighting.

So...

Name: Army Is Fighting, Is Fighting

Description: Condition that checks if the unit or army is enganged in a fight.

Example Use: Well, classic role playing classes often have an ability that activates as you fight. You could make it random, or make it every amount of time as you fight.

I looked at the Proactive Triggers, but they have Army is being Attacked, which isn't quite enough to be what I would like. (Since it activates when you are being attacked, and not necessarily attacking.)

Aww, can't use images here, guess I'll have to use some random text stuff. Uhh... How about "You're too slow!" ~Sonic or, umm... IT'S OVER 9000!!
~Click here if I've beaten you in Brawl~
posted 21 December 2008 07:11 PM EDT (US)     2409 / 2502  
I believe there are some "Is Fighting" type conditions in one of Baseballkid14's trigger packs.

Here is a more general condition:

<Condition name="Unit Action">  
<Param name="PlayerID" dispName="$$22301$$Player" varType="string">0</Param>
<Param name="SrcObject" dispName="Unit" VarType="unit">default</Param>
<Param name="ActionID" dispName="Action ID" VarType="long">9</Param>
<Command>trUnitSelectClear();</Command>
<Command>for(id=0;>1){} id = kbGetBlockID("%SrcObject%"); </Command>
<Command>xsSetContextPlayer(%PlayerID%);</Command>
<Expression>kbUnitGetActionType(id) == ¬tionID%</Expression>
</Condition>


You put in an Action ID from the list below:

const int cActionBored=0;
const int cActionBuild=1;
const int cActionConvert=2;
const int cActionDeath=3;
const int cActionDecay=4;
const int cActionGather=5;
const int cActionHandAttack=6;
const int cActionHeal=7;
const int cActionHunting=8;
const int cActionIdle=9;
const int cActionMove=10;
const int cActionMoveByGroup=11;
const int cActionRangedAttack=12;
const int cActionRepair=13;
const int cActionResearch=14;
const int cActionTrain=15;
const int cActionOverrideAnimation=16;
const int cActionWork=17;
const int cActionAttack=18;
const int cActionUnused0=19;
const int cActionWander=20;
const int cActionEnter=21;
const int cActionAutoConvert=22;
const int cActionBirth=23;
const int cActionAreaAttack=24;
const int cActionFreeze=25;
const int cActionDormant=26;
const int cActionGatherPoint=27;
const int cActionMoveAttack=28;
const int cActionThrown=29;
const int cActionLightning=30;
const int cActionLight=31;
const int cActionJumpAttack=32;
const int cActionUnused1=33;
const int cActionMeteor=34;
const int cActionAttach=35;
const int cActionGuide=36;
const int cActionJumpMove=37;
const int cActionPickup=38;
const int cActionDiveBomb=39;
const int cActionUnused2=40;
const int cActionRegenerate=41;
const int cActionUse=42;
const int cActionEmpower=43;
const int cActionAutoGather=44;
const int cActionThrow=45;
const int cActionGore=46;
const int cActionDropoff=47;
const int cActionWhirlwindAttack=48;
const int cActionChargedRangedAttack=49;
const int cActionEject=50;
const int cActionFreezeAttack=51;
const int cActionConvertAttack=52;
const int cActionTrade=53;
const int cActionGuard=54;
const int cActionAutoMover=55;
const int cActionGetOnMover=56;
const int cActionSwallow=57;
const int cActionGate=58;
const int cActionLightningAttack=59;
const int cActionExplore=60;
const int cActionEat=61;
const int cActionBoost=62;
const int cActionCorpseDecay=63;
const int cActionTeleport=64;
const int cActionBuckAttack=65;
const int cActionTownBell=66;
const int cActionHeroDeath=67;
const int cActionUnbuild=68;
const int cActionAutoLOS=69;


For "fighting" you can put in the following actions:
6 is Hand Attack
12 is ranged attack
18 is Attack

But you can use the trigger for other things as well, such as Idle, Thrown, Freeze, ChargedRangedAttack.
posted 21 December 2008 10:03 PM EDT (US)     2410 / 2502  
All right, thanks. I'm not one for memorizing all the ideas, so I'll just get his trigger pack.

Thank you.

Aww, can't use images here, guess I'll have to use some random text stuff. Uhh... How about "You're too slow!" ~Sonic or, umm... IT'S OVER 9000!!
~Click here if I've beaten you in Brawl~
posted 22 December 2008 01:00 AM EDT (US)     2411 / 2502  
posted 23 December 2008 10:34 AM EDT (US)     2412 / 2502  
Unit Patrol would be very useful.

EDIT: also, someone gave me restart game some time ago, but I don't know how to paste it effectively into my trigger file and get it to work, as all they gave me was the xs code.


░█▀▀ ░█▀█ ░█ ░█▀▀ ░
░█▀▀ ░█▀▀ ░█ ░█ ░░░
░▀▀▀ ░▀ ░░░▀ ░▀▀▀ ░

[This message has been edited by Bingo Little (edited 12-23-2008 @ 10:37 AM).]

posted 23 December 2008 08:27 PM EDT (US)     2413 / 2502  
Is it possible for someone to make a "Modify Unit" trigger? Being the same as "Modify Protounit" only i can modify select units instead of all of that kind, for example if I was making a campaign but didnt have any new unit mods and changed the name of unit like a hoplite and wanted it to have custom HP and Attack etc, would someone be able to make that trigger? Also could someone make a trigger like "Army Wander" or something so i can make some gaia units that arent animals be able to wander freely like the animals would?
posted 24 December 2008 09:13 AM EDT (US)     2414 / 2502  
@Bingo:

restartCurrentGame();


If that doesn't work, try this (with the trigger loader):

enterEditorMode();
restartCurrentGame();
leaveEditorMode();


@Endarron:
1) Not possible
2) Hmm... interesting. I'll have to think about it. Should be possible. Do you have any parameters in mind? Like wander radius, move interval etc.?

If we knew what it was we were doing, it would not be called research, would it? - Einstein, A.
Master XS - AoM Code Reference - Trigger Loader - Trigger Requests - Chess

Wow, I never thought that I would actually know something before nottud did... it's actually not all that satisfying ~ Steak
posted 24 December 2008 09:16 AM EDT (US)     2415 / 2502  
There is no modify unit 'trigger'. Modify protounit modifies the centralized definition of that protounit for the given player and all units of that protounit/player use the that same centralized definition, meaning you change it for one, say, Anubite player 1, you change it for ALL anubites, player 1.

As for wandering, you might want to do something strange like create a good wandering gaia unit like a deer, shrink it down so it can't easily be seen, then create a looping trigger (check Loop) set to move to unit that makes your army/units move to the deer unit every X seconds (condition=timer 2 seconds).

I could also make an effect for you that could move your army to a random point. It could use the current position as a starting point and you could specify a random range (i.e. range 5 = up to + - 5 squares X or Y as the new point), though they would probably look drunk walking around randomly.

In all your science of the mind, seeking blind through flesh and bone
Find the blood inside this stone
Well, I know I've never shown what I feel, I've always known
I plan my vengeance on my own - and I was always alone
posted 24 December 2008 11:00 AM EDT (US)     2416 / 2502  
This is a little bit of a joke but for wondering you could use the attach trigger and attach the animal to a unit that wonders the map. The only problems is that it would look and act silly. E.g. if you attached it to a bird then the unit would fly around the map rather than walk!

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.
posted 24 December 2008 11:06 AM EDT (US)     2417 / 2502  
okay, what is this trigger loader? where do I paste the game restart bit: trigger file or the xs code trigger?

Thanks for all your help, guys.


░█▀▀ ░█▀█ ░█ ░█▀▀ ░
░█▀▀ ░█▀▀ ░█ ░█ ░░░
░▀▀▀ ░▀ ░░░▀ ░▀▀▀ ░
posted 24 December 2008 01:29 PM EDT (US)     2418 / 2502  
You could put it in the XS User code and that would work fine, but here is how you'd make it a trigger to go in your typetest.xml
You just need Effect and Command tags, since there are no parameters.
<Effect name="Restart Game">
<Command>restartCurrentGame();</Command>
</Effect>
When I make wandering units, I usually make about 4 or 5 looping triggers with "move to point" each to a different point. I put different timer conditions on each of them, maybe something like 7, 11, 25, 41.

Every time a trigger fires, the unit moves, and although it will only be moving between 4 or 5 points, it will always be at a different spot when the next move starts, and they will happen in a different order, so you won't see much (if any) repitition in the movement. It's not perfectly random, but usually you can't tell the difference.
posted 24 December 2008 01:33 PM EDT (US)     2419 / 2502  
Yah i didnt think "Modify Unit" was possible because if it was it would already be there.

Ill try a bunch of things for the "Army Wander" effect...
posted 27 December 2008 01:01 PM EDT (US)     2420 / 2502  
Name: Invoke Godpower At Unit (Area)
Type: Effect
Description: I'm looking for a trigger which can invoke godpowers - such as Tremor - at a unit. I know that "Invoke Godpower At Unit" already exists, but this effect can't invoke godpowers like Tremor at a unit. "Invoke Godpower At Unit (Area)" should be able to invoke those kind of godpowers at a unit which actually require area selection.

Name: Clear Chat History of Player
Type: Effect
Description: This effect is exactly like "Clear Chat History", but "Clear Chat History of Player" should only clear the chat of a certain player.

Name: Toggle Boss Music
Type: Effect
Description: This effect should randomly choose one of the 6 fight music files (Age of Mythology > Sound > Music > Fight) and then play the sound. "Toggle Boss Music" will randomly choose a new (fight) sound whenever the previous sound has come to an end.

Name: Loop Effect (Timer)
Type: Effect
Description: This effect would be very usefull if anyone could make it. It will refire the trigger every X seconds.
Here's an example:

Trigger 1
Active [X] Run Immediately [ ] Loop [ ]
Condition: God Power Active
Power: Rain
Player: 1

Effect: Quest Var Randomize
Var Name: b1
Min value: 1
Max value: 2
Effect 1: Conditional Quest Var Check
Var name: b1
Operator: ==
Value: 1
Effect 2: Modify Protounit
Ajax, Player 1, Hitpoints, +1000
Effect 3: Conditional zEND
Effect 4: Conditional Quest Var Check
Var name: b1
Operator: ==
Value: 2
Effect 5: Modify Protounit
Ajax, Player 1, Hand attack hack, +100
Effect 6: Message
Text: Random Event!
Effect 7: Loop Effect Timer
Time: 20 seconds
---
This is how the trigger works: First of all, it checks if player 1 invokes the Rain Godpower. Secondly, it checks if "b1" is equal to 1. If so, then ajax' hitpoints will be increased by 1000. If "b1" is equal to 2, then ajax' attack will be increased by 100. The message will appear when the Rain godpower is active. "Loop effect timer" will also be fired when the Rain godpower is active. This effect will refire the whole trigger after 20 seconds.

Name: Chat Contains X
Type: Condition
Description: This is like the original "Chat Contains", but "Chat Contains X" only checks if a player has typed something. So it doesn't check specific word combinations, but it only checks IF a player types something. So the effects will be fired whenever the player types something (he/she could be typing "hi" "stop" ... etc.) I think I have made it clear enough

I hope you guys can make those triggers

What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey.
Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers.
Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%]

[This message has been edited by Lewonas (edited 12-27-2008 @ 01:09 PM).]

posted 27 December 2008 02:44 PM EDT (US)     2421 / 2502  
Name: Invoke Godpower At Unit (Area)
I have an Invoke GodPower At Unit (which I think came from a pftq trigger pack), which works with area GPs like lightning storm or earthquake, and I don't think tremor would be any different.
Toggle Boss Music
Does Music Mood/Music Play do this? I'm not sure what number to use exactly for the Mood, but I know there is a mood for mellow music and a mood for fight music (probably 0 and 1, or 1 and 2)
Name: Loop Effect (Timer)
The simplest way is to make a looping trigger with a timer.

If you download invent00r's Proactive Trigger pack, there is an effect called "XS Trigger Loop", and one called "End If/Loop"

If you put those two effects into a trigger, all of the effects inbetween them will be looped. You can set the looping time in the XS Trigger Loop effect.
So if you have

Message
XS Trigger Loop - 20 seconds
Grant Resources - 200 food
End If/Loop

It will send the message, and then grant the 200 food every 20 seconds.
posted 27 December 2008 02:52 PM EDT (US)     2422 / 2502  
Quoted from HailToTheOboe:
Message
XS Trigger Loop - 20 seconds
Grant Resources - 200 food
End If/Loop
No.. The XS Trigger loop needs to be the very last effect inside that trigger, so it doesn't require a End If/Loop..
This works as a trigger looping with a timer, except you can fire it right away (with the condition always), then loop after X seconds.

Using this effect will always reduce lagg.
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.

[This message has been edited by invent00r (edited 12-27-2008 @ 02:53 PM).]

posted 27 December 2008 04:20 PM EDT (US)     2423 / 2502  
posted 28 December 2008 07:59 AM EDT (US)     2424 / 2502  
I have an Invoke GodPower At Unit (which I think came from a pftq trigger pack), which works with area GPs like lightning storm or earthquake, and I don't think tremor would be any different.
Unfortunately, tremor doesn't get invoked with that effect. I've tried the effects "XS Invoke Godpower At / Near unit", Invoke godpower at / near unit" and "Invoke Godpower"... but none of them can invoke tremor at a unit.
Does Music Mood/Music Play do this? I'm not sure what number to use exactly for the Mood, but I know there is a mood for mellow music and a mood for fight music (probably 0 and 1, or 1 and 2)
No, AFAIK Music Mood and Music Play don't play battle theme music.
This works as a trigger looping with a timer, except you can fire it right away (with the condition always), then loop after X seconds.
I already knew about that effect, however, the effect only loops all of the other effects inside a trigger because the condition has to be set as "Always". I'm actually looking for a effect which loops the whole trigger and which can also loop any condition (like "Godpower Active").

By the way, are "Chat Contains X" and "Clear Chat History of Player" possible to make? :S

What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey.
Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers.
Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%]

[This message has been edited by Lewonas (edited 12-28-2008 @ 08:00 AM).]

posted 28 December 2008 09:50 AM EDT (US)     2425 / 2502  
It doesn't have to have the condition always... But once XS Trigger Loop kicks in, the whole trigger will loop each X seconds.

X is 20 secs for example. The trigger will fire again at 20 secs, and the condition is false. Althogh it so happens the condition has been met at 5 secs later... The trigger will only fire 15 secs later.

I can only think to set the condition to always, and using conditional effects. If you're condition isn't met, then use XS Triger Loop to 1 sec.
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
« Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 60 ··· 70 ··· 80 ··· 90 ··· 95 96 97 98 99  Next Page »
Age of Mythology Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames