pftq.com
Welcome! Please Login or Register!
November 23, 2024, 09:13:27 PM
Home Login Register
pftq Forums  |  Game Design  |  Age of Empires III  |  Capture the Flag 0 Members and 2 Guests are viewing this topic. « previous next »
Latest News!Lunar Trigger(Aug 27, 2023)
Pages: 1 ... 3 4 [5] 6 7 ... 10 Print
Author Topic: Capture the Flag  (Read 46708 times)
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #60 on: September 26, 2007, 04:40:49 AM »

So if I want the army I pre-made, I will have to set "Clear" to false.  I tried it but whatever I do to the line it doesn't work and makes the map fail.

rmSetTriggerEffectParam("Clear", false);
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #61 on: September 26, 2007, 07:37:14 PM »

Remember anything using EffectParam should be a string: "false"
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #62 on: September 29, 2007, 05:47:18 PM »

OK I am working on my Victory trigger, but I am a little stuck on some variables for the condition.

rmAddTriggerCondition("Units in Area");
rmSetTriggerConditionParam("Player", playaT2);
rmSetTriggerConditionParam("UnitType", "cow");
rmSetTriggerConditionParamInt("Count", 2);

<Condition name="Units in Area">
   <Param name="DstObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
   <Param name="Player" dispName="$$22301$$Player" VarType="player">1</Param>
   <Param name="UnitType" dispName="$$22302$$Unit Type" VarType="unittype">Unit</Param>
   <Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
   <Param name="Op" dispName="$$22297$$Operator" VarType="operator">==</Param>
   <Param name="Count" dispName="$$22304$$Count" VarType="float">1</Param>
   <Expression>trCountUnitsInArea("%DstObject%",%Player%,"%UnitType%",%Dist%) %Op% %Count%</Expression>
</Condition>

ok, the DstObject?!? dunno what that is. and "Op"?!? what is the operator? and is the "UnitType" just the name of the protounit or something bigger?
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #63 on: September 30, 2007, 06:15:30 PM »

Look not at the "name" but the "dispName".

DistObject= Center Unit (the object that the area revolves around). (unit id)

Operator is ==, =>, =<, <, > (string)

Unit type is protounit yes.
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #64 on: October 01, 2007, 01:22:45 PM »

OK so that means I will have to put something, an object, within my map to have the flags gather around?  and teh Area is the object plus exactly(==) less than(<) or more than(>) the Dist? then would the Dist number be in fraction or meters?
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #65 on: October 01, 2007, 04:44:30 PM »

Dist is in meters.
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #66 on: October 02, 2007, 03:04:13 PM »

for (playaT2=1; <=cNumberNonGaiaPlayers){
rmAddTriggerCondition("Units in Area");
rmSetTriggerConditionParam("DstObject", "TownCenter");
rmSetTriggerConditionParamInt("Player", playaT2);
rmSetTriggerConditionParam("UnitType", "cow");
rmSetTriggerConditionParamInt("Dist", 20);
rmSetTriggerConditionParam("Op", "<");
rmSetTriggerConditionParamInt("Count", 2);
}

why isn't this working?
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #67 on: October 02, 2007, 06:35:11 PM »

DstObject is an object ID, not a type.

When you place objects and assign objects to a variable...

int blarg = rm.. Object (i forget the code), you use blarg (the variable) in place for the DstObject (same with other center units)
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #68 on: October 03, 2007, 07:16:20 PM »

so it would be like:

int blarg=rmCreateObjectDef("Center Unit");
rmAddObjectDefItem(blarg, "Town Center", 1, 0);

where 1 is count ans 0 is cluster distance
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #69 on: October 04, 2007, 07:32:19 PM »

Yep.  And would use blarg as the input for the trigger (blag is an int so use ParamInt)
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #70 on: October 08, 2007, 04:55:12 PM »

Well, I am not sure why this isn't working:

for (playaT2=1; <=cNumberNonGaiaPlayers){
rmAddTriggerCondition("Units in Area");
rmSetTriggerConditionParamInt("DstObject", towncenterID);
rmSetTriggerConditionParamInt("Player", playaT2);
rmSetTriggerConditionParam("UnitType", "cow");
rmSetTriggerConditionParamInt("Dist", 20);
rmSetTriggerConditionParam("Op", "<");
rmSetTriggerConditionParamInt("Count", 2);
}
rmAddTriggerEffect("Counter:Add Timer");
rmSetTriggerEffectParam("Name", "FlagsCaptured");
rmSetTriggerEffectParamInt("Start", 300);
rmSetTriggerEffectParamInt("Stop", 0);
rmSetTriggerEffectParam("Msg", "SOMEONE HAS THE FLAGS");
rmAddTriggerEffect("Flare Minimap");
rmSetTriggerEffectParam("Position", "0.5,1,0.5");
rmSetTriggerPriority(4);
rmSetTriggerActive(true);
rmSetTriggerLoop(false);

I added a flare minimap to make sure it worked but it did not flare when I had 2 cows at my towncenter
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #71 on: October 08, 2007, 08:19:33 PM »

That makes it so you have two cows from EVERY player before it flares.
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #72 on: October 09, 2007, 04:06:15 PM »

Then how would I make it so that when any player has 2 cows at their town center they win?
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #73 on: October 09, 2007, 09:20:10 PM »

1 trigger per player.  Have the loop around the entire trigger rather than the condition.
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #74 on: October 09, 2007, 09:21:13 PM »

You can keep it to 1 trigger if you use XS Injection (which you could then write custom conditions and effects), but I doubt you want to go that far.
Logged
Pages: 1 ... 3 4 [5] 6 7 ... 10 Print 
pftq Forums  |  Game Design  |  Age of Empires III  |  Capture the Flag « 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.119 seconds with 21 queries.