Neutral Units Spell Casting

SomaZ

New Member
Reaction score
3
Is it true that Neutral Victim and Neutral Extra units can't cast spells? I mean via Issueing an order through triggers. If not then it sux :(
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Well, Neutral Victim for example considers anyone an ally, while all other players think he's an enemy.
So, he won't do so all by itself.
However, with the correct alliance settings, and a trigger... works just fine.
 

SomaZ

New Member
Reaction score
3
It doesn't work for me. Through additional checks I find that he indeed sees me as an enemy. I order him to Orc Blademaster - Mirror Image (and he has that skill) and he does NOTHING. Why ? :( He has mana and the trigger GETS to the point where he should cast the skill. The order is given, yet nothing happens.
 

SomaZ

New Member
Reaction score
3
I FOUND THE PROBLEM BUT I NEED NEW HELP!

Here's a custom Jass function that I made:
Code:
function CreepAbility takes unit u, integer i returns nothing
local real r
    call GroupRemoveUnitSimple( u, udg_Creep_Ability_Group[i] )
    if i == 1 then
    set r = 13
    else 
    if i == 2 then
    set r = 13
    else 
    if i == 3 then
    set r = 19
    else 
    if i == 4 then
    set r = 7
    else 
    if i == 5 then
    set r = 7
    else 
    if i == 6 then
    set r = 4
    if i == 7 then
    set r = 32
    endif
    endif
    endif
    endif
    endif
    endif
    endif
    call TriggerSleepAction( r )
    call GroupAddUnitSimple( u, udg_Creep_Ability_Group[i] )
    set u = null
endfunction

In the trigger I call it by using custom script.

Anyway, looks like the TriggerSleepAction (Wait) is waiting in the REAL TRIGGER itself! But I want it to wait only in the function. Please tell me why is it waiting in the trigger too?
 

istar

New Member
Reaction score
31
eh? you call it in your trigger, so that entire function is part of your trigger, hence the wait is also in your trigger, the game dont run different functions at the same time, you may want to use timers instead
JASS:
    if i == 1 then
    set r = 13
elseif i == 2 then    
    set r = 13
elseif i == 3 then    
    set r = 19
elseif i == 4 then    
    set r = 7
elseif i == 5 then    
    set r = 7
elseif i == 6 then    
    set r = 4
elseif i == 7 then
    set r = 32
endif
use elseif
 

SomaZ

New Member
Reaction score
3
The game can run multiple triggers at the same time, no? So why not run functions ? :(

Anyway, +rep thx :)
 

SomaZ

New Member
Reaction score
3
Yes it can -_- seriosly. (I mean with the use of waits, not at the same moment, but can run different actions).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top