It doesn't work because theres no region mentioned in the script., but i know you can add a (any region) preset in an action or event, but since i dont know how to use a parameter in a event definition, the 'unit enters any region' will most likely not work
No, I mean the ability to add Custom Events for GUI triggers is fked completely. I tried it to use it a few times but it generates bad galaxy script and results in script errors.
That would lag out the game since its a massing game. Zown control. I would like to check if an ability is targeted within a region, and then check if its empty of structures. After it would kill the triggering unit, and create a base.
How do you create a custom event (Ctr+Alt+E)? I would like to know if this would work:
TriggerAddEventUnitRegion(gt_EasierRegion, null, RegionEmpty(), true);
I would like to replace the RegionEmpty() with a parameter in the Definition.
P.S i think i couldve added a unit enters any region thing xD. AND i dont want to set 183 variables to 183 different regions
So did you answer your question yourself? I'm not sure -
Anyway, I'd like to add that, to my knowledge, custom events in GUI are fked and don't work.
@s3rius: Go
It doesn't work because theres no region mentioned in the script., but i know you can add a (any region) preset in an action or event, but since i dont know how to use a parameter in a event definition, the 'unit enters any region' will most likely not work
No, I mean the ability to add Custom Events for GUI triggers is fked completely. I tried it to use it a few times but it generates bad galaxy script and results in script errors.
@s3rius: Go
okay... *tear* ....i guess i have to set 183 variables to 183 regions T.T
You can use an action.
In your first post you already wrote down the right galaxy native.
What exactly do you want?
You have 183 regions and you have a trigger which should fire when you enter any one of them?
@s3rius: Go
That would lag out the game since its a massing game. Zown control. I would like to check if an ability is targeted within a region, and then check if its empty of structures. After it would kill the triggering unit, and create a base.
Then you only need a single event - Unit Uses Ability.
Instead of using a million regions you can probably use some math.
I suspect every of the cells has the same size and is a square. Using division you can calculate every cell's position:
Let's assume the length (and width) of a cell is 10.
cellLength (integer) = 10
targetX (Real) = X of target point of casted ability
targetY (Real) = Y of target point of casted ability
cellX (Integer) = (targetX / cellLength) * cellLength
cellY (Integer) = (targetY / cellLength) * cellLength
Your cell's region:
Region(cellX, cellY, cellX+cellLength, cellY+cellLength);
That won't work in this case because i have 3 different map parts, each used for different modes so it would be more of a fair game.
Edit:
I see the image now. Yes, this won't work then.
In this case I guess best you can do is to loop through every region and see if it's in bound >.<
ill give it a try thx xD
aw, what a waste of 40 minutes trying.....
well.... ill keep trying w/ the custom event thing with checking out the text natives