Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Set Force Deaths
Set Force Deaths
Jul 26 2008, 5:13 am
By: LosTZealoT  

Jul 26 2008, 5:13 am LosTZealoT Post #1



More issues(most likely last issue) with my 8 player TD map. Ive run into a serious problem. To control various part of the levels and intro, I use DCs. Formerly, these DCs were owned by Player 1. However, Ive discovered that in the event Player 1 leaves or is eliminated, the map stops working thats to the fact his DCs go with him. So, in order to fix this problem, I thought that I could instead of using player 1, use Force 1.

However, after a few tests, Ive found a small contradiction. When I have Player's 1 and 2 on Force 1 and Set Deaths and Set Force 1's death to x of unit(Action), I tested Force 1 has suffered x deaths of unit(Condition) successfully and also tested Player 1 has suffered x deaths of unit(Condition) and Player 2 has suffered x deaths of unit(Condition) successfully. This seemed to indicate that Set Deaths of Force 1 to x meant it set Deaths to x for all players on Force 1.

However, I also tried this: Set Deaths for Player 1 x deaths of unit(Action) and Set Deaths for Player 2 to x deaths of unit(Action). I then tested Force 1 has suffered 2x deaths of unit(Condition) successfully.

Im not very confused! Will replacing Player 1 with Force 1 to be my DC holder work?



None.

Jul 26 2008, 6:09 am Kaias Post #2



Indicating Force just sets it for all the people in the Force
Reading from Force detects the sum of the deaths of the unit owned by the players in Force 1

So setting Force 1 to Three when there are 4 people in Force 1 will make there be twelve deaths for Force 1 of the unit. (3x4)

Replacing player 1 with force 1 probably won't work very well because of this reason.

Maybe you could set the deaths for all players and then copy the triggers for all the players, but read it as current player.

Then, run only player 1's ones if he's there. If not, then Player 2. If Player 1 and 2 are gone, then run the triggers for player 3 and so forth.

It might be a bit of work but its the only sure method I can think of.

I don't know what TD stands for but if there are only 2 opposing teams, then you only need to do it for 1 team



None.

Jul 26 2008, 6:29 am Falkoner Post #3



Well, I don't think that death counts actually go with a player when they leave, from what I've tested, the player doesn't need to be there to use their deaths, but maybe leaving has a different effect, I usually make sure I use computers for global variables just in case though.



None.

Jul 26 2008, 6:40 am Kaias Post #4



Quote from Falkoner
Well, I don't think that death counts actually go with a player when they leave, from what I've tested, the player doesn't need to be there to use their deaths, but maybe leaving has a different effect, I usually make sure I use computers for global variables just in case though.
Same but, it is 8 player apparently.

I was wondering about that too. But the triggers still will be disabled. So if what Falkoner says is the case, then only do the second part of my post.



None.

Jul 26 2008, 10:56 am NudeRaider Post #5

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

TD is Tower Defence afaik.

Giving the dc modify triggers to All Players and modifying a specific player's dc (e.g. P1) is the only way. But you have the problem to prevent the others from running their modify trigger or your timers might run with <number of players> times the speed.

I've thought about it and noticed this isn't trivial. But I think I've found a solution:

All Players
Conditions:
All Players have suffered at most 0 deaths of 'flag dc'
Actions:
Set 'flag dc' of All Players to 1
Set 'flag dc' of Current Player to 0
Preserve Trigger

[... insert your dc modify triggers here ...]
Those dc modify triggers all have this condition:
Current Player has suffered at most 0 deaths of 'flag dc'
And modify P1's death count in the actions.

All Players
Conditions:
Always
Actions:
Set 'flag dc' of Current Player to 0
Preserve Trigger

Trigger order is important here.

What it will do is the follwing:
The first active player detects 0 deaths for 'flag dc' and sets all other player's dc to 1 thus preventing them from running their dc modify triggers.
The last trigger makes sure the dc is set to 0 for all players after the trigger loop is done.




Jul 26 2008, 11:10 am KrayZee Post #6



"Current player" would be the best damn option if you want it to work for all.



None.

Jul 26 2008, 11:19 am NudeRaider Post #7

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

Quote from KrayZee
"Current player" would be the best damn option if you want it to work for all.
Uhm, yes but the question is how to make it work for only one.




Jul 26 2008, 11:22 am KrayZee Post #8



Quote from NudeRaider
Quote from KrayZee
"Current player" would be the best damn option if you want it to work for all.
Uhm, yes but the question is how to make it work for only one.
And by "Current Player", it can easily be brought down to who should own it later. So you do not have to put "Force 1", "Player 2", whatever. As I repeat, "Current player" would be the best damn option.



None.

Jul 26 2008, 11:24 am NudeRaider Post #9

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

Quote from KrayZee
And by "Current Player", it can easily be brought down to who should own it later. So you do not have to put "Force 1", "Player 2", whatever. As I repeat, "Current player" would be the best damn option.
elaborate




Jul 26 2008, 11:30 am KrayZee Post #10



Quote from NudeRaider
Quote from KrayZee
And by "Current Player", it can easily be brought down to who should own it later. So you do not have to put "Force 1", "Player 2", whatever. As I repeat, "Current player" would be the best damn option.
elaborate
"Force 1" will cause problems, as it would be affect ALL players under Force 1. If LosTZealoT happened to leave only Player 1 under Force 1, then OF COURSE it is going to cause many problems. If all human players are under Force 1, whoever has a unit of control can be easily used as "Current player". If Player 1 commands nothing, action triggers can give anyone in the highest score or under Player 1 (Which would be Player 2) the control which is very simple.

Don't try and make this sound so complicated.



None.

Jul 26 2008, 6:28 pm LosTZealoT Post #11



Thanks for all these great responses, they've helped me understand this mess a lot better.I think I can solve this now.

Idea:
As stated, I use Current Player in place of Force 1 in the Conditions(Current Player has suffered x deaths of unit). Actions I leave as Force 1(Set force 1 deaths of unit to x). I then place a random unit, say a data disc on the map. I give this unit to Player 1 when hes in the game, Player 2 if player 1 is missing, Player 3 if 1 and 2 are missing, etc...
To all the triggers requiring these global DCs, I add the Current Player commands the most Data Discs to ensure the trigger is fired for only 1 player. The trigger is placed in either Force 1 or All Players(The are the same on my map).



None.

Jul 26 2008, 10:48 pm NudeRaider Post #12

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

Nice Idea, LosTZealoT. The datadisc can just be passed on from P12 (the player who owns all leaver's units). Preplace it for P12.
It's easier than my dc system, although not completely invisible.
I think you want to do it this way, but I'll mention it to be sure:
Have the dc modifier triggers owned by All Players, then run them only for the player owning the disc and modify P1's deaths.


Quote from KrayZee
"Force 1" will cause problems, as it would be affect ALL players under Force 1. If LosTZealoT happened to leave only Player 1 under Force 1, then OF COURSE it is going to cause many problems. If all human players are under Force 1, whoever has a unit of control can be easily used as "Current player". If Player 1 commands nothing, action triggers can give anyone in the highest score or under Player 1 (Which would be Player 2) the control which is very simple.

Don't try and make this sound so complicated.
As LosTZealoT has proven the solution is not complicated, but I still fail at understanding what your solution would be. Simply stating that Current Player is the key doesn't explain how you would implement it. Also your sentences make no sense:
Quote from KrayZee
If Player 1 commands nothing, action triggers can give anyone in the highest score or under Player 1 (Which would be Player 2) the control which is very simple.
What is an action trigger? The dc modify trigger?
Who is the "one in the highest score"?
Give the control of what?
And still you haven't said anything about how you intend to stop the other players from running the dc modify triggers.

... wait... Now after reading this sentence
Quote from KrayZee
If all human players are under Force 1, whoever has a unit of control can be easily used as "Current player"
a few times and having LZ's solution in mind I understand what you were trying to get at.
You place a unique unit (the "unit of control") which is always owned by a single present player. And this player, Current Player, executes the dc modify triggers...
Yeah thats what LZ will do. But seriously couldn't you express what you mean a little clearer?




Jul 26 2008, 11:12 pm LosTZealoT Post #13



Thanks for all the clarification, Nuke. I think I get what everyone's been saying now. But, after rethinking a test I ran with a friend(2 players were in the game, me and my friend), I believe that DCs are not preserved if a player leaves. I have an Intro that has multiple steps. Each Step was recorded by a Force 1 DC. After a step was done, it moved on to the next step using Set Force 1 deaths. Thanks to this discussion, we know Force 1 Deaths Condition tests the sum and Set Deaths Force 1 to x Action sets everyone on Force 1's DC to value x. When Step 1(0 Deaths) was complete, it rushed to step 3(2 Deaths) and after that, it moved passed step 4(3 Deaths) to non-existent step 5. I decided to leave and after that, my friend reported that the map started functioning properly. Im guessing this is b/c the Force 1 sum had dropped due to my absence. This might mean that Force 1 test is off or DCs are not preserved after a player leaves. I don't know about if a player isn't there to start though, so that might still work...



None.

Jul 27 2008, 1:18 am KrayZee Post #14



Quote from LosTZealoT
As stated, I use Current Player in place of Force 1 in the Conditions
Enough said. Current player is obvious, NudeRaider, YOU are making what is so simple, sound so complicated. Why is that? It's a no brainer, NudeRaider, think of the obvious...



None.

Jul 27 2008, 11:57 am Kaias Post #15



Quote
I decided to leave and after that, my friend reported that the map started functioning properly. Im guessing this is b/c the Force 1 sum had dropped due to my absence. This might mean that Force 1 test is off or DCs are not preserved after a player leaves. I don't know about if a player isn't there to start though, so that might still work...
Force 1 reads the sum of the players currently in the game. So if you leave, whatever yours is is how much its going to drop for the Force you're in.

Guess I should've specified that the first time.



None.

Jul 27 2008, 2:23 pm JaFF Post #16



Quote from Kaias
Reading from Force detects the sum of the deaths of the unit owned by the players in Force 1
Is it me or does this test map contradict your statement? If it counted the sum of the players in the force, it wouldn't have craeted the marines, no?

Attachments:
DC test.scm
Hits: 1 Size: 34.6kb



None.

Jul 27 2008, 3:02 pm Ahli Post #17

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

Quote from JaFF
Quote from Kaias
Reading from Force detects the sum of the deaths of the unit owned by the players in Force 1
Is it me or does this test map contradict your statement? If it counted the sum of the players in the force, it wouldn't have craeted the marines, no?
It's you, Jaff.
Kaias means that the Condition:
"Force 1 has exactly # deaths of unit" is the sum of the player's death counts of that unit.

He did not ment the trigger owner like you thought, Jaff.
I changed the map to show what you should have done instead...

Post has been edited 1 time(s), last time on Jul 27 2008, 3:02 pm by Ahli. Reason: forgot to press the attach this button -,-




Jul 27 2008, 4:29 pm JaFF Post #18



I see. Sorry for the confusion.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[05:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[05:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[03:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[12:51 am]
Oh_Man -- definitely EUD
[09:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[09:35 pm]
Vrael -- that is insane
[09:35 pm]
Vrael -- damn is that all EUD effects?
[2024-5-04. : 10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
Please log in to shout.


Members Online: jjf28