- Joined
- May 17, 2009
- Messages
- 12
I'm working on a map and I'm changing all of the script to Jass cause I find GUI does a poor job of effective processing by adding more crap than need making the file size and strain of processors greater, but when I went to do my Dialog Jass and tested it, the Dialog never appeared, and yes I did tell it to display.
These are called by the Initialization function. I tested and they are called.
This code is the code called when the first Dialog is to be formed. This dialog is to start the creation of a new hero by removing all the old items except the ones not suppose to be removed.
Yes all the Triggers do exist and the ExceptionUnits function is Defined. I'm not sure why it isn't working. It goes into the "Dialog Mode," but doesn't show the dialog. When I tried Jasscraft Syntax Check it said everything was correct. Help Please?
I've attached the .j files I work in on Jasscraft if you pefer to look at the code there..
These are called by the Initialization function. I tested and they are called.
JASS:
function ButtonInit takes nothing returns nothing
//Gender
set udg_BMale = DialogAddButton(udg_Gender,"Male",0)
set udg_BFemale = DialogAddButton(udg_Gender,"Female",0)
//Model (Male)
set udg_ModBloodElfDemonhunter = DialogAddButton(udg_Male1,"Blood Elf Demon Hunter",0)
set udg_ModYouu = DialogAddButton(udg_Male1,"Youu",0)
set udg_ModPrinceofPersia = DialogAddButton(udg_Male1,"Prince of Persia",0)
set udg_NextMale = DialogAddButton(udg_Male1,"Next",0)
set udg_BackMale = DialogAddButton(udg_Male2,"Back",0)
//Model (Female)
set udg_ModAqua = DialogAddButton(udg_Female1,"Aqua",0)
set udg_ModDarkMiku = DialogAddButton(udg_Female1,"Dark Miku",0)
set udg_ModAssassin = DialogAddButton(udg_Female1,"Assassin",0)
set udg_NextFemale = DialogAddButton(udg_Female1,"Next",0)
set udg_BackFemale = DialogAddButton(udg_Female2,"Back",0)
//Age
set udg_B14 = DialogAddButton(udg_Age,"14",0)
set udg_B15 = DialogAddButton(udg_Age,"15",0)
set udg_B16 = DialogAddButton(udg_Age,"16",0)
set udg_B17 = DialogAddButton(udg_Age,"17",0)
set udg_B18 = DialogAddButton(udg_Age,"18",0)
//Spells
//Auras
set udg_ABBrillianceAura = DialogAddButton(udg_AuraAb,"Brilliance Aura",0)
set udg_ABCommandAura = DialogAddButton(udg_AuraAb,"Command Aura",0)
set udg_ABDefensiveAura = DialogAddButton(udg_AuraAb,"Defensive Aura",0)
set udg_ABDevotionAura = DialogAddButton(udg_AuraAb,"Devotion Aura",0)
set udg_ABUnholyAura = DialogAddButton(udg_AuraAb,"Unholy Aura",0)
//Passive
set udg_ABAttributeBonus = DialogAddButton(udg_PassiveAb,"Attribute Bonus",0)
set udg_ABBash = DialogAddButton(udg_PassiveAb,"Bash",0)
set udg_ABCriticalStrike = DialogAddButton(udg_PassiveAb,"Critical Strike",0)
set udg_ABEvasion = DialogAddButton(udg_PassiveAb,"Evasion",0)
set udg_ABSlowPoison = DialogAddButton(udg_PassiveAb,"Slow Poison",0)
//Fire
set udg_ABBreathofFire = DialogAddButton(udg_FireAb,"Breath of Fire",0)
set udg_ABFireBolt = DialogAddButton(udg_FireAb,"Firebolt",0)
//Ice
set udg_ABBreathofFrost = DialogAddButton(udg_IceAb,"Breath of Frost",0)
set udg_ABFrostBolt = DialogAddButton(udg_IceAb,"Frost Bolt",0)
//Arcane
set udg_ABTeleport = DialogAddButton(udg_ArcaneAb,"Teleport",0)
//Ultimate
set udg_ABAbsoluteZero = DialogAddButton(udg_UltimateAb,"Absolute Zero",0)
set udg_ABOverheat = DialogAddButton(udg_UltimateAb,"Overheat",0)
//Misc
set udg_ABAcidBomb = DialogAddButton(udg_MiscAb,"Acid Bomb",0)
endfunction
function DialogInit takes nothing returns nothing
set udg_Gender = DialogCreate()
call DialogSetMessage(udg_Gender,"Choose Gender")
set udg_Male1 = DialogCreate()
call DialogSetMessage(udg_Male1,"Male Models (1/2)")
set udg_Male2 = DialogCreate()
call DialogSetMessage(udg_Male2,"Male Models (2/2)")
set udg_Female1 = DialogCreate()
call DialogSetMessage(udg_Female1,"Female Models (1/2)")
set udg_Female2 = DialogCreate()
call DialogSetMessage(udg_Female2,"Female Models (2/2)")
set udg_Age = DialogCreate()
call DialogSetMessage(udg_Age,"Choose Age")
set udg_AbilitiesType = DialogCreate()
call DialogSetMessage(udg_AbilitiesType,"Ability Types")
set udg_DarkAb = DialogCreate()
call DialogSetMessage(udg_DarkAb,"Dark Abilities")
set udg_LightAb = DialogCreate()
call DialogSetMessage(udg_LightAb,"Light Abilities")
set udg_ArcaneAb = DialogCreate()
call DialogSetMessage(udg_Arcane,"Arcane Abilities")
set udg_FireAb = DialogCreate()
call DialogSetMessage(udg_Gender,"Fire Abilities")
set udg_IceAb = DialogCreate()
call DialogSetMessage(udg_Gender,"Ice Abilities")
set udg_NatureAb = DialogCreate()
call DialogSetMessage(udg_Gender,"Nature Abilities")
set udg_EarthAb = DialogCreate()
call DialogSetMessage(udg_Gender,"Earth Abilities")
set udg_CombatAb = DialogCreate()
call DialogSetMessage(udg_Gender,"Combat Abilities")
set udg_LightningAb = DialogCreate()
call DialogSetMessage(udg_Gender,"Lightning Abilities")
set udg_WindAb = DialogCreate()
call DialogSetMessage(udg_Gender,"Wind Abilities")
set udg_PassiveAb = DialogCreate()
call DialogSetMessage(udg_Gender,"Passive Abilities")
set udg_AuraAb = DialogCreate()
call DialogSetMessage(udg_Gender,"Aura Abilities")
set udg_MiscAb = DialogCreate()
call DialogSetMessage(udg_Gender,"Misc Abilities")
set udg_UltimateAb = DialogCreate()
call DialogSetMessage(udg_Gender,"Ultimate Abilities")
endfunction
This code is the code called when the first Dialog is to be formed. This dialog is to start the creation of a new hero by removing all the old items except the ones not suppose to be removed.
JASS:
function EnumNewRemove takes nothing returns nothing
if(ExceptionUnits(GetEnumUnit()) != true)then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function Act_NewHero takes nothing returns nothing
call ForGroup(GetUnitsOfPlayerAll(GetTriggerPlayer()),function EnumNewRemove)
call SetPlayerState(GetTriggerPlayer(),PLAYER_STATE_GOLD_GATHERED,0)
call DialogDisplay(GetTriggerPlayer(),udg_Gender,true)
endfunction
function Events_NewHero takes nothing returns nothing
local integer i = 0
loop
call TriggerRegisterPlayerChatEvent(gg_trg_NewHero,Player(i),"-new",true)
call TriggerRegisterPlayerChatEvent(gg_trg_NewHero,Player(i),"-repick",true)
set i = i + 1
exitwhen i >= 11
endloop
endfunction
//===========================================================================
function InitTrig_NewHero takes nothing returns nothing
set gg_trg_NewHero = CreateTrigger()
call Events_NewHero()
call TriggerAddAction(gg_trg_NewHero,function Act_NewHero)
endfunction
Yes all the Triggers do exist and the ExceptionUnits function is Defined. I'm not sure why it isn't working. It goes into the "Dialog Mode," but doesn't show the dialog. When I tried Jasscraft Syntax Check it said everything was correct. Help Please?
I've attached the .j files I work in on Jasscraft if you pefer to look at the code there..