• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Problem with dummy caster

Status
Not open for further replies.
Level 11
Joined
Sep 30, 2009
Messages
697
JASS:
private function SpawnInfernals takes nothing returns nothing
    
    call SetUnitOwner(CASTER_DUMMY, Player(12), false)
    call UnitAddAbility(CASTER_DUMMY, 'AUin')
    
    call IssuePointOrderById(CASTER_DUMMY, 852224, -150., 2300.)
    call IssuePointOrderById(CASTER_DUMMY, 852224, -2700., 420.)
    call IssuePointOrderById(CASTER_DUMMY, 852224, 1000., -6000.)
    call IssuePointOrderById(CASTER_DUMMY, 852224, -3000., 2200.)
    call IssuePointOrderById(CASTER_DUMMY, 852224, -2200., 4100.)
    call IssuePointOrderById(CASTER_DUMMY, 852224, 4500., 4000.) 

    call UnitRemoveAbility(CASTER_DUMMY, 'AUin')
    call SetUnitOwner(CASTER_DUMMY, Player(15), false)
endfunction

private function init takes nothing returns nothing
    set CASTER_DUMMY = CreateUnit(Player(15), 'hdum',0.,0.,0.)
    call UnitRemoveAbility(CASTER_DUMMY, 'amov')
endfunction

does excactly nothin for me D: anyone find the problem? + rep of course
(the function is called, the dummy exists, the man cost and cooldown are zero... btw)
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
JASS:
    call UnitRemoveAbility(CASTER_DUMMY, 'amov')

The ability ID for Move is 'Amov' not 'amov'.

Also, Player(15) refers to Neutral Passive, which may cause problems for the targets that are available for your dummy order. If you want to reference Neutral Hostile, then you would use Player(12).
 
The ability ID for Move is 'Amov' not 'amov'.

Also, Player(15) refers to Neutral Passive, which may cause problems for the targets that are available for your dummy order. If you want to reference Neutral Hostile, then you would use Player(12).

Neutral Passive can't get clogged up with orders by codes, Neutral Hostile can, because it has internally a fixed behaviour. Anyway, that was not the problem, since I used Player(0) too.

Axarion, that's weird, it worked for me by the way and I tested it with a Footman.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Strange. What ability is this based off of?

I noticed you use "852224" which refers to "dreadlordinferno" but even the Rain of Chaos abilities for Archimonde and Balnazzar simply use the "inferno" order-string, unless of course you're using Channel.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
JASS:
constant native OrderId2String takes integer orderId returns string

If I had used I2S then it would have returned a string "852224".

The order ID of "inferno" is: 852232

I find it strange how simply adding mana to the dummy unit would have fixed this problem. If that is true, then there is some sort of correlation between "dreadlordinferno" and "inferno".
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
I wouldn't mind some reply from Axarion, it doesn't make any sense that all he needed to do was add mana to the dummy unit to magically allow it to use an order ID of which it had no associated ability.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
That's strange. When I use OrderId("inferno") that is not the result I get. But yea you're right you did say removing 'Amov' made it function. I have never found a problem in removing 'Amov' for a dummy unit. In fact, usually if you do not remove it strange things happen because of the turning that is involved in units using abilities that are able to move.
 
Status
Not open for further replies.
Top