HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Bug with CasterCastAbilityLevelAOELoc ?

04-17-2006, 07:28 PM#1
nooK
Hi,

I´m using the CS to do deal damage and stun all units in Aoe. Works fine except it doesn`t give bounty or experience to the casting player.

I use:
Collapse JASS:
call CasterCastAbilityLevelAOELoc( GetOwningPlayer(udg_LOP), 'A01V', GetUnitAbilityLevel(udg_LOP, 'A00W'),"thunderbolt", GetUnitLoc(udg_LOP), 250, false, true)

(udg_LOP is the unit variable)
Doesn`t give bounty or experience


CasterCastAbilityPointLoc for example gives bounty and experience.
Collapse JASS:
call CasterCastAbilityPointLoc( GetOwningPlayer(udg_UnitVar), 'A00P' , "thunderclap", udg_PointVar, true)


So why doesn´t CasterCastAbilityLevelAOELoc ?


Thanks for your help.
04-19-2006, 03:47 AM#2
Vexorian
It should give bounty, like 99% of my spells are based on the fact it does give bounty, my bet is that your UnitVar is pointing to null or is not owned by the right player.
04-19-2006, 08:46 PM#3
nooK
No the Unitvar must be correct:

1)
Collapse JASS:
GetUnitAbilityLevel(udg_LOP, 'A00W')
wouldn´t work if the Unitvar would be wrong. But it works and deals on each level the correct amount of damage/stun.



2)
Collapse JASS:
GetUnitLoc(udg_LOP)
the Aoe damage wouldn´t happen or happen at the wrong place which an wrong unitvar, but it works.



3) It still doesn´t give bounty when i use
Collapse JASS:
Player(2)
(Testing player is Teal)
or
Collapse JASS:
GetOwningPlayer(GetTriggerUnit())
instead of
Collapse JASS:
GetOwningPlayer(udg_LOP)



And yes Bounty is turned on.
This is so strange
04-20-2006, 02:21 AM#4
Vexorian
Well some spells don't give bounty , mainly when they are not supposed to cause damage but you used negative numbers to do so.

Also if the damage is timed you need to set a good recycle delay.

I am afraid (Really, I don't want to go back to windows XP just to test the map) that I should take a look at your map and see what's the problem.
04-20-2006, 02:24 AM#5
Vexorian
actually, now that I read your question again (sorry for taking more attention than I should)

Why would you use CasterCastAbilityAOE for thunderclap? AOE functions are to cast spells with single targets on multiple units, thunderclap is a spell that already affects multiple units
04-20-2006, 05:37 PM#6
nooK
Quote:
Well some spells don't give bounty , mainly when they are not supposed to cause damage but you used negative numbers to do so.
Don´t understand what you mean, I didn´t use negative numbers, I sued a normal thunderbolt ability which should give bounty.

Quote:
Also if the damage is timed you need to set a good recycle delay.
Don´t understand that part


Quote:
actually, now that I read your question again (sorry for taking more attention than I should)

Why would you use CasterCastAbilityAOE for thunderclap? AOE functions are to cast spells with single targets on multiple units, thunderclap is a spell that already affects multiple units

It´s thunderbolt, not thunderclap.
04-20-2006, 10:10 PM#7
Vexorian
oh, then it has sense.

I am sure it will take sometime to do the damage , it is thunder bolt,.

You need to set a recycle delay, probably 0.5 seconds would do the job.

Take a look to the caster system's readme and find the function that sets the recycle delay for the next function, and call it before the AOE function
04-21-2006, 02:06 AM#8
nooK
tried:

Collapse JASS:
call CasterSetRecycleDelay(1)
call CasterCastAbilityLevelAOELoc( GetOwningPlayer(udg_LOP), 'A01V', GetUnitAbilityLevel(udg_LOP, 'A00W'),"thunderbolt", GetUnitLoc(udg_LOP), 250, false, true)


and


Collapse JASS:
call CasterSetRecycleDelay(0.5)
call CasterCastAbilityLevelAOELoc( GetOwningPlayer(udg_LOP), 'A01V', GetUnitAbilityLevel(udg_LOP, 'A00W'),"thunderbolt", GetUnitLoc(udg_LOP), 250, false, true)



Still no bounty or experience
04-21-2006, 03:43 AM#9
Vexorian
err

Collapse JASS:
function CasterCastAbilityLevelAOELoc     takes player owner, integer abilid, integer level, string order, location center, real radius, boolean goodeffect, boolean instant returns nothing

boolean instant, use false there so the recycle delay is actually considered.

Collapse JASS:
call CasterSetRecycleDelay(0.5)
call CasterCastAbilityLevelAOELoc( GetOwningPlayer(udg_LOP), 'A01V', GetUnitAbilityLevel(udg_LOP, 'A00W'),"thunderbolt", GetUnitLoc(udg_LOP), 250, false, false)

ok I forgot stuff, anyways try reading the readme of the caster system before using its functions
04-21-2006, 04:07 AM#10
nooK
Sry forgot to change the instant boolean.
Works now, thanks for your help