Welcome! Please Login or Register!
April 24, 2024, 05:47:34 AM
Home Login Register
pftq Forums  |  Game Design  |  Age of Mythology  |  Triggers 0 Members and 1 Guest are viewing this topic. « previous next »
Latest News!Lunar Trigger(Aug 27, 2023)
Pages: [1] Print
Author Topic: Triggers  (Read 8644 times)
LuCkyMaN
Member
*****
Offline Offline

Posts: 7

« on: May 16, 2007, 11:57:58 AM »


Hey, I know you say your not a professional programmer but you are very good. How did you learn about kb commands + others. Anyways I'm  designer at aomh and I was wondering if these conditions or effects were possible. Many of my maps near done can't be finished because lack fo certain triggers.

Conditions

Important
-Army distance to protounit.(Extremely useful for my survival map,picking up sticks/going near fire,etc)
-Army Hp Percent.(Needed For Headhunter 2)
-Player killed unit.(Great for rewarding kills against bosses)
-Player killed protounit.
-Army distance to army.(Useful if you want some crazy effects to happen when units are fighting in bloods and other kinds of maps where the units don't already exist on map.

Not as important
-Unit distance to protounit.
-Protounit distance to protounit.



Effects
-Set Player Camera Cut.(A camera cut that you can set for each player individually)

-Set Player Camera Cut to Army.(Useful for headhunter 2)

Is there a way you could make it so the camera rotation changes when a unit changes which way its looking?(Doubtful but who knows,This effect isn't all that important it would be cool though.)

Army Deploy near army(usefull in collaboration with army distance to army.
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #1 on: May 19, 2007, 12:34:22 PM »

The only ones I'm doubtful on are the camera cut for each player and the heading (rotation).

Most the effects you listed are possible and in fact, IIRC are in my Advanced Triggers Set.

I've created essential effects for making your own kb triggers as well, so if you don't see the extact trigger effect/condition you need, you can stack several "building block" effects to make it.

Example: Army Distance to Protounit

1) QV Set Army Unit OBJECT ID - grabs a unit from your army and saves its ID
2) QV Set Distance to Unit - Use the object id from above as one end, and the other object for the other.
3) Check your QV as distance Wink


About how I learned kb commands... I have a detailed summary in the Readme, but I basically had to go through all of TwentyOneScores old posts (which were very few; he kept to himself mostly) and his maps, virtually deciphering what he was doing.  At one point, people knew how to use them, but once he left, kb commands seemed to die out.
Logged
LuCkyMaN
Member
*****
Offline Offline

Posts: 7

« Reply #2 on: May 20, 2007, 11:17:54 PM »

I'm trying to make the trigger Army deploy at protounit. I'm horrible at this but:

<Effect name="Army Deploy Near Protounit">
      <Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
     <Param name="ProtoName1" dispName="$$22434$$ProtoName1" varType="protounit">Villager</Param>
     <Param name="ProtoName2" dispName="$$22434$$ProtoName2" varType="protounit">Villager</Param>
     <Param name="Location" dispName="" varType="area">0,0,0</Param>
     <Param name="Count"  dispName="$$22435$$Count" varType="long">0</Param>
     <Param name="Heading"  dispName="$$22432$$Heading" varType="long">0</Param>
     <Param name="Clear" dispName="$$22464$$Clear Existing Units:" varType="bool">true</Param>
     <Command>trArmyDispatch("%SrcArmy%", "%ProtoName1%", %Count%, %Location%, %Heading%, %Clear%);</Command>
   </Effect>

I know it's not right and probably not that close. What would I have to do to get this to work.
My idea in this is to army deploy near every protounit ) on the map.

I'm guessing that somehow I must store the all the protounits locations and somehow tie it in with army deploy. Thanks alot. I'll keep looking through your triggers. I'm slowly understanding it
. Still haveing a bunch of trouble though.
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #3 on: May 21, 2007, 12:58:47 AM »

The command line does all the work.  Having the field for protounit does nothing to the effect (just a useless slot).

The effect you want to do cannot be done in one command.

1) Use kbquery database to find a protounit (save as QV)
2) In the loop through every result, use the Army Deploy
3) Use the location of the result as the Army Deploy spot
Logged
LuCkyMaN
Member
*****
Offline Offline

Posts: 7

« Reply #4 on: May 21, 2007, 03:11:17 PM »

So, Would this trigger use 3 commands, since you have 3 steps?
I cant find kbquery datatbase. I found kbunitquerycreate and a few others. Is this it?
What triggers should I be looking at. I'm mainly focused on army deploy near unit.
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #5 on: May 21, 2007, 05:48:29 PM »

kb queries are a series of commands, consisting of over 10 lines.  Look at, for example, "Teleport in Area" in the Advanced Triggers Set.
Logged
LuCkyMaN
Member
*****
Offline Offline

Posts: 7

« Reply #6 on: May 21, 2007, 08:14:16 PM »

Would these commands be involved in the process of making this trigger?
My friend gave me a list of all the commands.

bool kbUnitQuerySetArmyID( long queryID, int armyID ): Sets query data.
int kbUnitQueryCreate( string name ): Creates a unit query, returns the query ID.
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #7 on: May 21, 2007, 08:26:29 PM »

Take a look at the Teleport in Area trigger.  The trigger you want to make would contain similar commands as that (for searching the unit).  Your deploy would be placed instead of the Teleport.

The two you named appear to be randomly pulled out of the list Tongue

The Unit Query Create is essential to just about any unit query (it creates it).

The Set Army ID is more or less completely irrelevant.
Logged
LuCkyMaN
Member
*****
Offline Offline

Posts: 7

« Reply #8 on: May 23, 2007, 09:03:48 PM »

What do random letters and words like zeep do?
Is this the trigger?
"Teleport Units in Area (Center Unit)"
Thanks for all your help. I would have no chance of making this without you. Might not even have a chance with your help lol.
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #9 on: May 26, 2007, 01:42:28 PM »

Yes that's the trigger.  The random letters and words are called variables.  They are the same as those from Algebra.  I could call them variable1 or cat or superman, but zeep is just simpler. :p
Logged
LuCkyMaN
Member
*****
Offline Offline

Posts: 7

« Reply #10 on: May 26, 2007, 09:54:36 PM »

Yeh I figured it was a variable.
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #11 on: May 27, 2007, 12:03:52 PM »

Basically look at how the kb commands were done in Convert/Teleport in Area.  The whole concept is to find the ID of a unit you are searching for and plug it into any common day effect.
Logged
Khan And Steak
Member
*****
Offline Offline

Posts: 2

« Reply #12 on: January 08, 2009, 08:31:49 AM »

I was going to reply, then I saw
"Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic."

So then I was going to start a new topic, but what I want to say doesn't require a whole new topic. So here I am replying. Anyway, what I wanted to say was: the avatar you use here, you should also use at AoMH/AoE3H.

I'm pretty surprised you have such a set up website. I came across this site when I was looking for a trigger "Army Distance To Army" that didn't cause a trigger bug, and I remembered that you made an Advanced Trigger Set utility. I didn't know you have so much experience in so many games! Anyway I hope this isn't considered spamming, or I could be in a lot of trouble. That's all I wanted to say.

Cheers, Steak
« Last Edit: January 08, 2009, 08:37:43 AM by Khan And Steak » Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #13 on: January 08, 2009, 05:32:54 PM »

No that's fine - thanks for the comment. Smiley

Age of Mythology did teach me a lot though.
Logged
Pages: [1] Print 
pftq Forums  |  Game Design  |  Age of Mythology  |  Triggers « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines | RSS Feed Valid XHTML 1.0! Valid CSS!
Page created in 0.108 seconds with 21 queries.