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

Scenario Design
Moderated by Yeebaagooon, TAG, nottud

Hop to:    
Welcome! You are not logged in. Please Login or Register.13 replies
Age of Mythology Heaven » Forums » Scenario Design » I need some trigger creation help
Bottom
Topic Subject:I need some trigger creation help
superadamwo
Mortal
posted 07 October 2005 06:38 PM EDT (US)         
I was wondering if someone could give me the code to put a new trigger in the game called "Move to point by name" which would make it so that you type in the name of a unit (i.e. anubite) and you pick the player (i.e. player 1), and it makes it so al the anubites on the map that belong to player 1 would move to the area you picked. I tried making one myself but it didn't work. Thanks!

p.s. here is the code that I made which doesn't work:
<Effect name="MOVE To Point By Name">
<Param name="Player" dispName="$$22301$$Player" VarType="player">1</Param>
<Param name="SrcObject" dispName="$$22295$$Source Units"

varType="string">default</Param>
<Param name="DstPoint" dispName="$$22296$$Target Area" varType="area">default</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Param name="AttackMove" dispName="$$22416$$Attack Move"

varType="bool">false</Param>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command>
<Command>trUnitMoveToPoint("%DstObject%",%EventID%, %AttackMove%);</Command>
</Effect>
Please ignore the big gaps. I didn't put those in. Aomh did for some reason.
Thanks for the help!


People who do not learn from past mistakes are doomed to repeat them fail history class

[This message has been edited by superadamwo (edited 10-09-2005 @ 08:23 AM).]

AuthorReplies:
superadamwo
Mortal
posted 09 October 2005 08:24 AM EDT (US)     1 / 13       
Aww,come on....isn't anyone gonna help?

People who do not learn from past mistakes are doomed to repeat them fail history class

[This message has been edited by superadamwo (edited 10-11-2005 @ 04:10 PM).]

superadamwo
Mortal
posted 13 October 2005 09:13 PM EDT (US)     2 / 13       
DOES NO ONE KNOW ABOUT TRIGGERS? Mods plz don't close this yet I want at least one person to try and help me....

People who do not learn from past mistakes are doomed to repeat them fail history class
Anastasoulis
Mortal
posted 14 October 2005 02:35 AM EDT (US)     3 / 13       
superadamwo, hi.

I have nil experience in making triggers, but perhaps you could use a trigger from Reyk's great work of snxt pack.
Otherwise, go to: http://wiki.heavengames.com/age/index.php/AoM_Modding the wiki site, the moding section and check out their stuff there for how to make new triggers.
If you don't find it, ask me and I'll send you the saved web page I have saved in my computer.

regards


the Elder
"imagination is more important than knowledge."
Albert Einstein
superadamwo
Mortal
posted 14 October 2005 03:15 PM EDT (US)     4 / 13       
Well thanks for trying anyway but I:
1) know how to make triggers
2)I have aom vanilla so I can't use snxt, but I do have snt4.
Well thanks for helping anyway

People who do not learn from past mistakes are doomed to repeat them fail history class
Anastasoulis
Mortal
posted 15 October 2005 03:04 AM EDT (US)     5 / 13       
sorry I couldn't help more superadamwo.
It's my intention to learn more about this stuff, but in the future...

regards


the Elder
"imagination is more important than knowledge."
Albert Einstein
superadamwo
Mortal
posted 25 October 2005 03:59 PM EDT (US)     6 / 13       
it's ok

People who do not learn from past mistakes are doomed to repeat them fail history class
CodeLabMaster
Mortal
posted 25 October 2005 05:29 PM EDT (US)     7 / 13       
You made a few errors in your code that prevent it from working. You are trying to select units when they are already selected and junk like that. Why do you even have the play param there? Never the less...

<Effect name="Move to Unit by Name"><!--CLMWAZHERE-->
<Param name="SrcObject" dispName="$$20509$$Name" varType="string">default</Param>
<Param name="DstObject" dispName="$$22296$$Target Unit" varType="unit">default</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Param name="AttackMove" dispName="$$22416$$Attack Move" varType="bool">false</Param>
<Command>trUnitSelectClear();</Command>
<Command>trUnitSelect("%SrcObject%");</Command>
<Command>trUnitMoveToUnit("%DstObject%",%EventID%, %AttackMove%);</Command>
</Effect>

Even though I haven't tested this, it should work like a charm for ya. Good Luck.

"War does not determine who is right, only who is left." - Bertrand Russell
"Things are more like they are now than they ever were before."
- Dwight D. Eisenhower
Xdaamno
Mortal
posted 25 October 2005 05:54 PM EDT (US)     8 / 13       
There's a code I've ALWAYS wanted. My scenarios are very different from other designers since I usually a younger mind. Could you possibly make a QV grant resources?

The fields:

QV Name: (Anything)

Player to affect resources: (0-12)

Modifier: (+,-,=, maybe a few others. Equals being setting the resources to that QV)

Resource Type: (Gold, Wood, Food, Favor, maybe Pop Limit/Standing?)


I'm not sure if that's all the fields you need, but...

EDIT: And without a CLM WAZ HERE embedded in CPU-unreadable tags, plz:P

[This message has been edited by Xdaamno (edited 10-25-2005 @ 05:54 PM).]

CodeLabMaster
Mortal
posted 25 October 2005 06:04 PM EDT (US)     9 / 13       
Do you want me to make a trigger that makes a certain resource equal to a QV or have a QV amount added to it.

EXAMPLE. You have 400 food. QV1 is equal to 600. Will you have 600 Food after using this effect, or will you have 1000 (400+600)?


"War does not determine who is right, only who is left." - Bertrand Russell
"Things are more like they are now than they ever were before."
- Dwight D. Eisenhower
Unome
Mortal
posted 26 October 2005 08:59 PM EDT (US)     10 / 13       
OK I think you are confusing yourself.

Step 1: Place all anubites in map into 1 army
Step 2: Create Trigger
Step 3: Conditions: "anubite" in chat dialoge(can't remember condition name but there is one that if that word is typed in dialect it will trigger effect)
Step 4: Effect Army move to point

Step 5: HAVE FUN

I hope this is what you meant srry bout the condition I placed kind of vague but it does exist. Check out my problem at the TERRAIN BUG THREAD I'm pulling my hair out over it good luck.


[SL_Unome]|---|---|---|---|----------------
[ Proud Leader of Phoenix Studios | AOM | AOE3 | ROL ]
"To be good requires to follow the rubric, to be the best is to give yourself no limitations"
Xdaamno
Mortal
posted 28 October 2005 07:33 AM EDT (US)     11 / 13       
Code. My intention was (Which is probably impossible) That you could have either, the = sign making the resource equal the QV and the + sign making the QV add to the resource.

If you can only do one I'd rather it be the latter.

CodeLabMaster
Mortal
posted 01 November 2005 10:53 PM EDT (US)     12 / 13       
Get sick and be called notorious? I like it! With an effect this fun, there can only be one...


<Effect name="Grant Tricky Resources">
<Param name="PlayerID" dispName="$$22301$$Player" varType="player">1</Param>
<Param name="ResName" dispName="$$22455$$Resource" varType="resource">food</Param>
<Param name="QVName" dispName="Amount QV" VarType="string">QV1</Param>
<Param name="Oper" dispName="Action Operator" VarType="string">+</Param>
<Command>if("%Oper%"=="+"){</Command>
<Command>trPlayerGrantResources(%PlayerID%,"%ResName%",trQuestVarGet("%QVName%"));}</Command>
<Command>if("%Oper%"=="="){</Command>
<Command>trPlayerGrantResources(%PlayerID%,"%ResName%",0-trPlayerResourceCount(%PlayerID%,"%ResName%"));</Command>
<Command>trPlayerGrantResources(%PlayerID%,"%ResName%",trQuestVarGet("%QVName%"));}</Command>
</Effect>

I haven't tested it, but it should work like a charm.


"War does not determine who is right, only who is left." - Bertrand Russell
"Things are more like they are now than they ever were before."
- Dwight D. Eisenhower
Xdaamno
Mortal
posted 02 November 2005 03:31 AM EDT (US)     13 / 13       
W00t Nice one. You pwn, dude

I'll add that right away... to my... trigger... thing:P

Oh, darn it

EDIT: Tested, it works perfectly. Thanks for the help

[This message has been edited by Xdaamno (edited 11-02-2005 @ 11:08 AM).]

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

Hop to:    

Age of Mythology Heaven | HeavenGames