-
Team2 HeroPick
-
Ereignisse
- Spieler - Spieler 7 (Grün) Auswählen a unit
- Spieler - Spieler 8 (Rosa) Auswählen a unit
- Spieler - Spieler 9 (Grau) Auswählen a unit
- Spieler - Spieler 10 (Hellblau) Auswählen a unit
- Spieler - Spieler 12 (Braun) Auswählen a unit
-
Bedingungen
-
And - All (Conditions) are true
-
Bedingungen
- SelectionHeroSelected[(Player number of (Triggering player))] Gleich False
-
Or - Any (Conditions) are true
-
Bedingungen
- (Triggering unit) Gleich Alchimist 0000 <gen>
- (Triggering unit) Gleich Naga-Meerhexe 0001 <gen>
- (Triggering unit) Gleich Tüftler 0002 <gen>
- (Triggering unit) Gleich Bestienmeister 0003 <gen>
- (Triggering unit) Gleich Dunkler Waldläufer 0004 <gen>
- (Triggering unit) Gleich Feuerlord 0005 <gen>
- (Triggering unit) Gleich Pandarenen-Braumeister 0006 <gen>
- (Triggering unit) Gleich Grubenlord 0007 <gen>
- (Triggering unit) Gleich Blutmagier 0010 <gen>
-
Bedingungen
-
Bedingungen
-
And - All (Conditions) are true
-
Aktionen
- Auswahl - Clear selection for (Triggering player)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
'IF'-Bedingungen
- (Triggering unit) Gleich Selectedunit[(Player number of (Triggering player))]
-
'THEN'-Aktionen
- Set locT2HS = Team2HeroSpawn <gen>
- Einheit - Create 1 (Unit-type of (Triggering unit)) for (Triggering player) at (Center of Team2HeroSpawn <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
- Set SelectionHeroSelected[(Player number of (Triggering player))] = True
- Einheit - Hide (Triggering unit)
- Custom script: call RemoveLocation(udg_locT2HS)
-
'ELSE'-Aktionen
- Set Selectedunit[(Player number of (Triggering player))] = (Triggering unit)
- Wait 1.50 seconds
- Set Selectedunit[(Player number of (Triggering player))] = Keine Einheit
-
'IF'-Bedingungen
-
Ereignisse
JASS:
//***************************************************************************
globals
// User-defined
unit array udg_Selectedunit
boolean array udg_SelectionHeroSelected
integer udg_Soldat_Bogenschtzen = 0
rect udg_locT1HS = null
rect udg_locT2HS = null
// Generated
rect gg_rct_Team1HeroSpawn = null
rect gg_rct_HeroPickRegion = null
rect gg_rct_Team2HeroSpawn = null
rect gg_rct_Team1SpawnLinks = null
rect gg_rct_Team1SpawnMitte = null
rect gg_rct_Team1SpawnRechts = null
rect gg_rct_Team2SpawnRechts = null
rect gg_rct_Team2SpawnMitte = null
rect gg_rct_Team2SpawnLinks = null
rect gg_rct_Mitte = null
trigger gg_trg_Team1_HeroPick = null
trigger gg_trg_Team2_HeroPick = null
trigger gg_trg_SpielerPuefung = null
trigger gg_trg_Sentry = null
trigger gg_trg_CreepSpawns = null
trigger gg_trg_Red_modes = null
unit gg_unit_Nalc_0000 = null
unit gg_unit_Nngs_0001 = null
unit gg_unit_Ntin_0002 = null
unit gg_unit_Nbst_0003 = null
unit gg_unit_Nbrn_0004 = null
unit gg_unit_Nfir_0005 = null
unit gg_unit_Npbm_0006 = null
unit gg_unit_Nplh_0007 = null
unit gg_unit_H000_0010 = null
unit gg_unit_hcas_0022 = null
unit gg_unit_hcas_0023 = null
unit gg_unit_hbar_0024 = null
unit gg_unit_hbar_0025 = null
unit gg_unit_hbar_0026 = null
unit gg_unit_hbar_0032 = null
unit gg_unit_hbar_0033 = null
unit gg_unit_hbar_0034 = null
endglobals
function InitGlobals takes nothing returns nothing
local integer i = 0
set i = 0
loop
exitwhen (i > 12)
set udg_Selectedunit[i] = null
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_SelectionHeroSelected[i] = false
set i = i + 1
endloop
endfunction
function Trig_Team2_HeroPick_Func003Func002C takes nothing returns boolean
if ( ( GetTriggerUnit() == gg_unit_Nalc_0000 ) ) then
return true
endif
if ( ( GetTriggerUnit() == gg_unit_Nngs_0001 ) ) then
return true
endif
if ( ( GetTriggerUnit() == gg_unit_Ntin_0002 ) ) then
return true
endif
if ( ( GetTriggerUnit() == gg_unit_Nbst_0003 ) ) then
return true
endif
if ( ( GetTriggerUnit() == gg_unit_Nbrn_0004 ) ) then
return true
endif
if ( ( GetTriggerUnit() == gg_unit_Nfir_0005 ) ) then
return true
endif
if ( ( GetTriggerUnit() == gg_unit_Npbm_0006 ) ) then
return true
endif
if ( ( GetTriggerUnit() == gg_unit_Nplh_0007 ) ) then
return true
endif
if ( ( GetTriggerUnit() == gg_unit_H000_0010 ) ) then
return true
endif
return false
endfunction
function Trig_Team2_HeroPick_Func003C takes nothing returns boolean
if ( not ( udg_SelectionHeroSelected[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not Trig_Team2_HeroPick_Func003Func002C() ) then
return false
endif
return true
endfunction
fu[B][/B]nction Trig_Team2_HeroPick_Conditions takes nothing returns boolean
if ( not Trig_Team2_HeroPick_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Team2_HeroPick_Func002C takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Selectedunit[GetConvertedPlayerId(GetTriggerPlayer())] ) ) then
return false
endif
return true
endfunction
function Trig_Team2_HeroPick_Actions takes nothing returns nothing
call ClearSelectionForPlayer( GetTriggerPlayer() )
if ( Trig_Team2_HeroPick_Func002C() ) then
set udg_locT2HS = gg_rct_Team2HeroSpawn
call CreateNUnitsAtLoc( 1, GetUnitTypeId(GetTriggerUnit()), GetTriggerPlayer(), GetRectCenter(gg_rct_Team2HeroSpawn), bj_UNIT_FACING )
set udg_SelectionHeroSelected[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ShowUnitHide( GetTriggerUnit() )
call RemoveLocation(udg_locT2HS)
[B]else[/B] ( here it says the error "invalid argumenttype"
set udg_Selectedunit[GetConvertedPlayerId(GetTriggerPlayer())] = GetTriggerUnit()
call TriggerSleepAction( 1.50 )
set udg_Selectedunit[GetConvertedPlayerId(GetTriggerPlayer())] = null
endif
endfunction
//===========================================================================
function InitTrig_Team2_HeroPick takes nothing returns nothing
set gg_trg_Team2_HeroPick = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Team2_HeroPick, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Team2_HeroPick, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Team2_HeroPick, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Team2_HeroPick, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Team2_HeroPick, Player(11), true )
call TriggerAddCondition( gg_trg_Team2_HeroPick, Condition( function Trig_Team2_HeroPick_Conditions ) )
call TriggerAddAction( gg_trg_Team2_HeroPick, function Trig_Team2_HeroPick_Actions )
endfunction
whereever i put the customscript to delete the variable i get an error can u help me pls >.<
sorry for this being half in german but idk how i can change the world editor language to english <.<
EDIT: oh y i am pretty new to this forum so idk how to make spoilers dont be too harsh too me >.< arrigato goseimasu
Last edited: