@NobMapster:
Regions
Events
Unit - Any Unit Enters Death Region
Unit - Any Unit Enters Register Region
Local Variables
Conditions
Actions
General - If (Conditions) then do multiple (Actions)
If Then Else
General - Else if (Conditions) then do (Actions)
Else If
(Triggering region) == Register Region
(Unit type of (Triggering unit)) == Zealot
Then
Unit Group - Add (Triggering unit) to Zealots
General - Else if (Conditions) then do (Actions)
Else If
(Triggering region) == Death Region
(Unit type of (Triggering unit)) == Zealot
Then
Unit - Kill (Triggering unit)
If you need a coded example, i'll send you the map.
@Vietman:
Directly after you move the unit, make a new action like this:
Unit - Order (Triggering unit) to ( Stop) (Replace Existing Orders)
Triggering unit should be replaced with the proper return call.
When I send a unit that was added to the unit group named "Zealots" into the DeathRegion (Region002), they die as intended. However, when I send a unit that was not in the unit group into the RegisterRegion (Region001) which is supposed to add them to the unit group "Zealots", and then into the DeathRegion, they don't die. They do, however, get added to the control group 1 like I added into the trigger to show some kind of verification in game that the unit is interacting with the region. The trigger looks more interesting, but I'm right back to where I started. What am I doing wrong? I have attached a picture of what I have currently.
@NobMapster:
This might be a bug within the editor. After the very last action, make a text message display. It should NOT display. If it does NOT, then remove the first condition on the bottom part (triggering unit is in zealots). Test if that works and tell me.
Updating does not bump messages :).
How do you order a unit to attack X Point/Region? I tried to do it and everything failed, hard.
My other question was, what are the triggers for creating wave spawns in a Tower Defense? I tried pausing a video and looking at them but the quality was really bad. :(
You want something like this:
Unit - Order ([your unit]) to ( Attack targeting [your point]) (Replace Existing Orders)
or this for a region:
Unit - Order ([your unit]) to ( Attack targeting Center Of Region([your region])) (Replace Existing Orders)
Make sure that when you select the Issue Order action in the editor, it shows that the order type you're trying to issue (in the editor box below the actual trigger data) is an Order Targeting Point.
For that, you store the wave data somehow (arrays of variables or something) then use the Create Units Facing Angle to create units, then Issue Order with a For Each Picked Unit (or an Issue Order To Unit group; that didn't work for me, but that might not be the action's fault) to move to each waypoint on whatever path the waves go.
@StatusQ3:
RCIX answered your first question correctly, however, i'll go deeper into the second.
This would set up a wave with everything:
------- Set Wave Target
AI - Set the target for player Player 2 attack waves to (Player group(Player 1))
------- Set the attack wave gathering point for AI player
AI - Set the attack wave gather point to Point for player Player 2
------- Attack Wave
AI - Add (4 / 4 / 6 / 8) Zergling to the attack wave
AI - Send the attack wave from player Player 2 to attack in 10 seconds and Wait
There ya have it.
I will do this when I get home but first a quick question. If I remove the Triggering unit is in Zealots condition, wont this kill any unit that enters the region?
I know the kill unit command is working because the two units I manually assigned to the Unit Group "Zealots" in the editor do die when they enter the region. The only thing that doesnt appear to be working is the add unit to unit group command. Along with the add unit to unit group command I have another action that works fine. (Adds units that enter the region to Control Group 1 of Player 1) So I can see that entering the region is doing atleast that action. I can't understand why it would be doing one and not the other. But as I said I will try what you have suggested and let you know what happens. Should be able to update in about an hour.
Thank you for your help.
This might be a bug within the editor. After the very last action, make a text message display. It should NOT display. If it does NOT, then remove the first condition on the bottom part (triggering unit is in zealots). Test if that works and tell me.
Updating does not bump messages :).
----
Added a transmission to send to all players when a unit in the Unit Group Zealots enters the DeathRegion.
Result: When the units that I manually added into "Zealots" entered the DeathRegion, they were killed and the transmission played. Units that were sent into the Register region to be added to Zealots and then moved to the DeathRegion did not die, but were still added to CONTROL group 1 for player 1.
Removed condition: ((Triggering unit) is in Zealots) == true
Result: ANY unit moved into DeathRegion dies upon entry
Here's another question.. I have this trigger:
UI - Display text crawl for (All players) with title "Text", text "Text", and max duration 8.0 seconds (play 30 Second Silence once, and loop TextCrawlType (Unnamed) as characters type)
But it will not display at all. Is there anything I did wrong?
Another question...I'm trying to set up a system where if a player clicks on a Dialog Box it subtracts X minerals and gambles for a random asset? Like, say it will give you minerals, a new unit or nothing...I know how to create the dialog box, display it, along with the dialog box item, but no idea how to connect it to the rest for gambling
@StatusQ3:
Create a variable called Random with an array of 14
Easy, create a function and run it when dialog button is clicked.
Function Gamble
Parameters Player (int)
Actions
Set Random to Random number between 1 and 3 (inclusive) (Inclusive means it will include 12, and 3, exclusive will only include 2)
If Then Else-If
General - If (Conditions) then do multiple (Actions)
If Then Else
General - Else if (Conditions) then do (Actions)
Else If - Random = 1
Then - Action 1
General - Else if (Conditions) then do (Actions)
Else If - Random = 2
Then - Action 2
General - Else if (Conditions) then do (Actions)
Else If - Random = 3
Then - Action 3
When I send a unit that was added to the unit group named "Zealots" into the DeathRegion (Region002), they die as intended. However, when I send a unit that was not in the unit group into the RegisterRegion (Region001) which is supposed to add them to the unit group "Zealots", and then into the DeathRegion, they don't die. They do, however, get added to the control group 1 like I added into the trigger to show some kind of verification in game that the unit is interacting with the region. The trigger looks more interesting, but I'm right back to where I started. What am I doing wrong? I have attached a picture of what I have currently.
Bump..just because I don't know if updating a post bumps it or not. :)
How do you order a unit to attack X Point/Region? I tried to do it and everything failed, hard.
My other question was, what are the triggers for creating wave spawns in a Tower Defense? I tried pausing a video and looking at them but the quality was really bad. :(
@StatusQ3: Go
You want something like this:
Unit - Order ([your unit]) to ( Attack targeting [your point]) (Replace Existing Orders)
or this for a region:
Unit - Order ([your unit]) to ( Attack targeting Center Of Region([your region])) (Replace Existing Orders)
Make sure that when you select the Issue Order action in the editor, it shows that the order type you're trying to issue (in the editor box below the actual trigger data) is an Order Targeting Point.
For that, you store the wave data somehow (arrays of variables or something) then use the Create Units Facing Angle to create units, then Issue Order with a For Each Picked Unit (or an Issue Order To Unit group; that didn't work for me, but that might not be the action's fault) to move to each waypoint on whatever path the waves go.
@obliviron: Go
I will do this when I get home but first a quick question. If I remove the Triggering unit is in Zealots condition, wont this kill any unit that enters the region?
@obliviron: Go
I know the kill unit command is working because the two units I manually assigned to the Unit Group "Zealots" in the editor do die when they enter the region. The only thing that doesnt appear to be working is the add unit to unit group command. Along with the add unit to unit group command I have another action that works fine. (Adds units that enter the region to Control Group 1 of Player 1) So I can see that entering the region is doing atleast that action. I can't understand why it would be doing one and not the other. But as I said I will try what you have suggested and let you know what happens. Should be able to update in about an hour. Thank you for your help.
Quote from obliviron:
@NobMapster:
This might be a bug within the editor. After the very last action, make a text message display. It should NOT display. If it does NOT, then remove the first condition on the bottom part (triggering unit is in zealots). Test if that works and tell me.
Updating does not bump messages :).
----
Added a transmission to send to all players when a unit in the Unit Group Zealots enters the DeathRegion.
Result: When the units that I manually added into "Zealots" entered the DeathRegion, they were killed and the transmission played. Units that were sent into the Register region to be added to Zealots and then moved to the DeathRegion did not die, but were still added to CONTROL group 1 for player 1.
Removed condition: ((Triggering unit) is in Zealots) == true
Result: ANY unit moved into DeathRegion dies upon entry
@obliviron:
It will but what I'm trying to get to work is entering a specified region will add a unit to a unit group.
Here's another question.. I have this trigger: UI - Display text crawl for (All players) with title "Text", text "Text", and max duration 8.0 seconds (play 30 Second Silence once, and loop TextCrawlType (Unnamed) as characters type)
But it will not display at all. Is there anything I did wrong?
Another question...I'm trying to set up a system where if a player clicks on a Dialog Box it subtracts X minerals and gambles for a random asset? Like, say it will give you minerals, a new unit or nothing...I know how to create the dialog box, display it, along with the dialog box item, but no idea how to connect it to the rest for gambling
I figured out the first question, never mind to that!
There's nothing that says entering unit to replace triggering unit with the in the trigger.. Or am I misunderstanding what you're saying?
@NobMapster:
Here, take this map, everything works just as intended :)
Thank you!