| 08-05-2009, 09:47 PM | #1 |
JASS:function Trig_Carrion_Swarm_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A00I' endfunction function Trig_Carrion_Swarm_Actions takes nothing returns nothing local unit u = GetTriggerUnit() local unit d = CreateDummy( GetOwningPlayer(u), u, 'A00M', GetUnitAbilityLevel(u, 'A00I'), 8) local location l = GetSpellTargetLoc() call IssuePointOrder(d, "carrionswarm", GetLocationX(l), GetLocationY(l)) call PolledWait(0.25) call SetUnitPositionLoc( u, l ) call RemoveLocation(l) set l = null endfunction //=========================================================================== function InitTrig_Carrion_Swarm takes nothing returns nothing set gg_trg_Carrion_Swarm = CreateTrigger( ) call TriggerRegisterAnyUnitEventNL( gg_trg_Carrion_Swarm, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Carrion_Swarm, Condition( function Trig_Carrion_Swarm_Conditions ) ) call TriggerAddAction( gg_trg_Carrion_Swarm, function Trig_Carrion_Swarm_Actions ) endfunction My dummy unit isn't casting anything, even though he is able to (the spell requires no mana, requirements, etc ) Please help? It has been driving me crazy! |
| 08-05-2009, 10:16 PM | #2 |
Don't you have to remove the Move ability first? Ever since I started doing that, my dummy units have been casting spells just fine. |
| 08-05-2009, 10:23 PM | #3 |
Thanks a lot for your response. I changed the move speed of my dummy unit from 270 to 0, but still no luck. EDIT: I should also add he casts all other abilities just fine. |
| 08-05-2009, 10:23 PM | #4 |
Does the unit teleport at the end to the targeted loc? Give the dummy mana or something. check the spells range. add debug msgs after every line of code to see if it stops somewhere. something like JASS:call DisplayTimedTextToForce( GetPlayersAll(), 5.00, "a" ) just put one after every line of code untill it stops, increases the letter everytime...a>b>c and so on. edit and i dont know if u put the *//* for this purpose or its like that in ur map but that is a problem. and does the dummy even spawn? |
| 08-05-2009, 10:27 PM | #5 | |
Quote:
All messages are being shown in-game. I just want to clarify something. What I did to my dummy unit (for testing) is removed the Locust ability, and made it a Peasant model. I can now visually see that the spell creates the dummy. It is also given the Carrion Swarm spell. However, it just isnt' casting it even thouhg if I manually click the dummy, click Carrion Swarm and tell it to cast it somewhere it does it just fine. Thanks so much for the replies. |
| 08-05-2009, 10:29 PM | #6 |
check if u can cast carrios swarm... it might need a unit target im not sure. make sure u are ordering the unit correctly EDIT well it is a point i just checked. try to use orderstring instead and use "carrionswarm" i always use strings cuz its easier for me okay ium an idiot u did do that. |
| 08-05-2009, 10:33 PM | #7 |
| 08-05-2009, 10:39 PM | #8 |
okay i have had ur problem before. try using the BJ and check if that works. assuming it was the same problem as mine JASS:call IssuePointOrderLocBJ( d2, "carrionswarm", l ) i had to do taht once. i was only able to cast with a bj for some odd reason. lol |
| 08-05-2009, 10:46 PM | #9 | |
Quote:
That's my new code, and still no luck. To add to the things I've tried: Assign the dummy as a global variable unit. Changing the dummy unit. Thank you so much for the help. |
| 08-05-2009, 10:51 PM | #10 |
check the spell. check the orderstring on it. make sure ur using that? lol. |
| 08-05-2009, 10:53 PM | #11 |
| 08-05-2009, 11:05 PM | #12 |
try adding the ability to the dummy in the editor instead of by trigger. see if that helps. or tell the dummy unit to do something else. like move to the target(for debuggin). |
| 08-05-2009, 11:11 PM | #13 |
I did as you said. I even told the dummy to cast other abilities and it did. It just seem like the "carrionswarm" function is being ignored. Thanks for the reply!!! |
| 08-06-2009, 01:29 AM | #14 |
Try setting unit's both Cast Backswing and Cast Point to 0. |
| 08-06-2009, 04:12 AM | #15 |
JASS:if IssuePointOrder(d2, "carrionswarm", GetLocationX(l), GetLocationY(y)) then call BJDebugMsg("Order True") else call BJDebugMsg("Order False") endif |
