• 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.

[JASS] Cloud of Fog

Status
Not open for further replies.
Level 4
Joined
Dec 23, 2005
Messages
41
Really strange bug that I can't find how to fix it; a unit ordered to cast cloud of fog on a target location seems to not be ordered (does nothing). I can't find what I changed that could cause this because this ability worked really well in the last one. Nothing really has been changed to the cloud abilities, and nothing has been changed with the dummy caster (which channel for us the ability). I can see the dummy beeing created, giving its ability, setting it to the right level, but even when it is ordered with IssuePointOrderByIdLoc, the unit does nothing (and it is not stoped because this :

if IssuePointOrderByIdLoc(caster,OrderId("cloudoffog"),Position)==true then
call BJDebugMsg("true")
else
call BJDebugMsg("false")
endif

returns false... Really strange; all spells works correctly and returns true, only cloudoffog returns false (4 cloud of fogs ability)... Is there something that I could have changed that could only affect cloud of fog? The order id in the spell is still cloudoffog.... When i order manually the dummy (clicking the spell) to cast it it creates a cloud, and writes me that the order is "cloudoffog", what I just did ordered. What could be wrong?
 
Level 4
Joined
Dec 23, 2005
Messages
41
Really nothing has been changed; I copied the abilities from the last version and they are identical... Same for the functions. Sure I changed many things in this version but I can't find what could cause a unit to not cast a specific spell, even if its the right order (with a bjdebugmsg when i manually click on the spell it says "cloudoffog" and 852473 has the Id, the unit is ordered "cloudoffog" but does nothing, returns false even with a loop that orders him"

loop
exitwhen IsDead(cible)==true
if IssuePointOrderByIdLoc(cible,OrderId("cloudoffog"),position)==true then
call BJDebugMsg("true")
return
else
call BJDebugMsg("false")
call TriggerSleepAction(0)
endif
endloop

= always false... Every other spells (like death and decay, breath of fire, etc) works well and returns true. I have more than one cloud ability and only clouds abilities does not works... But they are unchanged from the last version... It's like a "pop up" problem. What could affect it?
 
Level 4
Joined
Dec 23, 2005
Messages
41
I looked in the Gameplay constants; nothing has been changed, I looked in the Game Interface; only the Idle Worker icon has been changed (which obvioustly doesn't change the spell). Looked in the Scenario (everything in that subdirectory) no thing has been changed there too. If IssueOrderPointLoc returns false, (and returns true in the test map), what does it means exactly? Does it means : 1) the ordered unit does not exist, 2) the location does not exist, 3) the order does not exist or whatever? How can it change between 2 maps with 2 same spells... Weird has hell.
 
Level 4
Joined
Dec 23, 2005
Messages
41
Yeah everything is coded in Jass but actually it was always coded in jass. I am trying to find out what differencies can cause that annoying problem but it's really hard. That's why I asked here if people had ideas of what I should check first.
 
Level 4
Joined
Dec 23, 2005
Messages
41
True, nice idea. I tried it; added a Pause Unit, order stop, unpause unit, after order it to cast; does not works. What's the weirdest thing is that IssueOrderByIdLoc returns false, that thing I does not understand, has everything else returns true.
 
Level 4
Joined
Dec 23, 2005
Messages
41
Actually IssuePointOrderLoc and IssuePointOrderByIdLoc is the same thing; one takes the Id and the other the stringid. I just did tried it and it didn't work. Take in note that something outside the function must be perturbing the main function.
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
okay, so lets go over what we have tried

you have not changed anything in the spell except for the Requirements and Mana Cost

you have not changed any Gameplay Constants

you have not changed anything in Game Interface

so i am going to bet it has to do with the unit, since it worked in a test map

okay, its a dummy unit, right? does it have anything besides
no model
no shadow
Locust
Invulnerable
No attack
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
okay, so its not the caster that is the problem

its not the interface
its not the gameplay constants
its not the spell
its not the caster

it might be some other trigger that makes this not work, try turning off triggers that could possibly interuppt the casting of the unit or affect the unit in any way
 
Level 4
Joined
Dec 23, 2005
Messages
41
Resolved

Okay, it's the weirdest thing I ever saw in the WE.

When you preplace a unit in the World Editor, the Trigger Editor creates a function like CreateUnitForPlayer1 (or 2,3,4,5,Passive etc) that creates units that you placed. If you clicked on those units and you leveled them (like heroes) and you leveled already their skills (for some reasons), in the CreateUnitForPlayer functions there will be SelectHeroSkill functions call. My problems goes from there, but has no logic.

My solution was this; I took the older version that was working, and imported the triggers, and all data in the map; that makes it almost the same has the newer one. I test it; cloud works fine... Now I start changing things I had done into my other version, (like leveling heroes to 50 on the map, put their ability to max level)... Test again; oops its not working anymore; no more clouds. The problem goes from there...

I binary searched for about 3 hours to know which hero was the cause (42 heroes)... I found 2 heroes. From there I had to test each ability alone, and found 1 ability from each heroes...

Those 2 abilities had nothing really strange; all 2 based on channel... But both had something identical; the orderid. The orderid of the spell is "cloudoffog".... Like what the hell.

So, if you preplace a unit on the map, and sets a channel ability, which its abilityid is cloudoffog, to at least level 1, it should bug your orderid "cloudoffog" to null.

Strange eh?
 
Status
Not open for further replies.
Top