I am working on my first map which is a creep spawning map. But I can't seem to find a way to run triggers depending on the difficulty the player has selected. For Example I have Normal and Hard, I would like to have it setup like If Difficulty = Normal Then run trigger Normal Spawns & Stop or Pause trigger Hard Spawns, If Difficulty = Hard, Then run trigger Hard Spawns & Stop or Pause trigger Normal Spawns.
Ive been going through the scripts for awhile and haven't made any progress. Could anyone help me out please?
I'm not entirely sure what you mean.... If you use "if then else" you could just make a condition
(Difficulty level for player (<Player Number>)) == <Difficulty>
I'm not sure if that helps at all...but I'm afraid I don't entirely understand your question.
In the lobby before they start the game, There will be Normal and Hard to choose from. I would like to use different scripts for each mode, to make them harder.
There are two ways to do this... one is easier to understand, but a lot more code and a lot "messier".
The other way is nicer, but a bit more complex.
The simplest way is like Airolden said. Under "Conditions" - "Player" there is a "difficulty for player" option... If each of your waves is a seperate trigger, you could run logic in each wave, and spawn different units based on that condition.
The other way, which is nicer, and more flexible, is to set up a list of variables, and simply assign values to those variables.
If you have a different unit for each difficulty, you can do something like... If (Difficulty is Normal) then do multiple actions... UnitsArray[0] = NormWave01 . UnitsArray[1] = Normwave02 etc... Then when you spawn a wave, you simply use UnitsArray[waveNumber].
NOTE: this also puts all your data in one location, and makes it WAYWAY easier to change up waves and such. You should ALWAYS do this...
If you have the same unit for each difficulty and simply scale their stats you can do something like... If (Difficulty is Normal) then WaveStatCoefficient = 1.0 . else if (Difficulty is Hard) then WaveStatCoefficient = 1.15 . Then, for each wave, when you spawn the unit, you can deal with scaling it's stats.
Several other ways, but these seemed closest to your question.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I am working on my first map which is a creep spawning map. But I can't seem to find a way to run triggers depending on the difficulty the player has selected. For Example I have Normal and Hard, I would like to have it setup like If Difficulty = Normal Then run trigger Normal Spawns & Stop or Pause trigger Hard Spawns, If Difficulty = Hard, Then run trigger Hard Spawns & Stop or Pause trigger Normal Spawns.
Ive been going through the scripts for awhile and haven't made any progress. Could anyone help me out please?
@n7Downside: Go
I'm not entirely sure what you mean.... If you use "if then else" you could just make a condition (Difficulty level for player (<Player Number>)) == <Difficulty>
I'm not sure if that helps at all...but I'm afraid I don't entirely understand your question.
@Airolden: Go
In the lobby before they start the game, There will be Normal and Hard to choose from. I would like to use different scripts for each mode, to make them harder.
There are two ways to do this... one is easier to understand, but a lot more code and a lot "messier". The other way is nicer, but a bit more complex.
The simplest way is like Airolden said. Under "Conditions" - "Player" there is a "difficulty for player" option... If each of your waves is a seperate trigger, you could run logic in each wave, and spawn different units based on that condition.
The other way, which is nicer, and more flexible, is to set up a list of variables, and simply assign values to those variables.
If you have a different unit for each difficulty, you can do something like... If (Difficulty is Normal) then do multiple actions... UnitsArray[0] = NormWave01 . UnitsArray[1] = Normwave02 etc... Then when you spawn a wave, you simply use UnitsArray[waveNumber].
NOTE: this also puts all your data in one location, and makes it WAYWAY easier to change up waves and such. You should ALWAYS do this...
If you have the same unit for each difficulty and simply scale their stats you can do something like... If (Difficulty is Normal) then WaveStatCoefficient = 1.0 . else if (Difficulty is Hard) then WaveStatCoefficient = 1.15 . Then, for each wave, when you spawn the unit, you can deal with scaling it's stats.
Several other ways, but these seemed closest to your question.