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

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: A useful trigger
posted 22 September 2007 02:07 PM EDT (US)   
This trigger makes all units that currently cost population change the amount they cost to an amount of your choice. Remember that you cannot make a unit cost less than 1 population but it is still good. This means that you can now build 300 units that normally cost population which is very useful.
<Effect name="Make all pop costing units # pop">
<Param name="p1" dispName="lowest player" varType="player">1</Param>
<Param name="p2" dispName="highest player" varType="player">4</Param>
<Param name="pop" dispName="amount" varType="long">1</Param>
<Command>trQuestVarSet("PlayerID", %p1%);</Command>
<Command>while(%p2%>=trQuestVarGet("PlayerID")) {</Command>
<Command>trQuestVarSet("ModProtoRandomQV", 0);</Command>
<Command>while(999>=trQuestVarGet("ModProtoRandomQV")) {</Command>
<Command>trQuestVarSet("moo",kbGetPopSlots(1*trQuestVarGet("playerID"), trQuestVarGet("ModProtoRandomQV")));</Command>
<Command>if(1*trQuestVarGet("moo") > 0)trModifyProtounit(""+kbGetProtoUnitName(trQuestVarGet("ModProtoRandomQV")), 1*trQuestVarGet("playerID"), 6, -1*trQuestVarGet("moo")+%pop%);</Command>
<Command>trQuestVarSet("ModProtoRandomQV", trQuestVarGet("ModProtoRandomQV")+1);}</Command>
<Command>trQuestVarSet("PlayerID", trQuestVarGet("PlayerID")+1);}</Command>
</Effect>
This is alot better than using modfiy all because it makes everything that doesn't normally cost pop cost pop which can be annoying!

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.

[This message has been edited by nottud (edited 09-22-2007 @ 02:08 PM).]

Replies:
posted 22 September 2007 03:24 PM EDT (US)     1 / 10  
posted 22 September 2007 03:25 PM EDT (US)     2 / 10  
OMG! Wow! Just what I needed for LW!
You'll be the first one to playtest it, lol.
(The reformed version, not the old one, since many people've playtest it, beside, you've already seen the wall...)

I don't have a penis - Ashrzr | What, ash has a penis - Blatant | no, I lie no longer - Ashrz
Proof that Noodle is a typical tea-drinking British
don't I have enough nicknames already - Revenge | no, you need more - Jack | says the tea drinking British! - Revenge | yes, say i. - Jack
Enlightenment is only one click away
posted 22 September 2007 04:55 PM EDT (US)     3 / 10  
Indeed so I made it.

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.
posted 23 September 2007 04:31 AM EDT (US)     4 / 10  
Yay! You did it again!Keep making triggers

MEPH
[Insert amazingly witty signature here.]

Me and Yeebaagooon's scenarios | Download The Corruptor
posted 23 September 2007 09:41 PM EDT (US)     5 / 10  
Hey nottud, thanks for the great trigger; its going to help heaps. I was wondering if you could make a trigger "create unit at army" or if that's impossible maybe "deploy army at army" - if you could do that that would help heaps! If not, well thats cool too ~ Khan

<||=================================||>
Proud Member of Forgotten Empires
96Reviews KaS Dota2 Halo 5 Reach
{ "Work until your idols become your rivals" }
༼ つ ◕_◕ ༽つ trGetUnitScenarioName(); ༼ つ ◕_◕ ༽つ
posted 24 September 2007 02:04 PM EDT (US)     6 / 10  
I don't know if it is possible. If it is, I am the wrong person to ask since I suck at kb commands! I only manage to do basic ones or use someone elses triggers as a "kb command template".

(Mainly the kb queries I can't understand)

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.
posted 26 September 2007 07:37 AM EDT (US)     7 / 10  
bummer, would pftq know how to do it/if it is possible? ~ Khan

<||=================================||>
Proud Member of Forgotten Empires
96Reviews KaS Dota2 Halo 5 Reach
{ "Work until your idols become your rivals" }
༼ つ ◕_◕ ༽つ trGetUnitScenarioName(); ༼ つ ◕_◕ ༽つ
posted 26 September 2007 11:56 AM EDT (US)     8 / 10  
@nottud:
Could you stop using Quest Vars already?

@Steak And Khan:
Do use the Question thread.

-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 26 September 2007 12:38 PM EDT (US)     9 / 10  
@nottud:
Could you stop using Quest Vars already?
Huh?

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.
posted 26 September 2007 02:16 PM EDT (US)     10 / 10  
Your code:
trQuestVarSet("PlayerID", %p1%);
while(%p2%>=trQuestVarGet("PlayerID")) {
trQuestVarSet("ModProtoRandomQV", 0);
while(999>=trQuestVarGet("ModProtoRandomQV")) {
trQuestVarSet("moo",kbGetPopSlots(1*trQuestVarGet("playerID"), trQuestVarGet("ModProtoRandomQV")));
if(1*trQuestVarGet("moo") > 0)
trModifyProtounit(""+kbGetProtoUnitName(trQuestVarGet("ModProtoRandomQV")), 1*trQuestVarGet("playerID"), 6, -1*trQuestVarGet("moo")+%pop%);
trQuestVarSet("ModProtoRandomQV", trQuestVarGet("ModProtoRandomQV")+1);}
trQuestVarSet("PlayerID", trQuestVarGet("PlayerID")+1);}
My way:
int playerID = %p1%;
while(%p2%>=playerID) {
int ModProtoRandomQV = 0;
while(999>=ModProtoRandomQV) {
int moo = kbGetPopSlots(playerID, ModProtoRandomQV);
if(moo > 0)
trModifyProtounit(""+kbGetProtoUnitName(ModProtoRandomQV, playerID), 6, -moo+%pop%);
ModProtoRandomQV++;}
playerID++;}
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
Age of Mythology Heaven » Forums » Scenario Design » A useful trigger
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames