Quote:
Originally Posted by saroumana
If you use posthitmaster, it will be used for every attack of this unit.
In your unit, you should have :
gladiatorbreath {
class=scripted
script_attack=special_gladiatorbreath_attack
script_calccells=calccells_all_enemy
hinthead=ig_gladiator_breath_head
hint=ig_gladiator_breath_hint
reload=4
dontusenearenemy=1
up=0
friendly_fire=1
base_attack=0
ad_factor=1
picture=ba1_doublestrike_
picture_small=ba1_doublestrike_small.png
options=disablerush,used_if_damaged
anim_attack=special
damage {
physical=41,60
fire=30,50
}
custom_params {
burn=70
shock=50
nomiss=1
}
}
And now you must create special_gladiatorbreath_attack. inside it, for burning, you'll use that :
local target = Attack.get_target()
local burn_rnd=tonumber(Attack.get_custom_param("burn"))
if burn_rnd<=burn then
effect_burn_attack(target,1,3,nil,0)
end
After you'll may be have to apply damage to the unit.
|
Thx, but thats exactly the same code i had (except for the calccells script calling, but i dont want to make all the enemy cells available, only the nearly ones, like the circle attack, but i tried , and it doesnt work). When i push the icon skill, appears a waiting clock (instead the sword icon that indicates who wants to attack) and i cant do nothing, only to press the right mouse button to cancel (Almost it doesnt crash

). Thats the problem i am having long time ago, and thats my confusion. If i change the attack class from scripted to moveattack, it works, but i cant apply the burn effect (must be scripted zz). I really dont know wth is wrong -.-. I tried with some scripts from firemage, and other fire creatures, but always the same result.
And the posthitmaster parameter i think is for making the normal attacks to burn on every attack, i dont want that -.-