• 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.

fixing a bugged map

Status
Not open for further replies.
Level 2
Joined
Dec 14, 2012
Messages
20
JASS:
function AUO takes unit IYE,unit m5 returns nothing
local real HGE='d'*GetUnitState(m5,UNIT_STATE_LIFE)/ GetUnitState(m5,UNIT_STATE_MAX_LIFE)
local integer AWO=2*GetUnitAbilityLevel(IYE,'A1A3')
local trigger t=CreateTrigger()
local integer K3V=GetHandleId(t)
if H3V(IYE)then
set AWO=AWO/2
set AWO=AWO*90
set HGE=GetUnitState(m5,UNIT_STATE_MAX_LIFE)-GetUnitState(m5,UNIT_STATE_LIFE)
set AWO=IMinBJ(AWO,R2I(HGE))
call G6V(IYE,AWO)
call HEV(IYE)
call DPV(t,'i',AWO)
call DFV(t,'u',IYE)
call TriggerRegisterTimerEvent(t,.35,false)
call TriggerAddCondition(t,Condition(function ATO))
else 
call KYV(IYE,"ASO")
call TriggerRegisterTimerEvent(t,.35,false)
call TriggerAddCondition(t,Condition(function ASO))
call A7(K3V,"Source",IYE) 
if IsUnitType(m5,UNIT_TYPE_HERO)==false then
set AWO=AWO/ 2 
endif 
if H3V(IYE)then
set AWO=AWO*4
endif
if HGE>80 then
call Q6V(IYE,AWO)
elseif HGE>60 then
call Q6V(IYE,AWO*2)
elseif HGE>40 then
call Q6V(IYE,AWO*2*2)
elseif HGE>20 then
call Q6V(IYE,AWO*2*2*2)
else
call Q6V(IYE,AWO*2*2*2*2)


I wonder if some one can help me,, I have a bug in this map well bugs and been fixing them.,,, i had alot but most are fixed. but the above is buggedfor some reason if u take this spell (spell id A1A3) on the hero ID EC77 then the spell does double damage, instead of 90 it does a maxmim of 180 but on all the other heros itsfine

now i want to add a code

GetUnitTypeId(IYE)=='EC77' then
set AWO=AWO*45 instead of 90 when its on a other hero

but I am not that sharp in jass any help
 
what does this exactly do?

btw,CnP this code so users can easily read it.

[jass=]function AUO takes unit IYE,unit m5 returns nothing
local real HGE='d'*GetUnitState(m5,UNIT_STATE_LIFE)/GetUnitState(m5,UNIT_STATE_MAX_LIFE)
local integer AWO=2*GetUnitAbilityLevel(IYE,'A1A3')
local trigger t=CreateTrigger()
local integer K3V=GetHandleId(t)
if H3V(IYE)then
set AWO=AWO/2
set AWO=AWO*90
set HGE=GetUnitState(m5,UNIT_STATE_MAX_LIFE)-GetUnitState(m5,UNIT_STATE_LIFE)
set AWO=IMinBJ(AWO,R2I(HGE))
call G6V(IYE,AWO)
call HEV(IYE)
call DPV(t,'i',AWO)
call DFV(t,'u',IYE)
call TriggerRegisterTimerEvent(t,.35,false)
call TriggerAddCondition(t,Condition(function ATO))
else
call KYV(IYE,"ASO")
call TriggerRegisterTimerEvent(t,.35,false)
call TriggerAddCondition(t,Condition(function ASO))
call A7(K3V,"Source",IYE)
if IsUnitType(m5,UNIT_TYPE_HERO)==false then
set AWO=AWO/ 2
endif
if H3V(IYE)then
set AWO=AWO*4
endif
if HGE>80 then
call Q6V(IYE,AWO)
elseif HGE>60 then
call Q6V(IYE,AWO*2)
elseif HGE>40 then
call Q6V(IYE,AWO*2*2)
elseif HGE>20 then
call Q6V(IYE,AWO*2*2*2)
else
call Q6V(IYE,AWO*2*2*2*2)
endif
endif
endfunction
[/code]

can you please upload the map via attaching?
Also,can you post the code of the ff.functions:
-Q6V
-IYE
-H3V
-DPV
-DFV
-HEV
-A7
-G6V
-KYV

so that i can see ,also for the users to see the problems
 
Status
Not open for further replies.
Top