I tried what Mille suggested and it works really well! I hadn't thought about that hybrid solution yet. I guess if I want the time to be variable I can just do SetUnitBehaviorDuration after I have addded the behavior. So basically I should try to stay away from triggers whenever possible if I want the most performant result?
Thanks for pointing out how to add minerals through a behavior spool, generally I'll have to do the "effect" through triggers though because the data editor just doesn't allow me to give variable outcomes based on variables from the trigger editor.
Let's say I want to give the player some minerals every 60 seconds a unit is alive. Let's say the unit amount is rather high: 200 units. I see two ways how to do this through triggers.
(1) I can create a repeating 60 seconds timer for each unit when they are created and make the unit keep track which timer it has. It'll add the minerals when the timer expires.
(2) I can also create one repeating 0.1 seconds timer and add units to it that track their time and give them a starting time so you can correct them for starting somewhere between and update.
I could do this specific example through the data editor, but I'd like to know how to do this through triggers for different cases.
Now I wondered what would be the best way to do this and what the reason behind it is. I know this alone might not have so much impact but I think things will stack up with what I'm creating.
I'm working on a mod but I've got a bit stuck on the concept. So that's why I'm asking for your feedback. :) This is the concept I have now:
Overview: 4 player coop survival mod that focuses on using units efficiently and tries to stick to the original starcraft II gameplay as much as possible.
During a round:
In a round enemy units spawn every x amount of seconds until all units have spawned for that round.
The AI patrols a certain region.
The round is completed when all enemy units have been killed.
At the end of a round:
The players are rewarded a set amount of minerals.
The players get their selected units back.
The players their living units get full health, shield and energy.
Between two rounds:
A player can buy the regular starcraft 2 armor, shield and weapon upgrades with their minerals.
A player can "promote" a unit, that unit gets slightly improved statistics, but when killed will respawn as regular unit again (not yet implemented).
The game ends when:
Survivors lose: the survivors no longer have any units.
Survivors win: all the round have been completed.
Squad selection:
Done at the start of a game.
Preset squad configuration.
Misc:
Enemy units size gets scaled based on players amount.
Rounds get harder every time by giving the enemy more units and more unit types and upgrades.
Currently you can select only one protoss preset squad.
All unit abilities will be given on the start of the game.
Everything outside a certain area is filled with creep and will be made inaccessible someway.
Player has vision inside this certain area.
Nothing of this is set in stone and I'll really would like to hear your feedback on things like respawning, game-end conditions, unit types, tactical terain, etc. A problem of the idea the way it is now, for example, is that it doesn't allow a big variety of units without opening some big exploits.
I have published the map, named Squad Survival, on battle-net in the EU and US zone so you can take a look yourself if you want. It currently only has two rounds.
Wow, thanks for all the information. I''ll need to read all this through a couple of times to fully understand everything that's been said here, but I am learning a lot of this.
My original question has been more than answered, thank you! :)
This is a great community, it's really giving me a boost to my motivation.
That's seems like a really nice way to handle events. Makes sense not to have two triggers track the same action. I'll start merging events and use that from now on.
For the initialization, I do like the idea that the "initialization blocks" aren't added to the actions list. Is there some way to hide those functions from the list after I've used them?
That's not really what I meant, but thanks for the information anyways. :)
I'll try to clarify with an example:
I have one trigger that is run when the game initializes. That trigger does things like setup the AI, light up monolyth bridges, set up UI, set up revealers, etc. Right now, all those setups are in one trigger but I want to have a separate "block" for each. I want to know whether it's better to seperate it into action functions or triggers.
I want to split my initialization trigger in several blocks to clear my code up a bit. I see blizzard maps using both triggers and trigger run for splitting this (StarCraft Master, Aiur Chef, Left 2 Die) and action functions (StarJeweled). I thought action functions would be the best method but now I am not so sure anymore. Would appreciate it if someone could clear this up a bit.
0
Thanks for your advises!
I tried what Mille suggested and it works really well! I hadn't thought about that hybrid solution yet. I guess if I want the time to be variable I can just do SetUnitBehaviorDuration after I have addded the behavior. So basically I should try to stay away from triggers whenever possible if I want the most performant result?
Thanks for pointing out how to add minerals through a behavior spool, generally I'll have to do the "effect" through triggers though because the data editor just doesn't allow me to give variable outcomes based on variables from the trigger editor.
0
Hello Everyone,
Let's say I want to give the player some minerals every 60 seconds a unit is alive. Let's say the unit amount is rather high: 200 units. I see two ways how to do this through triggers.
(1) I can create a repeating 60 seconds timer for each unit when they are created and make the unit keep track which timer it has. It'll add the minerals when the timer expires. (2) I can also create one repeating 0.1 seconds timer and add units to it that track their time and give them a starting time so you can correct them for starting somewhere between and update. I could do this specific example through the data editor, but I'd like to know how to do this through triggers for different cases.
Now I wondered what would be the best way to do this and what the reason behind it is. I know this alone might not have so much impact but I think things will stack up with what I'm creating.
0
Hello everyone,
I'm working on a mod but I've got a bit stuck on the concept. So that's why I'm asking for your feedback. :) This is the concept I have now:
Overview: 4 player coop survival mod that focuses on using units efficiently and tries to stick to the original starcraft II gameplay as much as possible.
During a round:
At the end of a round:
Between two rounds:
The game ends when:
Squad selection:
Misc:
Nothing of this is set in stone and I'll really would like to hear your feedback on things like respawning, game-end conditions, unit types, tactical terain, etc. A problem of the idea the way it is now, for example, is that it doesn't allow a big variety of units without opening some big exploits.
I have published the map, named Squad Survival, on battle-net in the EU and US zone so you can take a look yourself if you want. It currently only has two rounds.
0
Wow, thanks for all the information. I''ll need to read all this through a couple of times to fully understand everything that's been said here, but I am learning a lot of this.
My original question has been more than answered, thank you! :)
This is a great community, it's really giving me a boost to my motivation.
0
@Mille25: Go
That's seems like a really nice way to handle events. Makes sense not to have two triggers track the same action. I'll start merging events and use that from now on.
For the initialization, I do like the idea that the "initialization blocks" aren't added to the actions list. Is there some way to hide those functions from the list after I've used them?
0
@fishy77: Go
That's not really what I meant, but thanks for the information anyways. :)
I'll try to clarify with an example: I have one trigger that is run when the game initializes. That trigger does things like setup the AI, light up monolyth bridges, set up UI, set up revealers, etc. Right now, all those setups are in one trigger but I want to have a separate "block" for each. I want to know whether it's better to seperate it into action functions or triggers.
0
Hello everyone,
I want to split my initialization trigger in several blocks to clear my code up a bit. I see blizzard maps using both triggers and trigger run for splitting this (StarCraft Master, Aiur Chef, Left 2 Die) and action functions (StarJeweled). I thought action functions would be the best method but now I am not so sure anymore. Would appreciate it if someone could clear this up a bit.