Welcome! Please Login or Register!
October 12, 2024, 10:02:24 PM
Home Login Register
pftq Forums  |  Game Design  |  Age of Empires III  |  Capture the Flag 0 Members and 1 Guest are viewing this topic. « previous next »
Latest News!Lunar Trigger(Aug 27, 2023)
Pages: 1 ... 4 5 [6] 7 8 ... 10 Print
Author Topic: Capture the Flag  (Read 46278 times)
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #75 on: October 10, 2007, 07:55:18 AM »

I may be willing to learn, but for now loop around the whole trigger sounds good.
Logged

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



Posts: 184

« Reply #76 on: November 01, 2007, 02:18:33 PM »

OK I have been playing around in scenario editor to get better with triggers. This is the trigger I planned on using for the Victory trigger. It is for player one only(once I get it working I wil copy it for all other players), and it is not working properly.

int Victory1=rmCreateTrigger("Victory Trigger1");
rmSwitchToTrigger(Victory1);
rmAddTriggerCondition("Units In Area");
rmSetTriggerConditionParam("DstObject", "Teepee");
rmSetTriggerConditionParamInt("Player", 1);
rmSetTriggerConditionParam("UnitType", "cow");
rmSetTriggerConditionParamInt("Dist", 10);
rmSetTriggerConditionParam("Op", "==");
rmSetTriggerConditionParamInt("Count", 2);
rmAddTriggerEffect("Set Player Won");
rmSetTriggerEffectParamInt("Player", 1);
rmSetTriggerRunImmediately(true);

I think its the DstObject that is nto working. The map loads, and before I changed the operator from <= to == it won pretty quick (because you can have 0 cows near the Teepee to win) but now I have 2 cows near the teepee and it does not win!?! Is it because it does not realise that the Teepee is the center, or is it something else?
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: 4202

WWW
« Reply #77 on: November 01, 2007, 08:52:12 PM »

Read a few replies back.  You asked about the same problem.

DstObject is the same parameters as CenterUnit, etc.  It has to be the variable of  a unit, not the unit type.
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #78 on: November 02, 2007, 08:14:31 AM »

You are absolutely right, thanks. For this trigger, what do you think it would need to work, I mean should I have it loop? or run immediately? or the SetTriggerActive?

int Victory1=rmCreateTrigger("Victory Trigger1");
rmSwitchToTrigger(Victory1);
rmAddTriggerCondition("Units In Area");
rmSetTriggerConditionParamInt("DstObject", StartTP1);
rmSetTriggerConditionParamInt("Player", 1);
rmSetTriggerConditionParam("UnitType", "cow");
rmSetTriggerConditionParamInt("Dist", 10);
rmSetTriggerConditionParam("Op", "==");
rmSetTriggerConditionParamInt("Count", 2);
rmAddTriggerEffect("Set Player Won");
rmSetTriggerEffectParamInt("Player", 1);

Logged

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



Posts: 184

« Reply #79 on: November 02, 2007, 05:53:12 PM »

Also, I have been trying to get my teepee's more durable, so they can actually go out without worrying about their Teepee. Here is the trigger I have

int TPMplayer=0;
for (TPMplayer=1; <=cNumberNonGaiaPlayers){
int TPMod=rmCreateTrigger("Teepee Modification"+HCAplayer);
rmSwitchToTrigger(TPMod);
rmAddTriggerCondition("Always");
rmAddTriggerEffect("Modify Protounit");
rmSetTriggerEffectParam("ProtoUnit", "Teepee");
rmSetTriggerEffectParamInt("PlayerID", TPMplayer);
rmSetTriggerEffectParamInt("Field", 0);
rmSetTriggerEffectParamInt("Delta", 99999700);
rmSetTriggerRunImmediately(true);
}

It doesn't work for anyone in the game. I alos tried in the Field "Hitpoints" but that did not work either.
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: 4202

WWW
« Reply #80 on: November 02, 2007, 09:17:30 PM »

I'm not sure what youa re asking for the first one - would you not simply want it to run once? If so, just set it to active.

For teh second, make sure "Teepee" is the actual protoname of the object (go to your proto.xml or select the object in editor and open the Protoname tab in reyk's editor).  Also what is HCAplayer? And finally, I don't believe TPMplayer needs to be predefined (forloops automatically define them).
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #81 on: November 02, 2007, 09:52:52 PM »

For the first one, the Victory trigger, from what you are looking at, waht would happen. Like I would like to know what it is telling you, becuase I could be reading it wrong.
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: 4202

WWW
« Reply #82 on: November 03, 2007, 09:12:52 AM »

When there exactly two cows within 10m of StartTP1, Player 1 wins.  However, I don't believe "cow" is the protoname (case sensitive remember)
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #83 on: November 03, 2007, 11:14:34 AM »

I know "cow" is right because not only did I use that for the unit placement,  I also found it in the techtree.
Logged

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



Posts: 184

« Reply #84 on: November 04, 2007, 10:40:13 AM »

OK, here is a working version. All except the Victory trigger works prefectly. The map does load and the massages do come and so do the reinforcements.

* Capture the FlagXS.txt (35.03 KB - downloaded 77 times.)
Logged

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



Posts: 184

« Reply #85 on: November 04, 2007, 02:36:02 PM »

Ok, when you deploy a building in a Deploy Army trigger, how would you deploy it built?

int TParmy=rmCreateArmy(TPlayer, "Teepee Army"+TPlayer);
int TPREA=rmCreateTrigger("Teepee ReAnimation"+riv);
rmSwitchToTrigger(TPREA);
rmAddTriggerCondition("Player Unit Count");
rmSetTriggerConditionParamInt("Player", TPlayer);
rmSetTriggerConditionParam("ProtoUnit", "Teepee");
rmSetTriggerConditionParam("OP", "==");
rmSetTriggerConditionParamInt("Count", 0);
rmAddTriggerCondition("Timer");
rmSetTriggerConditionParamInt("Param1", 60);
rmAddTriggerEffect("Army Deploy");
rmSetTriggerEffectParamArmy("SrcArmy", TPlayer, TParmy);
rmSetTriggerEffectParam("Clear", "true");
rmSetTriggerEffectParam("ProtoName", "Teepee");
rmSetTriggerEffectParamInt("Count", 1);
rmSetTriggerEffectParam("Location", rmXFractionToMeters(rmPlayerLocXFraction(TPlayer))+",1,"+rmZFractionToMeters(rmPlayerLocZFraction(TPlayer)));
rmSetTriggerActive(true);
riv=riv+1;
Logged

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



Posts: 184

« Reply #86 on: November 04, 2007, 04:18:14 PM »

Also, this group of triggers is not working. I am pretty sure the "Activate Trigger" effect of the third trigger is not wroking, am I right?

int TPREA=rmCreateTrigger("Teepee ReAnimation"+riv);
int TPpreA=rmCreateTrigger("Teepee preActivation"+riv);
int TPrepreA=rmCreateTrigger("Teepee repreActivation"+riv);

int TParmy=rmCreateArmy(TPlayer, "Teepee Army"+TPlayer);
rmSwitchToTrigger(TPREA);
rmAddTriggerCondition("Player Unit Count");
rmSetTriggerConditionParamInt("Player", TPlayer);
rmSetTriggerConditionParam("ProtoUnit", "Teepee");
rmSetTriggerConditionParam("OP", "==");
rmSetTriggerConditionParamInt("Count", 0);
rmAddTriggerEffect("Army Deploy");
rmSetTriggerEffectParamArmy("SrcArmy", TPlayer, TParmy);
rmSetTriggerEffectParam("Clear", "true");
rmSetTriggerEffectParam("ProtoName", "Teepee");
rmSetTriggerEffectParamInt("Count", 1);
rmSetTriggerEffectParam("Location", rmXFractionToMeters(rmPlayerLocXFraction(TPlayer))+",1,"+rmZFractionToMeters(rmPlayerLocZFraction(TPlayer)));
rmAddTriggerEffect("Activate Trigger");
rmSetTriggerEffectParamInt("EventID", TPrepreA);
rmAddTriggerEffect("Disable Trigger");
rmSetTriggerEffectParamInt("EventID", TPpreA);
rmSetTriggerActive(false);

rmSwitchToTrigger(TPpreA);
rmAddTriggerEffect("Counter:Add Timer");
rmSetTriggerEffectParamInt("Start", 60);
rmSetTriggerEffectParamInt("Stop", 0);
rmSetTriggerEffectParam("Msg", "Teepee returns in");
rmSetTriggerEffectParamInt("Event", TPREA);
rmAddTriggerEffect("Disable Trigger");
rmSetTriggerEffectParamInt("EventID", TPrepreA);
rmSetTriggerActive(false);

rmSwitchToTrigger(TPrepreA);
rmAddTriggerCondition("Player Unit Count");
rmSetTriggerConditionParamInt("Player", TPlayer);
rmSetTriggerConditionParam("ProtoUnit", "Teepee");
rmSetTriggerConditionParam("OP", "==");
rmSetTriggerConditionParamInt("Count", 0);
rmAddTriggerEffect("Activate Trigger");
rmSetTriggerEffectParamInt("EventID", TPpreA);
rmSetTriggerActive(true);
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: 4202

WWW
« Reply #87 on: November 04, 2007, 11:19:56 PM »

Use Fire Event instead of Activate Trigger. (it was always Fire Event, even in AOM)

For problems using the center object - I notice you have forests.  Make sure these come at the very end of your script because they scramble ids of any objects placed before it.

Deploying things built - try deploying another object and "Change Unit Type" to change it to your building.
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #88 on: November 05, 2007, 01:10:39 PM »

ok for "Change Unit Type" the SrcObject would be the unit I placed, but would it be a unit type so if I placed a skirmisher, would it change all skirmishers into teepee's, or would I have to have an object Definition like before and use that?

Also  for "Fire Event", that change is easy enough, but would it just fire then turn off on it's own or stay active? if it stays active could I still use "Disable Trigger" to stop it?

Also, for "Set Player Won", it does not end the game. The other team gets "You have been defeated" and your team gets "You Win" but I still have to resign. Is there something else I can use?
« Last Edit: November 05, 2007, 02:42:42 PM by River_God » 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: 4202

WWW
« Reply #89 on: November 05, 2007, 05:37:10 PM »

SrcObject, CenterUnit, DstObject etc are always object definitions.  You almost never have triggers that affect all of a unit type.

Staying active... that would mean looping? It would simply be as if the active box got checked again.

I've never used Set Player Won - I go through and set the other players as defeated and works perfectly for me. Smiley
Logged
Pages: 1 ... 4 5 [6] 7 8 ... 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.103 seconds with 21 queries.