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

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Guide: ACTION COMMANDS
posted 05 September 2006 03:43 PM EDT (US)   
Welcome to this guide about Action Commands (from here on called AC's). AC is the name for a new feature for my scenario, in which you use the game's "Find" hotkeys in combination with the "unit selected" condition, to form a button press system, which allows the players to press the buttons for special bonuses, including, but not limited to: Healing, speed boosts and stronger GPs.

There is only one real drawback: The "Find" hotkeys draw the screen so it located the found unit in the middle of the screen. This means you need a looping trigger to keep your hero in the middle, this means that you can only have 1 main hero at a time, you can however have sidekicks following the main hero, and you can have trigger set-ups allowing you to switch heroes.

In this example you need to alter 2 “Find” hotkeys: I suggest you put Find Granary to A and Mining Camp to S (keep in mind that some buildings are called different). I you want to use more hotkeys, I suggest you but the Lumber Camp to D and the Obelisk (see Outpost in the hotkey list) to F. These are just suggestion of course, use any keys that you like.

For what I will show now you need the following triggers in your typetest.xml, just open it with notepad and copy it in. The first one was given to me by Archaeopterix, the second was made by Phoenixx86 and the last was part of Reyk’s new triggers.

<Effect name="QV Modify Protounit">
<Param name="ProtoUnit" dispName="$$22449$$ProtoUnit" varType="protounit">Villager</Param>
<Param name="PlayerID" dispName="$$22301$$Player" VarType="player">0</Param>
<Param name="Field" dispName="$$23943$$Field" varType="pufield">0</Param>
<Param name="Delta" dispName="$$23944$$Delta" varType="string">1.0</Param>
<Command>trModifyProtounit("%ProtoUnit%", %PlayerID%, %Field%, trQuestVarGet("Þlta%"));</Command>
</Effect>

<Effect name="QV Grant Resources">
<Param dispName="$$22301$$Player" name="PlayerID" varType="player">0</Param>
<Param dispName="$$22455$$Resource" name="ResName" varType="resource">food</Param>
<Param VarType="string" dispName="$$23952$$Var Name" name="QVName">QV1</Param>
<Command>trPlayerGrantResources(%PlayerID%, "%ResName%", trQuestVarGet("%QVName%"));</Command>
</Effect>

<Effect name="CAMERA Cut Object (ID)">
<Param name="ScenName" dispName="ID" varType="string">0</Param>
<Command>uiLookAtUnit(%ScenName%);</Command>
</Effect>

Now on to the real triggers, in this example, we will modify a Carnivora:

In the start the carnivora will use it’s special attack (in which it kills a unit instantly) every 150 seconds, but you have to press A and S in turns, and for each correct hit, the time till the recharge drops with 1 second. The bad part is that the Carnivora dies after 30 seconds, meaning it won’t have much time to kill your enemies. These numbers are examples, I suggest you pick lower numbers so you can actually micro your hero to: It is all about finding a balance: These god powers are most likely something special in your scenario, you won’t use them that often, and if they only last 5 seconds, you really kill fun, but if I takes 1 minute, the focus on god powers is to heavy.

Note: the parts in italics are not needed to make everything work, they just add something extra.

Trigger A001 active, run immediately.
Condition:
Always
Effects:
Modify Protounit: Granary –9 LOS
Modify Protounit: Mining Camp –9 LOS
(In case you also have the D and F keys mapped, do this for the Obelisk and Lumber Camp too, this to prevent the player from finding the buildings, so he/she can select them all, it makes them invisible on the minimap).
Change Name: Change the name of the Granary to A, the Mining Camp to S, etc. (This is so it is easier to remember to which building is what hotkey).

Modify Protounit: Audrey (Protoname of the Carnivora): Recharge time +138.0 (since the base time is 12 seconds)
Modify Protounit: Audrey Water: Recharge time +138.0
Set Tech Status: Husbandry: Unobtainable
Set Tech Status: Hunting Dogs: Unobtainable
Set Tech Status: Pickaxe: Unobtainable (this to prevent the player from accidently researching the technologies).
You can also make the buildings have unlimited heatlh, but I suggest you put them in a small corner, where nobody can attack them anyway.

Trigger A002 active, loop.
Condition:
Always
Effect:
Camera Cut Object: Let it focus on your main hero. (Else you will switch to the buildings if you press a hotkey).

Trigger B001 active.
Condition:
God power active: Audrey
Timer: 3 seconds (The timer is needed because else it could fire twice)
Effects:
Counter:Add Timer: 30 seconds (So the player can see how long it takes before the Carnivora dies)
Fire Event: B002
Fire Event: B004
Fire Event: B006

Trigger B002
Condition:
Unit selected: Granary
Effects:
Fire Event: B003
Modify Protounit: Audrey, Recharge time –1.0
Modify Protounit: Audrey Water, Recharge time –1.0
Quest Var Modify: QVname +1 (This will be used later on)

Trigger B003
Condition:
Unit selected: Mining Camp
Effects:
Fire Event: B002
Modify Protounit: Audrey, Recharge time –1.0
Modify Protounit: Audrey Water, Recharge time –1.0
Quest Var Modify: QVname +1

Trigger B004 (this one is to prevent players from selecting both buildings, what some people will do)
Condition:
Unit selected: Granary
Unit selected: Mining Camp
Effects:
Fire Event: B005
Modify Protounit: Audrey –1000 HP
Modify Protounit: Audrey Water –1000 HP (now they don’t have health left, and die)

Trigger B005
Condition:
Always
Effects:
Modify Protounit: Audrey +1000 HP
Modify Protounit: Audrey Water +1000 HP (So the player can cast it again, else they will die right away)

Trigger B006
Condition:
Timer: 30 seconds
Effects:
Disable Trigger: B002
Disable Trigger: B003 (If you don't do this, the player is able to use it to make carnivora stronger before they cast the second one)
Fire Event: B001
Fire Event: B007
Modify Protounit: Audrey –1000 HP
Modify Protounit: Audrey Water –1000 HP (now they don’t have health left, and die)
QV Grant Resources: QVname, Food, to player 3
Send Chat: You had "+trPlayerResourceCount(3,"Food")+" hits on your keyboard.
(This is thanks to Phoenixx86)
QV Modify Protounit: Audrey, recharge time, +QVname
QV Modify Protounit: Audrey Water, recharge time, +QVname (This will add the number of hits to the audrey recharge time, resetting it)

Trigger B007
Condition:
Always
Effects:
Modify Protounit: Audrey +1000 HP
Modify Protounit: Audrey Water +1000 HP (So the player can cast it again, else they will die right away)
Grant Resources: -999999999999 Food for player 3 (to reset the keyboard hit counter)
Quest Var Set: QVname == 0 (to reset the hit counter from the QV modify protounit)
Fire Event: B008

Trigger B008 active. (This one is just a fun extra, showing that you got the best possible score).
Condition:
Quest Var Check: QVname >= 150
Effect:
Overlay Text: Perfect!

Hotkey Lock: Sometimes, hotkeys stop working for an unknown reason, you can just open up the hotkey editor and click ok again, I advice you tell that to the player to.

I hope you found this useful, or at least interesting, and that you are now I aware that I am making a scenario (since the main focus of the article is hyping of course). I will post more of these moves containing action commands soon.

Best regards,
Paperfriend


Yes, periods and smileys are the same for me
No matter what you say

[This message has been edited by Paperfriend (edited 09-22-2006 @ 11:26 AM).]

Replies:
posted 05 September 2006 04:02 PM EDT (US)     1 / 16  
Paperfriend is so smart.


█▄ █▄█ ▄█▀ ▀█▀
I too always thought "blog" would sound less silly as the years went by.
Mozzarella Man Cheddar Chap, Brie Bloke, Gorgonzola Guy, Feta Fellow, Wensleydale Warrior, Edam Emperor, Parmesan Priest,
Munster Mate, Asiago Associate, Provolone Player, Havarti Hunk, Romano Rabbi, Swiss Soldier, Limburger Lass, Gouda Gentleman
posted 05 September 2006 04:03 PM EDT (US)     2 / 16  
You still need to tell me that? Or do you just want to be in my sig?

Yes, periods and smileys are the same for me
No matter what you say
posted 05 September 2006 04:07 PM EDT (US)     3 / 16  
Niether, I don't no a thing about designing.


█▄ █▄█ ▄█▀ ▀█▀
I too always thought "blog" would sound less silly as the years went by.
Mozzarella Man Cheddar Chap, Brie Bloke, Gorgonzola Guy, Feta Fellow, Wensleydale Warrior, Edam Emperor, Parmesan Priest,
Munster Mate, Asiago Associate, Provolone Player, Havarti Hunk, Romano Rabbi, Swiss Soldier, Limburger Lass, Gouda Gentleman
posted 05 September 2006 04:11 PM EDT (US)     4 / 16  
>_< I write half a book and get a reply from somebody who doesn't understand it.

Yes, periods and smileys are the same for me
No matter what you say
posted 05 September 2006 04:13 PM EDT (US)     5 / 16  
That's life for ya.


█▄ █▄█ ▄█▀ ▀█▀
I too always thought "blog" would sound less silly as the years went by.
Mozzarella Man Cheddar Chap, Brie Bloke, Gorgonzola Guy, Feta Fellow, Wensleydale Warrior, Edam Emperor, Parmesan Priest,
Munster Mate, Asiago Associate, Provolone Player, Havarti Hunk, Romano Rabbi, Swiss Soldier, Limburger Lass, Gouda Gentleman
posted 05 September 2006 04:28 PM EDT (US)     6 / 16  
Well, half a book, half a book... It's some triggers written out

Very cool.

posted 05 September 2006 10:56 PM EDT (US)     7 / 16  
If this is half a book, then I wish my books in school were that long.

Anyway, nice guide!


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 06 September 2006 01:29 AM EDT (US)     8 / 16  
I still have some more of these godpowers contains ACs, who aren't posted yet, and will be posted once I am closer to release of my scenario. It will be half a book.

Yes, periods and smileys are the same for me
No matter what you say
posted 06 September 2006 03:37 AM EDT (US)     9 / 16  
This is an interesting idea paperfriend =)
Could open up AOM to some new possibilities.. For some reason it makes me think of making a point and click game, where you click stuff to make certain things happen.

-[Hello..
posted 06 September 2006 08:42 AM EDT (US)     10 / 16  
It indeed opens up a lot of new functions, I am currently working with restoration, so it doesn't heal you, but instead you have to hit the letters that appear on the screen, for each hit your recover a few HP.

Yes, periods and smileys are the same for me
No matter what you say
posted 22 September 2006 04:18 AM EDT (US)     11 / 16  
Couldn't you mae it so it only camera cuts when the trigger activates. Not have it on loop. This will allow you to have more than 1 hero.

Oh and does this work online without a sync error?


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.

[This message has been edited by nottud (edited 09-22-2006 @ 04:19 AM).]

posted 22 September 2006 06:50 AM EDT (US)     12 / 16  
It uses Unit Selected which doesn't specify a player - so that might cause problems.
posted 22 September 2006 09:29 AM EDT (US)     13 / 16  

Quote:

Couldn't you mae it so it only camera cuts when the trigger activates. Not have it on loop. This will allow you to have more than 1 hero.


Never tried it, but I think players would get sea-sick , I will see if it works.

Yes, periods and smileys are the same for me
No matter what you say

[This message has been edited by Paperfriend (edited 09-22-2006 @ 09:30 AM).]

posted 22 September 2006 11:12 AM EDT (US)     14 / 16  
Nice, but you need to say strate away at the top of the first paragraph: "AC's are when you press a button on your keyboard and something happens!"

MEPH
[Insert amazingly witty signature here.]

Me and Yeebaagooon's scenarios | Download The Corruptor
posted 22 September 2006 11:24 AM EDT (US)     15 / 16  
I won't, you will have to read it for finding out what it is about, I don't want lazy people to use it.

Yes, periods and smileys are the same for me
No matter what you say
posted 23 September 2006 03:19 AM EDT (US)     16 / 16  
Yes:unit selected will cause a sync error unless you use it to play sounds or display messages.

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.

[This message has been edited by nottud (edited 09-23-2006 @ 03:20 AM).]

Age of Mythology Heaven » Forums » Scenario Design » Guide: ACTION COMMANDS
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames