• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Region System 1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Hey guys.
I made this because there is nothing like that here yet.
It is for creating regions between two flags, but right now it has no use so you can use it how you want.

Posible usings i think about:
Unable to build something in(if not owner of course)
Unable to go there until you pay to owner

I hope you like it.

Keywords:
Region, System, Creating
Contents

Region System (Map)

Reviews
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. 19th Jul 2011 Bribe: Game - Display to (Player group((Owner of (Triggering unit)))) - Leaks the player group You do this multiple times You never remove these locations...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: For long time as NeedsFix. Rejected.

19th Jul 2011
Bribe:

Game - Display to (Player group((Owner of (Triggering unit))))

- Leaks the player group

You do this multiple times

You never remove these locations:

Set Region_Point1[Region_Count] = (Position of (Triggering unit))
Set Region_Point2[Region_Count] = (Position of (Target unit of ability being cast))

This resource doesn't seem useful based on the description.

Building something just because it doesn't exist does not merit
that it's useful. You should only build something if you need it.
 
Level 10
Joined
Jan 19, 2010
Messages
393
Actually, the reason we don't use Integer A/Integer B is because certain bugs could occur with them :p

Never happend to me :)

Please post the triggers in [TRIGGER][/TRIGGER] tags.

Don't use (Integer A)/(Integer B). It is inefficient, use a variable instead.

You constantly use (Target of Ability Cast) in conditions. Set it to a variable to be more efficient.

(Owner of (Casting Unit)) -> Triggering Player
(Owner of (Triggering Unit)) -> Triggering Player

I don't see a recycling method, nor do I see a way to permanently remove the indexed locations/regions. This is likely a memory leak.

Why do i have to set it to variable? Units dont leak...
 
nope, I only see you clearing/resetting/recycling the variables, but I never saw you Destroying the regions themselves...

and also, looping thru the indexes just to get the index of the caster is a pretty bad idea... why not save the index into a hashtable?

also, Player Group(Owner of blahblah) will cause a player group leak... There is a function to show text to a player only...

as for the units, its better to set them into variables for performance... as TriggeringUnit etc are function calls, which are slower than variables...
 
Setting a variable to null, just removes the link of the variable to the object, but it leaves the object there on the game... that's the difference between destroying the object and nulling the variable...

example for unit vars

Set Temp = Unit

Set Temp = Null won't remove the unit... the unit stays there, while Temp is now unlinked meaning it don't reference anything anymore

while

RemoveUnit(Temp); assuming we do this before Set Temp = null, will remove the unit, so logically, Temp will now reference an object which does not exist anymore, which is why it automatically returns null...
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
Go to tutorial section in GUI/triggers, there is ton of hashtable/indexing/how to MUI your spells/systems.

This is very simple peace of code, and still requires a lot work to go.
You used my import map i see =) I said, you should make sure everything is fine before uploading it, i see you did not.

For removing region use: Custom script: DestroyRect (udg_your_region).
 
Top