• 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 New Gen Pack (JNGP) doesn't work proberly

Status
Not open for further replies.
Level 5
Joined
Jan 15, 2007
Messages
199
Uhh, you need these global variables
(For globals tag in map header)
JASS:
globals
    unit udg_Tmp_Unit
    unit udg_Tmp_Unit2
    player udg_Tmp_Player
    player udg_Tmp_Player2
endglobals

OR

(For GUI global declering)
Tmp_Unit (Unit Variable)
Tmp_Unit2 (Unit Variable)
Tmp_Player (Player Variable)
Tmp_Player2 (Player Variable)


And also, you need the trigger itself to be called "Ally Attack"

Anyways, you shouldn't need any globals at all in this trigger at all, you could change it to:
JASS:
function Ally_Attack takes nothing returns boolean
    local unit u = GetAttacker()
    if IsUnitEnemy( GetTriggerUnit(), GetOwningPlayer( u ) )
        call IssueImmediateOrder( u, "stop" )
    endif
    set u = null
    return false
endfunction

function InitTrig_Ally_Attack takes nothing returns nothing
    set gg_trg_Ally_Attack = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Ally_Attack, EVENT_PLAYER_UNIT_ATTACKED )
    call TriggerAddCondition( gg_trg_Ally_Attack, Condition( function Ally_Attack )
endfunction
(The better way I posted does not require the global declaration)
 
Well I HAVE all things u said

I mad a GUI TRIGGER called ALLY ATTACK and converted it.

Now the problem is that the variables ARE NOT KNOWN because of whatever.

I also know how to increase the strengh of any jass trigger ( I can do jass ).

I am just having problems.


My GUI code DOES NOT find any JASS variable and the JASS code does not find any GUI variable.

Please help!
 
Status
Not open for further replies.
Top