I've almost forgotten how to script in jass, but try this if it will work, I've checked it using jasscraft, but not in-game.
globals
integer array GEM_TABLE
constant integer GEM_LVL_1 = 'I04U'
constant integer GEM_LVL_2 = 'I04V'
constant integer GEM_LVL_3 =...
Handle type variables point to objects, the objects are the ones you destroy or remove. The issue with variables is that it interferes with the game engine's garbage collector, since it does not remove objects from memory when there is still a reference to it. To avoid memory leaks, set the...
The real problem on your script is not the pow usage, it's your use of BJs.
Anyway, I remember having read on wc3c.net that pow is worthwhile to use if the exponent is greater than 2.
Now I see your point! Thanks for explaining :D.
The reason I did not encapsulate it is because I consider this struct as a new data type or a unique object. Now if I want a unit to slide, I use the slide data type, like how I would use the unit data type or the timer data type. If I want to...
What I mean is to allow the user(s) to use a third-party data structure/attachment system.
Secondly, I was referring to the function identifiers with underscores, I think it's best if you make em struct methods instead of a function that has no association with the struct.
/* Changed the...
Isn't this periodic?
static method movement_child takes nothing returns nothing
local Data d=LoadInteger(HT,GetHandleId(GetEnumUnit()),0)
local real x
local real y
local real z
Also, I'm not against your use of the hash table, I assumed that this...
Could you add support for third-party attachment systems, I believe some people would like to use a unit indexer for this purpose. I also think that a hash table isn't suitable for this purpose; unit user data or a unit indexing system would be much better for this application.
There's nothing wrong with my test map, it works properly. I'm using arrays because jonny needs these triggers for multiple units, and the only information he gave us is:
hence the need to make the triggers dynamic.
You do not need to check the unit type of the unit stored in the tower...
Test map please.
I tested it myself, I stand corrected. Oh, and I'm sorry if you think I was lying, I was mistaken.
EDIT 2: I found the Destroy Trigger bug (the one that corrupts the handle stack), here's the link to a script that reproduces it. I made a mistake, destroying the trigger needs...
Test
Events
Unit - A unit Dies
Conditions
(Tower[1] is dead) Equal to True
(Tower[2] is dead) Equal to True
(Tower[3] is dead) Equal to True
Actions
Unit - Make Fortress Vulnerable
Unit - Make Barracks Vulnerable