Staredit Network

Staredit Network -> UMS Assistance -> Help
Report, edit, etc...Posted by Elven_Fury on 2004-04-23 at 22:19:30
i am haveing a scv build a baracks (the baracks cost one gass to build)

when it is done I need to add one gass so the player can build a factory(also cost one gass)

when the factory is done the player builds a starport(one gass)

now that is easy to do but i also need is so

-when one of thoughs buildings is destroyed the player can build it again but never have more than one gass and only be able to build one at a time (the map has no sorces of gass on it)

is there a trigger to detect the buildings while they are being built(if there is then you just solved by problem)
Report, edit, etc...Posted by Mini Moose 2707 on 2004-04-23 at 22:46:15
First, you can have triggers based on each set of building that sets the gas to 1 when they are missing one of the buildings. You'll need to make the combinations though, Barracks/Fac, Fac/Port, Barracks/Port.

Then, you have a trigger that destroys each building if they have 2 and re-add one gas.

If you're still having trouble making the triggers, let me know and I'll lay them out for you.
Report, edit, etc...Posted by Elven_Fury on 2004-04-23 at 23:50:33
i figured out how to do it but the way that i am doing it requires me to be able to detect buildings that are under construction

when one of the buildings are under construction the player should have 0 gass
Report, edit, etc...Posted by Yoshi da Sniper on 2004-04-24 at 00:01:06
Detecting building construction is a incommon practise. The best way I can think of, is have a counter (you can use Player has suffered death of 'unit', units like mineral shards etc wink.gif)

Say, if the counter number is LESS than the actual number of building of that type is owned, then you know that a new one is being built. You should make a trigger with whatever actions, then increment this counter.

However, if the counter is MORE than the actual number of building of that type that is owned, you know that one has been destroyed, you can decrease the counter and do whatever actions.

Its the best I can think of for now.
Report, edit, etc...Posted by .Coko[CK] on 2004-04-24 at 07:58:34
Yeah, thats what i was thinking, the best option is to follow what Yoshi wrote, i would write a trigger for it, but i've got work now...
Report, edit, etc...Posted by Mr.Camo on 2004-04-24 at 20:43:48
The trigger help confuzzled me huh.gif oh well. So you need on well when player builds one building at location acculmalate 1 gas smile.gif
Report, edit, etc...Posted by Elven_Fury on 2004-04-26 at 04:09:18
QUOTE(Mr.Camo @ Apr 24 2004, 07:43 PM)
The trigger help confuzzled me huh.gif oh well. So you need on well when player builds one building at location acculmalate 1 gas smile.gif

if i did that then the player would be able to build more then one at a time

hey i just got an idea i could have the trigger that gives the player the gass wait the same amount of time that it takes to make the building... only one problem how long of a wait is it if the building has a build time of 800

i didnt understand your counter yoshi could you simplify it... if it works better than what i am trying to do then i will use it
Report, edit, etc...Posted by .Coko[CK] on 2004-04-26 at 13:20:42
Ok so they way it basically counts is that you have a number of deaths set, and if the amount of buildings on the map is more than that then a new building is being built and so you can tell that a player as spent gas building something.

But to tell when something has been destroyed the building number will be less than the death count and so you can add gas to replace what is lost.

You trigger it yourself, not to hard, maybe revolves on the number of possible buildings, and amounts. With HUGE amounts i would suggest a counting tool and a system where you don't need a new trigger for each!
Next Page (1)