It seems that when you save the map, the order of triggers in the trigger editor is kept, not like the wc3 editor.
I mean if you create 4 trigger with the event "map initialization" , the first created trigger will be the most on the top, and the last the most on the bottom.
And if you change...
Maybe most of you already know but you can't store a "null" handle in an hashtable, neither an invalid handle, for example an handle which was destroyed but not setted to null.
I've just realized recently we can use that for safety checks.
library CheckHandles initializer onInit
globals...
Is it possible to simulate a player in a local area network game, with only one machine(computer) ?
I ask it because sometimes, computer slots are not enough for my tests.
For example i can't trade gold/wood if there is not at least 2 players (myself included).
It's annoying to ask someone else...
I've made this because SpellStruct is truly overkilled for my needs and anyway as SpellEvent don't do all the stuff i want.
Here these lack of features :
- In SpellStruct when the ENDCAST event fire you have to figure yourself it the spell was successfully casted or interrupted before the...
Hi.
I have a quite good pc, totally overskilled for warcraft 3, which make me hard to test if something can be improved when i make a custom map.
Without change any thing in my pc, can i decrease temporally these performances in a some stable and accurate way ?
I have the need to know if an issued order can interrupt the current order of an unit or not (like for example "defend" order doesn't interrupt current orders), i've found this solution.
Maybe it's not obvious for all, so i post this snippet.
But you should simply inline GetIssuedOrderId() ==...
I'm wondering if only structures which are building enter the map with not full hp.
I think so, but maybe i miss a case ?
For starters :
And no even preplaced unit enter the map with full hp, their life is modified later internally in the map script
library TestEnum initializer onInit
private function filter takes nothing returns boolean
// you can write what you want, this text won't be showed anyway
call BJDebugMsg("Me > Chuck Norris")
return false
endfunction
private function onInit takes nothing returns nothing
call...
I'm working for a library which provide custom construction events.
Why ?
Because we don't have a native GetBuilder(), and the way how a structure is build only depends the race of the builder, so therefore if i want GetBuilder() working for all races i need custom events, and a custom...
I want to know how fast/slow is gamecache sync.
library SyncDatas initializer onInit
globals
private trigger array Trig
private gamecache array GC
private timer array Tim
private force Players
private integer I
endglobals
private function Actions takes nothing returns...
It's a script for the lul'z.
By war3 minimized i mean when you reduce it to use an other software, i'm not talking about the window mode.
It won't work on single player mode because war3 is paused when you minimize it, but war3 won't be paused when you play on local area network...
I usually use orderids instead of strings because :
- if you do a typo it won't compile and show you the error instead of compile and don't work in game with an invalid string.
- sometimes there is not the string equivalent and constant integers make them fully friendly usable
- they are faster...
I usually use orderids instead of strings because :
- sometimes there is not the string equivalent and constant integers make them fully usable
- they are faster (even if dunno how many and i think it should be irrelevant)
- "easier" to store/link with
- if you do a typo it won't compile and...
Because of this bug it isn't so easy.
library IsUnitIdValid
globals
private unit U
endglobals
function IsUnitIdValid takes integer i returns boolean
if IsGameLoaded() then // ofc i plan to store the result, to avoid the creation of the unit all the time, when it was already checked...
If i could post on graveyard i would post in it directly, i just want to show a bug.
Anyway even if there wasn't this bug this function would be totally useless.
function IsGameLoaded takes nothing returns boolean
return UnitId2String('hfoo')==null
endfunction
Note that is the...
library SetUnitSelection initializer init
// save your map, leave it, reopen it and then comment the line below
//! external ObjectMerger w3a AOre Ires anam "Dummy Instant Ressurect Ability" achd 0 Ore1 1 0 aeat "" aher 0 aeff 1 ""
function SetUnitSelection takes unit u , boolean...
Here is a simple and short system :
//==============================================================================
// DRES -> DETECT RESOURCE EXCHANGE SYSTEM -- v 2.1 // by Troll-Brain
//==============================================================================
//
//...
Requires vJass and GroupUtils.
This is just a simple library to know if an unit is being built, upgraded or finished, it will return false if the unit is dead.
library ConstructionStatus initializer init uses GroupUtils
globals
private constant real TIME_OUT = 30.0 // It is the...