HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Please Help - Counting Player Buildings for Quest

12-29-2005, 05:45 PM#1
Kevin
:(

I must be stupid or blind, I can't figure out hwo to create a quest with conditions tha tcount the player's buildings.

i.e.

Quest: Fortify a town hall with 6 Farms and One Barracks (original wc1 mission 1)

Farms 1/6
Barracks 0/0


I just want hte quest to count the non destroyed farms.

i.e. say start the missio nwith 1 farm, 1 town hall. I build 3 farms, 1 farm gets destroyed. Then the counter sould only read 3 farms even though I have had a total of 4 built.


:(


Pls email me with a link if you know of the right tutorial, or with descriptions.

I am having a hard time understanding some of the array discussions as it is. :(


[email protected]
12-29-2005, 11:22 PM#2
AnarkiNet
totally wrong forum, put this in the Triggers forum in the development section.
12-30-2005, 12:34 AM#3
Tim.
Granted.
12-30-2005, 12:37 AM#4
Anitarf
Have one integer variable and two triggers. One trigger should increase that variable by 1 whenever a farm is built, and the other decrease it whenever a farm is destroyed. The variable now represents the number of farms the player has.
12-31-2005, 10:11 PM#5
Kevin
Quote:
Originally Posted by Anitarf
Have one integer variable and two triggers. One trigger should increase that variable by 1 whenever a farm is built, and the other decrease it whenever a farm is destroyed. The variable now represents the number of farms the player has.

HI

Actually I found it yesterday and it has nothing to do with arrays.

;D

:(

Nobody on three websites got the answer correct.


The correct answer I found is:

Integer comparison -
..........-Unit -Count units in unit group
..............-Units owned by(Player)of type (Type)
12-31-2005, 10:13 PM#6
Vexorian
yeah, just make sure to clean the memory leak.

And it is kind of obvious anyways
12-31-2005, 10:20 PM#7
Kevin
So obvious nobody knew where the menus were on three separate websites? ;D

Took me 3 days to find it, and I tell you why:

all other quest building functions are under "Structure" commands.

This one was under "Unit" commands :sighs:

It was real infuriating there for a while.