I suck with triggers but how do you make a trigger that every 30 seconds if a unit is in the region it gives minerals to the player that owns the unit?
I've worked out a very simple possibility of doing this. Note I haven't tested anything.
I don't like just handing out fully working and efficient triggers since the best way to learn something is by figuring it out yourself, not copy pasting.
But here's something to give you a start.
Requirements: 1 Global Variable with the type as Unit to track which unit was first to enter the region so you can track who is currently in control.
Unit Enters Region
Unit - Any Unit Enters (Entire map)
Variable - Set Current Unit in Region = (Triggering unit)
General - Repeat (Actions) forever
General - Wait 30.0 Game Time seconds
Player - Modify player (Owner of (Triggering unit)) Minerals: Add 100
Unit Leaves Region
Unit - Any Unit Leaves (Entire map)
(Triggering unit) == Current Unit in Region
Trigger - Stop all instances of Unit Enters Region
You must login to post a comment. Don't have an account? Register to get one!