HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Few Small Facts

12-20-2006, 02:53 AM#1
xombie
Here are a few things that I've found are unlogical things that appear with the W.E. Though they have not stumped me (I'm used to getting retarded bugs) they may be of use to you guys!

1. Declaring multiple -large- arrays can cause errors. In the variable editor, as a rule of thumb, when creating an array variable just leave it's max size to 0, as it will let you use the rest of it's indexes anyways.
\_______: This is because the thread gets so clodded up with variable declaration (doing a loop 8192 times gets laggy)
\_______: It has been suggested to solve this problem by declaring your variables in a new thread, instead of letting the W.E. do it for you.

2. Minimum Fly Height for a hovering and flying unit (maybe others, havn't checked) is 0.10, not 0.00.

3. I'm not 100% on the specifics of this one, but it seems that units with the ability 'Locust' ('Aloc') do get grouped when a GroupEnum is called. So far I've experienced this with just GroupEnumUnitsInRect( <group>, GetWorldBounds(), null ).

I had more but I cannot remember them right now, I will update this post whenever I do.
12-20-2006, 04:00 AM#2
PhoenixFeather
Nice, I only knew about the first one.
12-20-2006, 12:08 PM#3
blu_da_noob
Quote:
2. Minimum Fly Height for a hovering and flying unit (maybe others, havn't checked) is 0.10, not 0.00.

No. Shift+click is your friend (doesn't work in game though).

Quote:
4. I'm not 100% on the specifics of this one, but it seems that units with the ability 'Locust' ('Aloc') do get grouped when a GroupEnum is called. So far I've experienced this with just GroupEnumUnitsInRect( <group>, GetWorldBounds(), null ).

Yes, well known. They do get selected by EnumUnitsOfPlayer though.
12-20-2006, 12:26 PM#4
xombie
For my second point, I mean that if you do a GetUnitFlyHeight of a unit, any unit, and it is flying or hovering, it will return 0.1 MINIMUM.
12-20-2006, 12:43 PM#5
Captain Griffen
Quote:
Originally Posted by xombie
3. Creating handles based on locations is sometimes dangerous, especially since when 'removing' the location will also remove certain handle types that have been created on the location, such as special effects.

False.
12-20-2006, 01:29 PM#6
xombie
I've thoroughly tested it?

Edit: More specifically, I found it as a bug in one of my triggers. When I didn't remove the location (I know it leaked but w/e) it played fine. Then, examining further, I created an entirely new map, and in a trigger said:
Collapse JASS:
local location l = Location(0, 0)
local effect e = AddSpecialEffectLoc( <string>, l )
    call RemoveLocation(l)
set l = null
set e = null
It didn't even display the special effect. When I thought oh maybe theres some other bugs I did this:
Collapse JASS:
local location l = Location(0, 400)
local real x = 0
local real y = 0
local effect e1 = AddSpecialEffectLoc( <string>, l )
local effect e2 = AddSpecialEffect( <string>, x, y )
    call TriggerSleepAction(5)
    call RemoveLocation(l)
On this test it waited roughly 5 seconds and then removed one of the effects, while the other one created by coordinates still existed. They were both peasant-model effects so that they wouldn't loop-out on me.
12-20-2006, 01:57 PM#7
Captain Griffen
You need more extensive testing.

Collapse JASS:
function TestLeft takes nothing returns nothing
    local location l = Location(-100, 0)
    local effect e = AddSpecialEffectLoc("Palisade.MDX", l )
    call RemoveLocation(l)
    debug call TriggerSleepAction(3.)
    debug call DestroyEffect(e)
    set l = null
    set e = null
endfunction

function TestRight takes nothing returns nothing
    local location l = Location(100, 0)
    local effect e = AddSpecialEffectLoc("Palisade.MDX", l )
    //call RemoveLocation(l)
    debug call TriggerSleepAction(3.)
    debug call DestroyEffect(e)
    set l = null
    set e = null
endfunction

function Trig_Test_Actions takes nothing returns nothing
    call ExecuteFunc("TestLeft")
    call ExecuteFunc("TestRight")
endfunction

//===========================================================================
function InitTrig_Test takes nothing returns nothing
    set gg_trg_Test = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_Test, Player(0), "T", true )
    call TriggerAddAction( gg_trg_Test, function Trig_Test_Actions )
endfunction

Works just fine, and as expected.
12-20-2006, 02:17 PM#8
xombie
Quote:
Creating handles based on locations is sometimes dangerous
Keyword -sometimes- I got a bug and therefore my point still stands. I'm simply telling people to be cautious of it.
12-20-2006, 02:39 PM#9
Captain Griffen
The bug is almost certainly in your code (which you've yet to post for debugging).
12-20-2006, 02:42 PM#10
Thunder_Eye
Never happened to me before and never ever heard of it :S
12-20-2006, 10:55 PM#11
Anopob
What does "debug call" do??
12-20-2006, 11:54 PM#12
xombie
There? Happy? I'd rather not argue with a bunch of people seemingly bloodthirsty to prove me wrong.
12-21-2006, 08:34 AM#13
Captain Griffen
Quote:
Originally Posted by Anopob
What does "debug call" do??

Nothing. Any line with debug at the beginning gets ignored in JASS, I think. Some preprocessors can be set to remove the debug for debuging purposes.

Quote:
There? Happy? I'd rather not argue with a bunch of people seemingly bloodthirsty to prove me wrong.

We have the choice between letting you tell people something that is wrong, or correcting you so your knowledge improves.

It's a no brainer.
12-21-2006, 12:09 PM#14
Toadcop
i would say known facts... as for me.
12-21-2006, 01:13 PM#15
xombie
I was merely saying caution for the following... I was not saying they were full-fledged bugs. In certain circumstances I -could- be correct, but I'm not here to argue about who's right or wrong.

You can take your 'righteous intents' and stuff them in a little blue Christmas box and send them to yourself, because you aren't fooling anybody. Your demand for being 'right' is obviously greater than your maturity level.

I'm not going to post anymore on this thread, it seems that its expired to the 10 year old at-minds.