pftq.com
Welcome! Please Login or Register!
November 21, 2024, 03:03:09 AM
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 ... 7 8 [9] 10 Print
Author Topic: Capture the Flag  (Read 46514 times)
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #120 on: November 24, 2007, 07:34:06 PM »

No, I was just lazy, I will do that now.  Grin Anyways, is there a way of making an "Op" between two numbers, like 1<#<8 ?
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 #121 on: November 29, 2007, 06:35:16 AM »

No but you can use && (and) and || (or)

like: x<8&&x>4 which would mean 4<x<8
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #122 on: December 04, 2007, 06:15:53 PM »

ok what does this say to you.

rmAddTriggerCondition("Units in Area");
rmSetTriggerConditionParamInt("DstObject", HMUSI);
rmSetTriggerConditionParamInt("Player", HmPlaya1);
rmSetTriggerConditionParam("UnitType", "IGCHarbormaster");
rmSetTriggerConditionParamInt("Dist", 0.01);
rmSetTriggerConditionParam("Op", "==");
rmSetTriggerConditionParamInt("Count", 1);
rmAddTriggerCondition("Timer");
rmSetTriggerConditionParamInt("Param1", 179);
rmAddTriggerEffect("Army Deploy");   
rmSetTriggerEffectParamArmy("SrcArmy", HmPlaya1, HArmy1);
rmSetTriggerEffectParam("Clear", "true");
rmSetTriggerEffectParam("ProtoName", Hmarmy1);
rmSetTriggerEffectParamInt("Count", HmNarmy1);
rmSetTriggerEffectParam("Location", rmXFractionToMeters(rmPlayerLocXFraction(HmPlaya1))+",1,"+rmZFractionToMeters(rmPlayerLocZFraction(HmPlaya1)+0.01));
rmSetTriggerLoop(true);
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: 4204

WWW
« Reply #123 on: December 04, 2007, 07:42:36 PM »

None of this happens until 179 seconds have passed.
An IGCHarbormaster would have to almost be directly over the HMUSI object - Exactly 1.
Then a unit is placed slightly above the player base location.
« Last Edit: December 04, 2007, 08:02:07 PM by pftq » Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #124 on: December 05, 2007, 12:05:03 PM »

so if I changed the OP to <= and the Dist to 0.05 it should happen after 179 seconds if harbormaster is 5 or less away from USIunit a unit is placed?
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 #125 on: December 05, 2007, 09:49:02 PM »

No the radius by default is already <=.  I meant exactly 1 harbormaster unit.

Dist to 0.05 does not mean 5 or less away though.  If you want 5 grid squares - that equals 10 meters (Dist is in meters).
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #126 on: December 06, 2007, 02:46:49 PM »

ok, that is exactly what I was wondering. So if I keep "==" and change 0.05 to 5, if it is 5 or less grid squares away unit will be placed.
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 #127 on: December 06, 2007, 03:46:38 PM »

Yes.
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #128 on: December 06, 2007, 06:11:02 PM »

OK, I figured out why it wasn't working, for some reason it is registering the USIunit placed opposite to the one I want on the map, but it's fine for now.

I was wondering if I could have a non-scrambled version of Fort wars. I won't copy it or make any changes or give it to anyone or anything, I just want to learn from you and scrambled versions are only usefull in confirming unit names (I would have never found Jaguar Prowl knights without). Any version is fine, I just want to see how you did things.
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 #129 on: December 09, 2007, 04:54:48 PM »

I'll think about it... Maybe I'll give you 2.0 (3.0 is far more optimized though; loads faster and script is almost half-sized)

Though it wouldn't really help to see how I did things. Tongue

Almost everything I did was in XS or put into a function.  You would never see "rmAddTriggerCondition" or any other 'blocky' code in the script.

As for the USIunit - seeing as you placed multiple units using the same variable, it makes sense.  The most recently placed units probably took over the variable.
« Last Edit: December 09, 2007, 04:59:15 PM by pftq » Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #130 on: December 16, 2007, 08:24:56 PM »

OK, does the "techtree" file actually show me the right tech number or do I have to find it elsewhere?
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 #131 on: December 17, 2007, 04:37:06 PM »

The tech number is the order the tech is in the list (first tech=0).

That is why it screwed up so many maps when they re-ordered all the techs in TWC.

http://wiki.heavengames.com/age/Tech_ID_list
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #132 on: December 18, 2007, 01:53:01 PM »

ok, that's rough. And that list is out of date too. But I found the techs I wanted and counted them out in the techtree, took me forever. Thanks
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 #133 on: December 18, 2007, 02:15:56 PM »

Well, either I counted wrong, or I did nto get the right tech. Do you have a program or something that can number it all out for me?, or am I just gonna have to make a list myself?
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 #134 on: December 19, 2007, 07:14:11 PM »

Elpea wrote a short script that counted the techs for his other two lists (each version of the game has a specific list since the techs are re-arranged each time).

I can write one as well but it would probably be quicker to get it from him if he already has it.
Logged
Pages: 1 ... 7 8 [9] 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.129 seconds with 21 queries.