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

Scenario Design
Moderated by MosheLevi, Mister SCP

Hop to:    
Welcome! You are not logged in. Please Login or Register.4 replies
Age of Empires III Heaven » Forums » Scenario Design » No Unit Regrouping/ No allieds' LOS/ Cool effects
Bottom
Topic Subject:No Unit Regrouping/ No allieds' LOS/ Cool effects
Gaurdian_112
Banned
posted 12-10-05 02:12 PM EDT (US)         
This is from our old pal AoMPlayer000...

Due
to the forums' formatting (or something) there're errors in the effect
scripts, like missing spaces etc. Experienced users can rectify the
code on their own, inexperienced ones can contact me to send them the
trigger file as a whole: gruengruengruen[insert @]gmail[insert .]com

Hi guys,

Ykkrosh and I found out a few neat things for the buggy AoE3 Editor.
First of all, some new effects (I think there's a guide in the wiki
how you can include them in your scenario):

   <Effect name="Unit Stop">
<Param name="SrcObject" dispName="$$22295$$Source Units"
varType="unit">default</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Command>trUnitSelectClear();</Command>
<Command loop=""
loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command>
<Command>trUnitMoveToUnit("%SrcObject%",%EventID%, false, false,
1.0);</Command>
</Effect>

<Effect name="Deselect Units">
<Command>uiClearSelection();</Command>
</Effect>

<Effect name = "Else Begin">
<Command>}</Command>
<Command>else</Command>
<Command>{</Command>
</Effect>

<Effect name = "Else End">
<Param name = "TrigName" dispName="This trigger:" VarType
="string">Trigger_0</Param>
<Command>xsDisableRule("_%TrigName%");</Command>
<Command>}</Command>
<Command>if (tempExp)</Command>
<Command>{</Command>
</Effect>

<Effect name="Auto Formation Off">
<Command>config("-RegroupUnits");</Command>
</Effect>

<Effect name="If Owned By Player Teleport">
<Param name="SrcObject" dispName="$$22295$$Source Units"
varType="unit">default</Param>
<Param name="Player" dispName="$$22301$$Player" varType="player">1</Param>
<Param name="Area" dispName="" varType="area">0, 0, 0</Param>
<Command>vector trtarea = vector(%Area%);
trQuestVarSet("trt12areax", xsVectorGetX(trtarea));
trQuestVarSet("trt12areay", xsVectorGetY(trtarea));
trQuestVarSet("trt12areaz", xsVectorGetZ(trtarea));
trQuestVarSet("trt12player", %Player%);</Command>
<Command loop="" loopParm="SrcObject">trUnitSelectClear();
trUnitSelect("%SrcObject%"); if
(trUnitIsOwnedBy(trQuestVarGet("trt12player")))
{trUnitTeleport(trQuestVarGet("trt12areax"),
trQuestVarGet("trt12areay"), trQuestVarGet("trt12areaz"));}</Command>
</Effect>


<Effect name="If Owned By Player Move">
<Param name="SrcObject" dispName="$$22295$$Source Units"
varType="unit">default</Param>
<Param name="Player" dispName="$$22301$$Player" varType="player">1</Param>
<Param name="Area" dispName="" varType="area">0, 0, 0</Param>
<Command>vector trmarea = vector(%Area%);
trQuestVarSet("trm34areax", xsVectorGetX(trmarea));
trQuestVarSet("trm34areay", xsVectorGetY(trmarea));
trQuestVarSet("trm34areaz", xsVectorGetZ(trmarea));
trQuestVarSet("trm34player", %Player%);</Command>
<Command loop="" loopParm="SrcObject">trUnitSelectClear();
trUnitSelect("%SrcObject%"); if
(trUnitIsOwnedBy(trQuestVarGet("trm34player")))
{trUnitMoveToPoint(trQuestVarGet("trm34areax"),
trQuestVarGet("trm34areay"), trQuestVarGet("trm34areaz"), -1, false,
false, 1.0);}</Command>
</Effect>

<Effect name = "If Begin">
<Param name="string" dispName="Condition:"
varType="stringid">trQuestVarGet("QV1") == 1</Param>
<Command>if (%string%) {</Command>
</Effect>

<Effect name = "If/If ... Else End">
<Command>}</Command>
</Effect>

<Effect name = "If ... Else Begin">
<Command>else {</Command>
</Effect>

<Effect name="Unit Set Stance">
<Param name="SrcObject" dispName="$$19160$$Unit"
varType="unit">default</Param>
<Param name="Stance" dispName="$$22476$$Stance"
varType="unitstance">Aggressive</Param>
<Command>trUnitSelectClear();</Command>
<Command loop=""
loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command>
<Command>trUnitSetStance("%Stance%");</Command>
</Effect>

<Effect name="Unit Set HP">
<Param name="SrcObject" dispName="$$21279$$Units"
varType="unit">default</Param>
<Param name="NewName" dispName="HP" varType="float">0</Param>
<Command>trUnitSelectClear();</Command>
<Command loop=""
loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command>
<Command>trUnitSetHP(%NewName%);</Command>
</Effect>

Unit Stop: Stops the current unit.
Deselect Units: Does what it says. Useful for cinematics as waypoint
flags won't show up any more. (Taken from the SNXT.)
Else Begin/End: Executes the effects in between those two effects if
the trigger's condition is NOT met. You have to enter the trigger's
name in Else End. (Taken from the SNXT.)
Auto Formation Off: The thing you all waited for, created by Ykkrosh
. Use it in a looped and active trigger, in order to work even when
you save/exit AoE3/load a game. Units won't regroup any more.
If Owned By Player Teleport/Move: Those are very useful for RPGs: You
select all characters that can join you on your way, and only those
who already have joined you will be moved/teleported. (Created by
Ykkrosh & me.)
If Begin/If ... Else Begin: Inserts an "If". The condition for that
"If" has to be specified in the "If Begin" effect. Additionally you
can use If ... Else: It fires if the "If" is not met (contrary to the
other Else effects above, which fire when the condition of the whole
trigger is not met).
To end those two effects you need If/If ... Else End.
Example for the "If" triggers: This represents the effects of a
trigger: If Begin, Message, If/If ... Else End, If ... Else, Send
Chat, If/If ... Else End.
Unit Set Stance/HP: Taken from the SNXT.

I think those effects are very handy and so I published
them/re-published them .

Next find: How to turn off your allieds' LOS:
In the very first trigger of your scenario use Set Tech Status, Spies,
Unobtainable, and the Player Reset Blackmap. Voilà. Easier than Player
LOS Change (plus that one was buggy in AoM, so I don't trust it).

Modify units: My recommendation is to add a new tech to the
techtree.xml which contains all your modifications and then use it in
your scenario.

BTW, my Editor Patch which fixes various bugs will be included in the
next New Editor by reyk .

That's it so far, see you,

Grün

(Oh, and thanks Ykkrosh!)"

[This message has been edited by Gaurdian_112 (edited 12-10-2005 @ 10:43 PM).]

AuthorReplies:
ToMyBoY
Skirmisher
posted 12-10-05 02:17 PM EDT (US)     1 / 4       
Cool.

When is Grun lifting his self-imposed ban and returning to visit us here? I miss flaming and giving him a hard time.

Gaurdian_112
Banned
posted 12-11-05 04:52 AM EDT (US)     2 / 4       
Me too. I'm going to try to use that no unit regrouping trigger, god damn that would help big time!
Reinfire
Skirmisher
posted 12-11-05 06:52 AM EDT (US)     3 / 4       
Cool, allthough I still miss the change units in area effect

Reinfire
--Retired Scenario Designer--
Everybody needs to beleive in something. I beleive I will have another beer
Cy Marlayne
Skirmisher
posted 12-11-05 08:40 AM EDT (US)     4 / 4       
Use oddy's Auto Formation effect. It has a switch.

<Effect name="Auto Formations">
<Param name = "On" dispName = "Use auto formation" varType = "bool">true</Param>
<Command>if (%On%) config("+RegroupUnits");</Command>
<Command>else config("-RegroupUnits");</Command>
</Effect>

₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪
Welcome to Life, your vacation from nothing.
₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪₪

[This message has been edited by Cy Marlayne (edited 12-11-2005 @ 08:41 AM).]

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

Hop to:    

Age of Empires III Heaven | HeavenGames