Deaths/Forces
Apr 21 2008, 1:09 am
By: Vrael  

Apr 21 2008, 1:09 am Vrael Post #1



Say P1-P4 are in force 1. Now say P3 leaves.

Conditions:
W/e.
Actions:
Set deaths for Force 1 to 5 for Cantina

Does P3 have 5 deaths of Cantina?



None.

Apr 21 2008, 1:40 am Falkoner Post #2



As long as the trigger isn't under Player 3, then yes, the player should get the deaths.



None.

Apr 21 2008, 2:40 am DT_Battlekruser Post #3



The trigger will not, however, execute for player 3 once player 3 leaves. If the trigger was, for example, set deaths for current player under force 1, player 3 would not be affected. Just clearing that up; it's pretty unclear above.

You should avoid using a "force" grouping in both the owner and the body of a trigger because it is bad form and risks multiplication errors. (e.g. force 1 // add 5 deaths to force 1 would add 5 deaths per player, probably not what you are expecting).




None.

Apr 21 2008, 3:23 am Vrael Post #4



Ah yea, it was for "Force 1"
But P1 is still in the game, so it WILL set the deaths for P3 even thought P3's trigger won't run, correct?


As for the "bad form" comment, there's no such thing as "form" lol, there's only what works correctly, and what does not work correctly.

I particularly avoided the "add deaths" command in using the Force rather than individual players, but I'm hoping to be able to simply make a Force trigger to save myself some work, so I will not avoid using Force unless I have to. Thanks for pointing that out though, because it might Set it to 5 four times, whereas I might only want it Set once.



None.

Apr 21 2008, 3:49 am Demented Shaman Post #5



Quote from Vrael
As for the "bad form" comment, there's no such thing as "form" lol, there's only what works correctly, and what does not work correctly.
I would disagree. While there isn't really universally accepted and standardized "form" or convention which mappers adhere to, following certain conventions allow for easier to follow triggers as well as limiting the possibility for error such as the one DTBK pointed out. Avoiding forces is also a good idea if trigger order matters. Overall it avoids confusion in the long run. In the end it's entirely your choice to whether to follow "form" or not, but you can't say it does not exist, even if what you think is bad form is different from what DTBK thinks. However, if you're comfortable with using forces and know what you're doing then by all means do it.

Avoiding forces also doesn't mean it takes more time to create the trigger, instead of applying the trigger to a force you just apply it to the players in the force (checking them off). This is so what you can see each copy of the trigger in the list of each player's triggers.

It's really no different than actual programming languages.
http://en.wikipedia.org/wiki/Programming_style
http://en.wikipedia.org/wiki/Code_conventions



None.

Apr 21 2008, 7:38 am NudeRaider Post #6

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 Vrael
Ah yea, it was for "Force 1"
But P1 is still in the game, so it WILL set the deaths for P3 even thought P3's trigger won't run, correct?
No.
It will set P3's death if you use Player 3 explicitly but when he left he won't be included in triggers affecting the force.




Apr 21 2008, 1:02 pm Falkoner Post #7



Are you certain of that Nude? It's not under Force 1, it's adding the deaths TO force 1, otherwise I would think the same thing.



None.

Apr 21 2008, 4:13 pm NudeRaider Post #8

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

I am certain.
At least when the player was never there, and I'd say it's safe to assume that the triggers won't work differently if the player was there but isn't anymore. Unfortunately I can't test trigger behavior of leavers when I'm alone. ;)




Apr 21 2008, 9:37 pm Vrael Post #9



Quote from name:devilesk
I would disagree. While there isn't really universally accepted and standardized "form" or convention which mappers adhere to,
That's all I meant.

I might as well just go test this myself, no offence Nude but I'd rather not assume it's the same.

Fat lot of help you guys were :P
I'm only joking, thanks for your consideration



None.

Apr 21 2008, 10:07 pm NudeRaider Post #10

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 Vrael
I might as well just go test this myself, no offence Nude but I'd rather not assume it's the same.
Why?
There's no sign in any other trigger behavior known to me that Neutral Players (Leavers) have different rules than Ghost Players (Open Slots). Why should this case be any different?
The only difference is that leavers have units which are given to another player (P12) where open-slot-players do not get any units created to give to P12.
So I'm positive triggers affecting the force won't affect leavers. Period.




Apr 22 2008, 2:37 am Falkoner Post #11



But if you create a unit under a force for Ghost Players, it creates it for all players, those there or not, so I assume that it will still run the trigger since it's affecting the player, he has it AFFECTING them, not running it FOR them.

If you REALLY want to make sure, make a test map and I can test it(I have 2 computers)



None.

Apr 22 2008, 3:47 am Demented Shaman Post #12



Quote from Vrael
I might as well just go test this myself, no offence Nude but I'd rather not assume it's the same.
Testing yourself is always the best and most conclusive option, and most of the time the fastest especially when it comes to little things like this.

I don't even remember a lot of these things offhand, when I usually just test for little things like this when I need to use them.



None.

Apr 22 2008, 4:13 am rockz Post #13

ᴄʜᴇᴇsᴇ ɪᴛ!

Quote from Falkoner
But if you create a unit under a force for Ghost Players, it creates it for all players, those there or not, so I assume that it will still run the trigger since it's affecting the player, he has it AFFECTING them, not running it FOR them.

If you REALLY want to make sure, make a test map and I can test it(I have 2 computers)
Code
Trigger("Force 1"){
Conditions:
    Always();
Actions:
    Create Unit("Force 1", "Terran Marine", 1, "Anywhere");
}
//-----------------------------------------------------------------//


creates 1 unit when there is only 1 player in the game.

Post has been edited 1 time(s), last time on Apr 22 2008, 5:11 pm by rockz.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Apr 22 2008, 4:24 am Falkoner Post #14



Do you have multiple players under Force 1, and did you try testing it when a player leaves vs. when they aren't there to begin with?



None.

Apr 22 2008, 5:14 am Wormer Post #15



Quote
Unfortunately I can't test trigger behavior of leavers when I'm alone. ;)
I think you can imitate leavers by executing defeat to computer player.

I've made a test map. Results are surprizeing. CreateUnit and SetDeaths behave differently in this situation.
Just have a look the test map.

Attachments:
ForceTest.scx
Hits: 3 Size: 39.07kb



Some.

Apr 22 2008, 5:14 am Wormer Post #16



OUPS, double post, sorry. Deleted.



Some.

Apr 22 2008, 5:35 am DT_Battlekruser Post #17



Just to say, while form is not required, it is often necessary in any kind of group environment. Form is the difference between this (bad)

Code
public     abstract




void
renderGame
(

Graphics
g) ;


and this (good)

Code
public abstract void renderGame(Graphics g);


The compiler doesn't really care which one you use, but most people consider it a poor job not to use some form.



None.

Apr 22 2008, 8:01 am NudeRaider Post #18

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 Wormer
think you can imitate leavers by executing defeat to computer player.

I've made a test map. Results are surprizeing. CreateUnit and SetDeaths behave differently in this situation.
Just have a look the test map.
Good idea with a leaver. It's no difference if a human player or a comp leaves the game.

But in what way were the results surprising?
I got both units created AND the deaths message for me (P1), the regular teal comp playing (P3) and the neutral orange comp (P5).
That's pretty much what I have expected. Players defeated, at open slots and without Start Location neither got created a unit nor had a death added.

Btw. Falk, take this map as the requested test map, it has 2 human slots and kindly tell us if it made any difference. Be sure to leave with one of your computers within 5 seconds (or increase the time of P8).




Apr 22 2008, 9:04 am Wormer Post #19



Quote
But in what way were the results surprising?
I got both units created AND the deaths message for me (P1), the regular teal comp playing (P3) and the neutral orange comp (P5).
That's pretty much what I have expected. Players defeated, at open slots and without Start Location neither got created a unit nor had a death added.
I've tested this on single player and got messages disagree with created units. I didn't remember quite well now (and can't check it now) but, for example I have not got the message for neutral player...



Some.

Apr 22 2008, 10:24 am NudeRaider Post #20

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

Interesting. Obviously the rules are different in single player and bnet.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[06:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Roy