Staredit Network

Staredit Network -> UMS Assistance -> Why one works and another (But the same) doesn't?
Report, edit, etc...Posted by Staredit.Net Essence on 2004-05-06 at 00:13:52
Alright. This isn't even a serious problem for me, but what's bugging me is the "why" part of it.

Scenario: I've got a two seperate locations where a player can choose to "revive" their hero unit after death. However, it costs resources. So, just to make it informative as possible, I made seperate triggers for every possibility that the player could encounter in terms of not having enough minerals/gas to buy the revive.

I did all that and it worked fine for both players. Then I made a trigger that stops them from reviving the hero if they never owned it (You have to buy the hero first). This is where the problem comes in. Here's how I have it set up:

Conditions:
-Player owns at most 0 of Hero1.
-Doesn't Own Hero is clear.
Actions:
-Set Doesn't Own Hero.

If someone owns the unit, then Switch1 is automatically cleared and stays that way. (I already have switches to prevent reviving when they're already alive) But, when someone attempts to revive the hero (Without owning it).

Conditions:
-Player brings at least 1 Civ to Revive Hero1.
Actions:
-Move all Civ at Revive Hero1 to Civ Location.
-Set Revive Hero1.

Conditions:
-Revive Hero1 is set.
-Doesn't Own Hero is set.
Actions
-Display text message: You have never owned...ect.
-Clear Switch3.

Now, this is just the basic set-up, and it's the exact same for both heros other then the switches they set/clear/require and the locations they use. However, one works and one doesn't. One does exactly as above, however the second one gives me my "You need (minerals) and (gas) to purchase this hero" message that would be given if I had already owned the hero.

Anyone know why? sad.gif
Report, edit, etc...Posted by Yoshi da Sniper on 2004-05-06 at 07:31:45
You dont need switches to find out if a player has owned a unit.

You can easily find out if they have - or EVER had one.

When you own a unit already, only one of two things can happen:
- It dies
- It lives
Thus, if a player has at least one death of the hero, you KNOW the player has owned it. And if he doesn't command it, you know he owned it previously, but hes dead.

You can have unlimited revives this way. Totally removes the need for those switches.
Report, edit, etc...Posted by Staredit.Net Essence on 2004-05-06 at 10:07:58
Sorry if any of the following sounds severly stupid. I'm tired and feel like crap, but can't sleep. :/

Anyway, I have three seperate sets of heros that are exclusive by players race. (Guess I should've mentioned that. :/) Because of this I find it alot easier to set/clear a switch for each hero then to make a set of triggers for each hero/race and for the player commands and/or player has suffered deaths stuff.

However, I am tired, so what might make sense to me now probally won't later. Thanks for the help, I'll try it out that way after I (Hopefully) get some rest.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-05-06 at 11:18:30
I will help you if you attach the map. Other wise there are alot of things you didn't say that feel could go wrong. The is so much you left out.
Report, edit, etc...Posted by Staredit.Net Essence on 2004-05-06 at 11:34:49
Alright, but don't expect to be wowed by my neatness and/or skill with an editor. There is no method to my madness, only outcome, which is not often a good one. ermm.gif

I've preplaced all the units/locations first. Then I work on my mediocre triggering. So, a bunch of stuff on the map isn't going to be found anywhere in the triggers, because I did all the easy stuff first. I'm not even half-way done, and I just caught this little annoyance while testing out a few things.

Thanks for any help I might get. (Excluding critisicm. smile.gif )
Report, edit, etc...Posted by Staredit.Net Essence on 2004-05-06 at 12:10:03
...Alright, now I feel really retarded, because after taking a break from it for awhile, I came back, took one look at it, and figured out why it wasn't working. I had accidently left out a single condition for the reviving of one of my heros. (The one that just happened to not be working)

I'm sorry for putting you guys through the trouble. But, seriously, I had looked through it for an hour and a half before coming here, and I can't believe my eyes skipped over it every time. sad.gif
Report, edit, etc...Posted by (U)Bolt_Head on 2004-05-06 at 13:37:22
Oh im glad you figured it out cause it would of taken me a while cause i still don't fully understand what you were going for. I was still in the process of changeing all your toggle switch actions to what they should be.
Report, edit, etc...Posted by .Coko[CK] on 2004-05-06 at 16:39:07
Ah the toggle feature, i see it as just annoying, funny on a Preserve though, if it is Set, Toggle, if it is Clear, Toggle, and blast away!
Next Page (1)