I try to add a trigger that does something like this:
Whenever any player has 0 units of a specific kind, that player loses the game.
In normal melee games, a player loses when he/she has 0 structures. This new trigger is suppose to go into a mod-file, which means it should work on any melee map where the mod-file is used.
How to make a trigger in a mod-file "overwrite" the Melee Initialization trigger in melee maps?
I don't know anything about how mods work so I can't help you in that regard, however...
It sounds to me like your defeat condition is stricter than the default melee defeat condition, so perhaps you don't have to worry about actually overwriting the default melee trigger, but rather, you just have to add in your own end game trigger. Something like:
Events:AnyunitdiesActions:PickeachplayerinAllPlayersanddoCheckDefeat(PickedPlayer)// where CheckDefeat is a placeholder for whatever your precise defeat condition would be,// probably something involving Number of Units in Unit Group == 0
Hm, sounds like a big workaround, but it might work.
Here is what I try to create:
Keep all triggers that comes from Melee initialization, except the losing condition. A player does NOT lose when he/she has no structures left. Instead shall the player lose if he/she has 0 units of a specific kind.
All of this will be kept within a mod-file, and when that mod-file is added into any melee map, those maps will gain the triggers.
Perhaps all triggers in Melee initialization must be recreated instead as many individual small triggers?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I try to add a trigger that does something like this:
Whenever any player has 0 units of a specific kind, that player loses the game.
In normal melee games, a player loses when he/she has 0 structures. This new trigger is suppose to go into a mod-file, which means it should work on any melee map where the mod-file is used.
How to make a trigger in a mod-file "overwrite" the Melee Initialization trigger in melee maps?
@Kabelkorven: Go
I don't know anything about how mods work so I can't help you in that regard, however...
It sounds to me like your defeat condition is stricter than the default melee defeat condition, so perhaps you don't have to worry about actually overwriting the default melee trigger, but rather, you just have to add in your own end game trigger. Something like:
Thanks, so you mean that the trigger I add into the mod-file will overwrite parts of the Melee initialization triggers?
The game shall not be over when a player has 0 structures, instead a player can only lose by having 0 of a specific type of unit.
Maybe you could bypass it by spawning structures outside the map (set the option to ignore placement) and making them invincible.
Hm, sounds like a big workaround, but it might work.
Here is what I try to create:
Keep all triggers that comes from Melee initialization, except the losing condition. A player does NOT lose when he/she has no structures left. Instead shall the player lose if he/she has 0 units of a specific kind.
All of this will be kept within a mod-file, and when that mod-file is added into any melee map, those maps will gain the triggers.
Perhaps all triggers in Melee initialization must be recreated instead as many individual small triggers?