• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] List of questions

Status
Not open for further replies.
Level 8
Joined
Jun 28, 2010
Messages
3,336
Well, I have some questions.
1. What causes irremovable leaks?
2. If I shouldn't use pause and waits for spell then what should I use?
3. How many damage dealt by Whosyourdaddy?
4. Is 522 the maximum MS?
5. What is the maximum AS?
6. How to set Spell cast and loop properly?
7. How to set like:
-Deal damage 15%xHerostrength? I don't know how to set the hero strength.
 
Level 11
Joined
Jun 20, 2009
Messages
880
1. I have no idea
2. This might help you
3. It multiplies your damage by 100
4. Yes. You can use higher values tho but it doesnt have any effect.
5. Depends from attack animation. Like Priest cant have as fast attackspeed as Blademaster.
6. I dont know what you mean :p
7.
  • Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing ((Real((Strength of (Triggering unit) (Include bonuses)))) x 0.15) damage of attack type Spells and damage type Normal
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
1. What causes irremovable leaks?

When you lose a reference to an object in memory.


  • Untitled Trigger 043
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set point = (Target point of ability being cast)
      • Wait 2.00 seconds
      • Set point = (Center of (Playable map area))

^There is no way to find out what the target point was, ever again. We don't know it's address. It was not removed from memory, thus a leak occurs.

2. If I shouldn't use pause and waits for spell then what should I use?

Waits should be replaced with timers. Pause could be replaced with using Channel as the base ability, and giving the ability some follow through time so the unit doesn't auto-attack for example, it keeps the ability order.

3. How many damage dealt by Whosyourdaddy?

Kala answered this one.

4. Is 522 the maximum MS?

Yes. To move faster, you need to use trigger enhanced movement when you calculate and set the unit's position yourself.

5. What is the maximum AS?

Maximum bonus is +400%, and maximum attack speed is 10 hits per second.

6. How to set Spell cast and loop properly?

THis would require a lenghty answer, but basically you can use timers. Take a loot at some spells in the spell database.

7. How to set like:
-Deal damage 15%xHerostrength? I don't know how to set the hero strength.

  • Set r1 = (0.15 x (Real((Strength of (Triggering unit) (Include bonuses)))))
Then deal r1 damage.

Use arithmetic to get the x multiplier, use Conversion - Integer to real for the str part.
 
1) CreateUnit always creates small leak - unit after decaying isn't fully ceaned up. This leak can be prevented via RemoveUnit(u) function.

5) Additionaly I will add that 400% limit can not be abused. Minimum AS is equal to 80%.
Attacks per second = (1 + IAS)/BAT; where IAS is bonus AS in percentage, while BAT is Base Attack Time for given unit.

7) If you are jass user use:
JASS:
native          GetHeroStr          takes unit whichHero, boolean includeBonuses returns integer
Example:
JASS:
call UnitDamageTarget(u, target, 0.15*GetHeroStr(u),false, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL, null)

@Adiktuz, minimal delay between each attack is equal to 0.1 sec. Same as TriggerSleepAction cap.
 
Level 8
Joined
Jun 28, 2010
Messages
3,336
Got it.
I got the line now. So if I make a spell trigger, there will be 2 triggers. Initialization and loop, and loop doesn't initially on. On initialization trigger, I use the 'An unit cast spell' and 'the spell equal to blah blah' then I set the variables then fire the loop trigger right?
On the loop trigger, I use 'Every 0.03 seconds of game time' then deal damage blah blah, then clear the leaks. Am I right?
 
Level 8
Joined
Jun 28, 2010
Messages
3,336
That script is only for groups... the difference is that if you choose to call DestroyGroup(group), you would need to set the group first into a variable, while using that line, will remove the next created group automatically after use so no more need to set the group to a variable...

Cool script there. So I don't need to 'Pick Every unit in the -region- then do actions. Set picked unit to -a variable-'
 
Level 8
Joined
Jun 28, 2010
Messages
3,336
Dynamic Indexing Template / Unit Indexer - those are best indexing ways for GUI-users :p
Thanks :D
no, what you dont need to do is
  • Set GroupVariable = Pick evry unit blahblah
  • Unit Group - Pick every unit in GroupVariable and do
  • Custom script: call DestroyGroup(udg_GroupVariable)
but instead it will just be
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in blahblah and do
Understood.
Does trigger optimization/length important?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
1. What causes irremovable leaks?
Creating units in any way causes an "irremovable" memory leak. This is a hard coded WC3 bug as removing the units in every way immaginable will not stop this leak from occuring. The only advice I have to compensate this bug is to recycle dummy units, and avoid permantly killing units of a type you will need again in the future.
 
Deformations in general are dangerous as I have read they are one of the key reasons for desyncing GetLocationZ, however I am not sure if GetLocationZ is even a cause of desyncs any more.

And yes the handle indices of deformations do not climb down. They also lack a "destroy" method. I think the API is incomplete similar to trackables.
 
Status
Not open for further replies.
Top