Respawn Bug..
Aug 31 2008, 5:52 am
By: CecilSunkure  

Aug 31 2008, 5:52 am CecilSunkure Post #1



I have a bug with some triggers that i just cant figure out. The problem is when 3 or more ppl play on my map, then ppl slowly stop respawning once they are killed, until only 2 players are left playing. Once a player is killed, 20 seconds pass, and then the player is respawned in one of 6 different locations. Players 1-7 are the only players able to kill a player of 1-6.

Here is the trigger for one character dieing:

Condition:
Deaths(CurrentPlayer, AtLeast, 1, mud creature);
Bring(CurrentPlayer, AtMost, 0, Mud Creature, Left Arena);

Actions:
CreateUnitWithProperties(1, Mud Creature, Pik Sort, CurrentPlayer, burrowed);
DisplayText("You have been slain! [Respawn in 20 Seconds]", 4);
SetDeaths(CurrentPlayer, SetTo, 0, Mud Creature);
Comment("Die Mud");
SetDeaths(CurrentPlayer, SetTo, 1, Bengalaas);
PlayWAV("sound\\Misc\\ZRescue.wav");
PreserveTrigger();

This is the death count trigger:

Condition:
Deaths(CurrentPlayer, Exactly, 1, Bengalaas);

Action:
Comment("Die Counter");
SetDeaths(CurrentPlayer, Add, 1, Ultralisk Cavern);
PreserveTrigger();

This is the death count listening trigger:

Condition:
Deaths(CurrentPlayer, Exactly, 1, Bengalaas);
Deaths(CurrentPlayer, AtLeast, 255, Zerg Ultra Cavern);

Action:
Comment("Die Count Listen");
SetDeaths(CurrentPlayer, SetTo, 0, Ultralisk Cavern);
SetDeaths(CurrentPlayer, SetTo, 0, bengalaas);
SetSwitch(Switch 1, Randomize);
SetSwitch(Switch 2, Randomize);
SetSwitch(Switch 3, Randomize);
PreserveTrigger();
SetDeaths(CurrentPlayer, SetTo, 1, Kakaru);

And here is one of the possible outcomes for the random gen, all other outcomes are the same exact trigger.. basicly. And no, none of these triggers have an error in them that could cause the bug like a wrong condition switch listener or a wrong unit death in a condition.

Condition:
Switch(Switch 1, Set);
Switch(Switch 2, Set);
Switch(Switch 3, Set);
Deaths(CurrentPlayer, Exactly, 1, Kakaru);

Action:
MoveUnit(All, Men, CurrentPlayer, Pik Waiting, Arena Spawn 1);
CenterView(Arena Spawn 1);
Comment("Random Loc Die");
DisplayText("You have been Respawned!", 4);
SetDeaths(CurrentPlayer, SetTo, 0, Kakaru);
PreserveTrigger();


Any help would be greatly appreciated!


Edit: trigs copied from starforge so conditions had numbers instead of units.[TRIGGER]

Post has been edited 3 time(s), last time on Aug 31 2008, 6:27 am by O)Silent.



None.

Aug 31 2008, 6:10 am Matt Burch Post #2



It would be nice if you used the normal Trigger layout for the triggers. Not everyone here uses the editor you use. I can't help if I don't understand the triggers.



None.

Aug 31 2008, 6:49 am Fwop_ Post #3



The triggers seem fine (though, you could have done it all using one death counter). The only thing I can think of is that they players are getting a bad combination on the random switches. Using three switches you will have eight outcomes, but you said there were six possible respawn locations. Also, 255 deaths is a little more than 21 seconds. Fibber.

@Matt: It's not that hard to just read what the triggers actually say. Is it really that hard to understand when you see something like SetDeaths(CurrentPlayer, SetTo, 0, Ultralisk Cavern);?



None.

Aug 31 2008, 2:42 pm Falkoner Post #4



Instead of using switch randomization, I would constantly add to a death count, and once it gets higher than 6, reset it to 0, and you can decide which location they spawn at based off of that.



None.

Sep 1 2008, 12:54 am CecilSunkure Post #5



Quote from Fwop_
The triggers seem fine (though, you could have done it all using one death counter). The only thing I can think of is that they players are getting a bad combination on the random switches. Using three switches you will have eight outcomes, but you said there were six possible respawn locations. Also, 255 deaths is a little more than 21 seconds. Fibber.

@Matt: It's not that hard to just read what the triggers actually say. Is it really that hard to understand when you see something like SetDeaths(CurrentPlayer, SetTo, 0, Ultralisk Cavern);?

Oh well i have the last two possible outcomes rigged to reset the triggers to randomize the switches again. As for the death count randomization.. Could you plz explain this in detail? Last time i checked there was no tutorial on this.

Add deathcounts over 6, reset it, and then what o.o

About matt not understanding, i have starforge set to display trigger conditions as Unit:number instead of Unit:unit, so that i can write proper UED triggers, and matt was reading numbers in my conditions. I changed this while matt was posting his post.



None.

Sep 1 2008, 12:55 am Falkoner Post #6



When you want to find out which space they go to, have the conditions be based on what death it is currently on, so it's either 1-6.



None.

Sep 1 2008, 1:04 am CecilSunkure Post #7



If the conditions are based on numbers 1-6, wouldn't the trigger condition listening for 1 always fire.. followed by the other 5.. I dont understand how this generates randomization. It looks like a set death count trigger with a set pattern of respawn locations. Is that what you mean? A set list of respawns? Id rather have actual randomization with switches, as I doubt they are the root of the bug.

My guess is that splash damage is what is causing the problem, but ive used in conditions listening for deaths 'at least 1 death of unit 'x'', so splash shouldn't be a problem.

Also I checked through all my other triggers, and im not using the same unit for death counts at all anywhere else. The bug seems to occur when two ppl are dead at the same time, which is very unlikely to happen with two players, so i might just need to copy my triggers so each player has a different set instead of applying the respawn triggers to six players at once using 'current player'.

Ill keep trying different things to pinpoint the problem.



None.

Sep 1 2008, 2:02 am Fwop_ Post #8



Check your re-randomization triggers. You set Player 8 to 1 Your Name Here ¿ K instead of Current player.



None.

Sep 1 2008, 3:24 am CecilSunkure Post #9



Hey thanks, im really sure that was the problem! Although ive played this map for an hour at a time testing things.. and I didnt have a respawn problem which is wierd!

Anyways thanks again fwop_, yu were my idiot check ;)

But I'd still like falkoner to answer me :O



None.

Sep 1 2008, 4:01 am Fwop_ Post #10



The trigger to add +1 to the death count will not fire again until the next loop. So the condition with 1 value will try to fire, then 2, then 3, and so on. Since a death count can only have one value, only one trigger will actually fire.



None.

Sep 1 2008, 4:11 am CecilSunkure Post #11



Yeah, so its just a set list of triggers to fire, with no random pattern.. right?



None.

Sep 1 2008, 4:21 am Fwop_ Post #12



It isn't quite random, but if the event to cause the selection of one of the 6 death counters is random, it shouldn't matter either way.



None.

Sep 1 2008, 10:02 am NudeRaider Post #13

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

Nah... Death counter randomization is not a pattern, unless you respawn your guys every trigger loop.

You are ALWAYS (if dead, or not) adding 1 to the death count. So as soon as someone dies it depends on the time of his death which value the dc will have. And after the game is running for several ten seconds you will definately not be able to telll where you will respawn. (Whereas you could say that after 0,5s (=6 trigger loops) you respawn at location 1 again.)

I think you thought that the dc is only increase upon death of a player, which is not true.




Sep 1 2008, 4:20 pm CecilSunkure Post #14



Oh i c, so you constantly adding deaths from 1-6, and whatever the number happens to be when your unit dies, is the trigger that will fire. Ok that makes sense, thanks a lot you all!



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[04:59 am]
zsnakezz -- >:)
[04:59 am]
zsnakezz -- :)
[04:58 am]
zsnakezz -- somebody gets it
[04:58 am]
zsnakezz -- and its not all just numbers in my file screen
[04:57 am]
zsnakezz -- thank you for your comment though, good to know some people out there tried my map out
[04:57 am]
zsnakezz -- just kidding
[04:57 am]
zsnakezz -- ultra you have any thought or notes on undead invasion?
[2024-5-31. : 2:36 pm]
Wing Zero -- Bop em
[2024-5-31. : 2:36 pm]
Wing Zero -- Mods
[2024-5-29. : 9:40 pm]
Ultraviolet -- :wob:
Please log in to shout.


Members Online: Rawflesh0615