Baltazhar
Active Member
- Reaction score
- 55
Okay, first off.. I'm a utter newb when it comes to Jass. The only stuff I know are the leak-fixing scripts from various tutorials.
Anyway, I had a question concerning this. I know the basic RemoveLocation and DestroyGroup... But what if I wanted to remove a region with an array?
Would it be: "call RemoveRect (udg_My_Variable 1)"?
To be specific I have a a Region variable with an array of 10, one of each of the human players. I need the call to get the (Playernumber of (owner of (dying unit))). Dying unit can be replaced with triggering unit ofc, just like to be precise
Rep for the solution! My kingdom for a horse! ... Well.. thx in advance
EDIT: I'm not sure if I might be a bit impatient, but I'll try to clarify it further.
I made a trigger with Special Effects, since it's one of the only Variable GUI options. I need the same function, just with Region removal
Okay, think I actually managed to figure it out on my own. Took an hour of looking through random pieces of code to figure out the pattern of the different characters in the code, but I think I did it.
At least the compiler likes it, so that's a small bonus
Is this "Remove Region - DeathMarchRegion[Playernumber of (owner of (dying unit))]" ?
Anyway, I had a question concerning this. I know the basic RemoveLocation and DestroyGroup... But what if I wanted to remove a region with an array?
Would it be: "call RemoveRect (udg_My_Variable 1)"?
To be specific I have a a Region variable with an array of 10, one of each of the human players. I need the call to get the (Playernumber of (owner of (dying unit))). Dying unit can be replaced with triggering unit ofc, just like to be precise
Rep for the solution! My kingdom for a horse! ... Well.. thx in advance
EDIT: I'm not sure if I might be a bit impatient, but I'll try to clarify it further.
I made a trigger with Special Effects, since it's one of the only Variable GUI options. I need the same function, just with Region removal
Code:
Special Effect - Destroy My_Effect[(Player number of (Owner of (Dying unit)))]
Okay, think I actually managed to figure it out on my own. Took an hour of looking through random pieces of code to figure out the pattern of the different characters in the code, but I think I did it.
At least the compiler likes it, so that's a small bonus
JASS:
call RemoveRect (udg_DeathMarchRegion[GetPlayerId(GetOwningPlayer(GetDyingUnit()))])
Is this "Remove Region - DeathMarchRegion[Playernumber of (owner of (dying unit))]" ?