So i`m trying to script a boss. I want him to cast ground pound always if there is any enemy unit in 3 units arrea around him with 15s cd(I dont have any cost associated with it, just 15s cd. Also I have vortex ability, 5s cd, no cost, with 6 units arrea. Both skills arent working. Also is there any way to force unit to cast ability at a random location? Any idea why when I duplicated skill, the original skill name turned to the one from duplicate?
It is also worth mentioning that both that skills are duplicates of skills(one made by myself and one from the game) Ive checked requirements, validators, button requirement commands and everything looks fine.
I post ss with my current settings
Ty for answer, but i dont have HOTS :/, marking Auto cast initially on makes my unit use his abilities, but it uses now ground pound whenever its cd is off, there is no difference if my units are nearby.
I have Abort On Alliance Change on in flags as well as Excluded Player, Ally, Netrual in Auto Cast Filters.
Okay, didnt really know what Enumerate Area is here for, but it is working properly right now!
I shall try and post some of the trigger setup used by that boss.
Shuffle Barrage Locations
Options: Action
Return Type: (None)
Parameters
Grammar Text: Shuffle Barrage Locations()
Hint Text: (None)
Custom Script Code
Local Variables
index = 0 <Integer>
indexRandom = 0 <Integer>
barrageSwap = No Point <Point>
Actions
- This example shows you how to shuffle an array.
- Global variables:
- ShuffleArray - The array to be shuffled
- ShuffleArraySize - The size of the array
- In this example, the array is of type integer. You can make modifications to extend this to other
- array types and sizes.
General - For each integer index from 1 to (S4_ArchangelBarrageCount - 1) with increment 1, do (Actions)
Actions
Variable - Set indexRandom = (Random integer between index and S4_ArchangelBarrageCount)
General - If (Conditions) then do (Actions) else do (Actions)
If
indexRandom != index
Then
- Swap the position of the picked element with the last element
Variable - Set barrageSwap = S4_ArchangelBarrages[indexRandom]
Variable - Set S4_ArchangelBarrages[indexRandom] = S4_ArchangelBarrages[index]
Variable - Set S4_ArchangelBarrages[index] = barrageSwap
Else
Reset Barrage Locations
Options: Action
Return Type: (None)
Parameters
Grammar Text: Reset Barrage Locations()
Hint Text: (None)
Custom Script Code
Local Variables
i = 0 <Integer>
Actions
General - For each integer i from 1 to 100 with increment 1, do (Actions)
Actions
Variable - Set S4_ArchangelBarrages[i] = No Point
Archangel Attack - Missile Barrage (Stage 1)
Events
Local Variables
RandomUmojanTarget = No Unit <Unit>
Conditions
GameOver == False
InCinematic == False
S4_ArchangelFlying == False
S4_ArchangelStage == 1
Actions
- BEGIN BARRAGES
Reset Barrage Locations()
Do Missile Barrage(((Position of THE_ONE_KERRIGAN) offset by (Random real between 0.2 and 0.5) towards (Random angle) degrees))
General - Wait 1.5 Game Time seconds
Variable - Set RandomUmojanTarget = (Random Living unit from (Any units in S4- Spaceport Final Battle owned by player PLAYER_03_UMOJAN matching Excluded: Missile, Dead, Hidden, Invulnerable, with at most Any Amount))
Do Missile Barrage((Position of RandomUmojanTarget))
General - Wait 1.5 Game Time seconds
Do Missile Barrage(((Position of THE_ONE_KERRIGAN) offset by (Random real between 0.2 and 0.5) towards (Random angle) degrees))
General - Wait 1.5 Game Time seconds
Variable - Set RandomUmojanTarget = (Random Living unit from (Any units in S4- Spaceport Final Battle owned by player PLAYER_03_UMOJAN matching Excluded: Missile, Dead, Hidden, Invulnerable, with at most Any Amount))
Do Missile Barrage((Position of RandomUmojanTarget))
General - Wait 1.5 Game Time seconds
Do Missile Barrage(((Position of THE_ONE_KERRIGAN) offset by (Random real between 0.2 and 0.5) towards (Random angle) degrees))
General - Wait 1.5 Game Time seconds
Variable - Set RandomUmojanTarget = (Random Living unit from (Any units in S4- Spaceport Final Battle owned by player PLAYER_03_UMOJAN matching Excluded: Missile, Dead, Hidden, Invulnerable, with at most Any Amount))
Do Missile Barrage((Position of RandomUmojanTarget))
- MISSILE BARRAGES COMPLETE
Do Missile Barrage
Options: Action
Return Type: (None)
Parameters
TargetPoint = No Point <Point>
Grammar Text: Do Missile Barrage(TargetPoint)
Hint Text: (None)
Custom Script Code
Local Variables
Actions
Unit - Order ARCHANGEL to ( Archangel - Fire Missile targeting TargetPoint) (After Existing Orders)
In short it picks a random location around the units and orders the ability/effect to be used at that point. You could use a create effect at point from unit action probably. Ask on the trigger forum for a better explanation.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
So i`m trying to script a boss. I want him to cast ground pound always if there is any enemy unit in 3 units arrea around him with 15s cd(I dont have any cost associated with it, just 15s cd. Also I have vortex ability, 5s cd, no cost, with 6 units arrea. Both skills arent working. Also is there any way to force unit to cast ability at a random location? Any idea why when I duplicated skill, the original skill name turned to the one from duplicate?
It is also worth mentioning that both that skills are duplicates of skills(one made by myself and one from the game) Ive checked requirements, validators, button requirement commands and everything looks fine. I post ss with my current settings
Thanks in advance!
Do like the archangel boss missile using triggers for the random stuff.
For the rest just use autocast with an Enummerate Area validator.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Ty for answer, but i dont have HOTS :/,
marking Auto cast initially on makes my unit use his abilities, but it uses now ground pound whenever its cd is off, there is no difference if my units are nearby. I have Abort On Alliance Change on in flags as well as Excluded Player, Ally, Netrual in Auto Cast Filters.Okay, didnt really know what Enumerate Area is here for, but it is working properly right now!
I shall try and post some of the trigger setup used by that boss.
Shuffle Barrage Locations Options: Action Return Type: (None) Parameters Grammar Text: Shuffle Barrage Locations() Hint Text: (None) Custom Script Code Local Variables index = 0 <Integer> indexRandom = 0 <Integer> barrageSwap = No Point <Point> Actions
-This example shows you how to shuffle an array.-Global variables:-ShuffleArray - The array to be shuffled-ShuffleArraySize - The size of the array-In this example, the array is of type integer. You can make modifications to extend this to other-array types and sizes. General - For each integer index from 1 to (S4_ArchangelBarrageCount - 1) with increment 1, do (Actions) Actions Variable - Set indexRandom = (Random integer between index and S4_ArchangelBarrageCount) General - If (Conditions) then do (Actions) else do (Actions) If indexRandom != index Then-Swap the position of the picked element with the last element Variable - Set barrageSwap = S4_ArchangelBarrages[indexRandom] Variable - Set S4_ArchangelBarrages[indexRandom] = S4_ArchangelBarrages[index] Variable - Set S4_ArchangelBarrages[index] = barrageSwap ElseReset Barrage Locations Options: Action Return Type: (None) Parameters Grammar Text: Reset Barrage Locations() Hint Text: (None) Custom Script Code Local Variables i = 0 <Integer> Actions General - For each integer i from 1 to 100 with increment 1, do (Actions) Actions Variable - Set S4_ArchangelBarrages[i] = No Point
Archangel Attack - Missile Barrage (Stage 1) Events Local Variables RandomUmojanTarget = No Unit <Unit> Conditions GameOver == False InCinematic == False S4_ArchangelFlying == False S4_ArchangelStage == 1 Actions
-BEGIN BARRAGES Reset Barrage Locations() Do Missile Barrage(((Position of THE_ONE_KERRIGAN) offset by (Random real between 0.2 and 0.5) towards (Random angle) degrees)) General - Wait 1.5 Game Time seconds Variable - Set RandomUmojanTarget = (Random Living unit from (Any units in S4- Spaceport Final Battle owned by player PLAYER_03_UMOJAN matching Excluded: Missile, Dead, Hidden, Invulnerable, with at most Any Amount)) Do Missile Barrage((Position of RandomUmojanTarget)) General - Wait 1.5 Game Time seconds Do Missile Barrage(((Position of THE_ONE_KERRIGAN) offset by (Random real between 0.2 and 0.5) towards (Random angle) degrees)) General - Wait 1.5 Game Time seconds Variable - Set RandomUmojanTarget = (Random Living unit from (Any units in S4- Spaceport Final Battle owned by player PLAYER_03_UMOJAN matching Excluded: Missile, Dead, Hidden, Invulnerable, with at most Any Amount)) Do Missile Barrage((Position of RandomUmojanTarget)) General - Wait 1.5 Game Time seconds Do Missile Barrage(((Position of THE_ONE_KERRIGAN) offset by (Random real between 0.2 and 0.5) towards (Random angle) degrees)) General - Wait 1.5 Game Time seconds Variable - Set RandomUmojanTarget = (Random Living unit from (Any units in S4- Spaceport Final Battle owned by player PLAYER_03_UMOJAN matching Excluded: Missile, Dead, Hidden, Invulnerable, with at most Any Amount)) Do Missile Barrage((Position of RandomUmojanTarget))-MISSILE BARRAGES COMPLETE Do Missile Barrage Options: Action Return Type: (None) Parameters TargetPoint = No Point <Point> Grammar Text: Do Missile Barrage(TargetPoint) Hint Text: (None) Custom Script Code Local Variables Actions Unit - Order ARCHANGEL to ( Archangel - Fire Missile targeting TargetPoint) (After Existing Orders)In short it picks a random location around the units and orders the ability/effect to be used at that point. You could use a create effect at point from unit action probably. Ask on the trigger forum for a better explanation.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
I dont understand much from what did you write. I used Random offset on periodic event, and I`m happy with the results.
The archangel uses a mix of triggers and data. It gets a much higher degree of randomness than a periodic effect with random offsets.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg