I need a way to detect when a player is betraying a comp ally so that the comp can respond. However, I would prefer that the attack be detected BEFORE the unit the player is attacking dies, so that nothing vital dies without the comp trying to retaliate. I would also like it to be so that the comp would only unally the player if it had certain units within vision range of the player, but this isn't entirely necessary.
The buildings in question have to be vulnerable, so that enemy players can destroy them.
Any ideas?
None.
I need a way to detect when a player is betraying a comp ally so that the comp can respond. However, I would prefer that the attack be detected BEFORE the unit the player is attacking dies, so that nothing vital dies without the comp trying to retaliate. I would also like it to be so that the comp would only unally the player if it had certain units within vision range of the player, but this isn't entirely necessary.
The buildings in question have to be vulnerable, so that enemy players can destroy them.
Any ideas?
If it was a player, you can use "Command" and set to "Non Allied Victory Players" and give each player a unique unit. However, since diplomacy does not actually touch computer players, this is nearly impossible to do.
None.
I order you to forgive yourself!
If all you want to do is make the computer attack back when an allied human player is attacking him, you can just make a trigger that will force the computer to ally back each X seconds.
When a computer is attacked by a human player, he will attack back on it's own (Without any trigger). If you set the ally each 2 - 3 sec, the computer will stop attacking but will restart if the player is still attacking him.
AH! So THAT's why the comp player wouldn't unally... I had set the ally command without a wait trigger... Thank you apos, that is exactly what I wanted.
However, I'm a bit worried about wait blocks. I'm not very experienced with triggers. If I just set the trigger as...
(Check boxes for Players 1 and 7)
Player 1 suffers at least 21 deaths of "Holiness" (my sort of "reputation" counter; 21 is the amount players alligned to "Good" get at the start)
Set ally status for Player 1 to Ally.
Set ally status for Player 7 to Ally.
Wait 5000 seconds
Preserve Trigger
... would that be ok?
None.
Why use waits? Just use deathcounts.
Edit: was gonna edit in a link to the wiki but I seem to be unable to find the deathcount wiki... gimme a minute.
"If a topic that clearly interest noone needs to be closed to underline the "we don't want this here" message, is up to debate."
-NudeRaider
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
http://www.staredit.net/wiki.php?article=death_countersThe links have been changed to the new wiki, but the old pages still exist.
I know how to use deathcounts, but what I wanted to know was, is there a point to using them over waits? I'm afraid that having a death timer constantly running would cause lag... do I have to worry about this?
None.
Death counters are lagless and not prone to wait blocks.
None.
Ok then, I'll try using death counters and see how it goes.
I take it that when I want to have a wait, I just have something to turn on the death counter, and make it stop when it's gone long enough? Like, for my introduction, I would do this (with actual dialogue in place of "blah blah blah"):
Elapsed time is at least 1 second.
Display Text "Blah blah blah"
Set deaths of whatever for current player to 1
Current player suffers at least 1 deaths of whatever.
Add 1 deaths of whatever for current player
Preserve trigger
Current player suffers at least 60 deaths of whatever
Display text "blah blah blah"
Set deaths of whatever to 0 for current player
Would that be how I do it?
I also kind of like physical timers (burning buildings and such). They're hard to mess up. Would you recommend using those a lot?
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Physical timers are inferior to death counters unless you want the player to be able to see it. Death counters can't mess up either.
Ok. But did I get the death counter trigger idea right? I'm not very experienced with using deaths in place of waits.
Why are physical timers inferior, anyway, other than the players being able to see them?
None.
I order you to forgive yourself!
When you use death counters, you can detect any amount you want, when using the HP of a unit, you can't. Also, with death counter, you can decided how fast it goes down (Or up), using HP (For burning in your example), you can't. If HP would be as precise as death count, we wouldn't need any vHP. I guess someone else can go more in detail.
Ah, I get it. I actually had a plan to speed up the physical timers when I needed (spawning units to attack them XD), but the death counter thing does sound easier to control.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
but the death counter thing does sound easier to control.
That's the main point: They are easier to control.
You can check their value,
they are more precise/have more values
and most importantly you can add/subtract from them.
The list goes on.
Wait timers can interfere with eachother if not used carefully. Also, it's impossible to use more than one at a time for any given player.
Post has been edited 1 time(s), last time on May 5 2010, 1:27 pm by NudeRaider. Reason: waits are non-physical
None.
Oh, ok, I get it.
Dang, why'd Blizzard design the actual wait function to be so inefficient? It seems like there isn't any instance where a wait would be more efficient than a death timer XD.
None.
Oh, ok, I get it.
Dang, why'd Blizzard design the actual wait function to be so inefficient? It seems like there isn't any instance where a wait would be more efficient than a death timer XD.
The only thing that waits are useful for imo is for hypers. The trouble is that in some cases, using DCs can get rather complicated. =/
None.
Waits can be useful to cut down on the number of triggers you need. You can do some actions, wait, and more actions in a single trigger. Doing the same with DCs takes at least 3 triggers: 1 to deduct the DC, 1 to perform the first set of actions, 1 to perform the 2nd set of actions and reset the DC. This is particularly useful if it is something that happens rarely/in a controlled manner that you are sure won't wait block, and you are trying to conserve available non-playable units for other uses where DCs are required to avoid wait blocks.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Dang, why'd Blizzard design the actual wait function to be so inefficient?
Why did you learn to crawl first as a baby? Why didn't you start with walking?
It seems like there isn't any instance where a wait would be more efficient than a death timer XD.
Waits are useful in single player maps where the player might not use fastest game speed.
Unlike death counters which are tied to game time (useful to time cutscenes) waits are measured in real-time, so you can time text messages and music independent from game speed.
Blizzard didn't know Tuxedo Templar was going to make RUSH.
Waits are useful in hyper triggers and in simple triggers. When displaying a series of texts, it's nice to just use a wait and save a few triggers. I believe waits work on a frame by frame basis as well. They're certainly not useless, but it's much better to think of the game in terms of frame by frame rather than per second, due to game speeds.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"