HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

CasterSystem bug ?!?!?

01-24-2005, 03:50 PM#1
Shark
well, i was poking around it and playing with it, so i kinda decided to make an Acid Fog kinda spell, which is basicaly AOE Shadow Strike.....
so i used this trigger....

Acid Fog Copy
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Acid Fog (Triggerer)
Actions
Wait 0.75 seconds
Set PointVar = (Target point of ability being cast)
Set UnitVar = (Triggering unit)
Set IntegerVar = (Level of (Ability being cast) for (Triggering unit))
Set RealVar = (200.00 + ((Real(IntegerVar)) x 100.00))
-------- This would be so less confusing in JASS... --------
Set GroupVar = (Units within RealVar of PointVar matching (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Equal to True))
Custom script: set bj_wantDestroyGroup = true
-------- prepare the Area argument --------
Custom script: call CasterCastAbilityLevelGroup( GetOwningPlayer(udg_UnitVar), 'A00K', udg_IntegerVar,"shadowstrike", udg_GroupVar, false)
Custom script: call RemoveLocation(udg_PointVar)

guess what... when i cast the spell, the shadowstrike is cast SO MANY TIMES, that all of the units die.... instantly, they just perish....

the " A00K" ability has no cooldown, no MP cost, targets are "Vulnerable", it uses a custom buff (different text), different graphics etc..... its just like shadowstrike, except its damage is waaaay down, so it does like 50 initial and 15 decay dmg...

the levels detect fine, cuz it goes like 15/20/30 decay dmg and i can clearly see a bunch of "15"s or "20"s flying above the dead units.....


so, it looks like "we" either need to fix this problem, or make a new custom function that will cast the abilities ONLY ONCE....... or i'm doing something wrong ?!?

i also tried using this line, but the results are the same....
Custom script: call CasterCastAbilityLevelAOELoc( GetOwningPlayer(udg_UnitVar), 'A00K', udg_IntegerVar,"shadowstrike", udg_PointVar, udg_RealVar, false, true/false)
i tried both cuz i dunno if shadowstrike is instant or not, but the result was the same, they all died :)

the toughest unit so far had about 1100HP when i casted the spell, and it also died instantly, meaning that the spell was cast more than 12 times :) i'll try to "measure" the correct number of spell-casts, but i don't want to get deeper in this if there is a solution to my problem (if it is a problem at all)...

well, hope to hear from you soon, and i also hope that this is "old news" :)
01-24-2005, 06:34 PM#2
xGT4x
U're sure you didn't set casting time of your shadow strike ability to 0(In shadowstrike ability the casting time is the duration till the next damage is dealt, so 0 would be infinite damage)?
01-24-2005, 06:36 PM#3
mogmiester
Quote:
Originally Posted by Shark
well, i was poking around it and playing with it, so i kinda decided to make an Acid Fog kinda spell, which is basicaly AOE Shadow Strike.....
so i used this trigger....

Acid Fog Copy
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Acid Fog (Triggerer)
Actions
Wait 0.75 seconds
Set PointVar = (Target point of ability being cast)
Set UnitVar = (Triggering unit)
Set IntegerVar = (Level of (Ability being cast) for (Triggering unit))
Set RealVar = (200.00 + ((Real(IntegerVar)) x 100.00))
-------- This would be so less confusing in JASS... --------
Set GroupVar = (Units within RealVar of PointVar matching (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Equal to True))
Custom script: set bj_wantDestroyGroup = true
-------- prepare the Area argument --------
Custom script: call CasterCastAbilityLevelGroup( GetOwningPlayer(udg_UnitVar), 'A00K', udg_IntegerVar,"shadowstrike", udg_GroupVar, false)
Custom script: call RemoveLocation(udg_PointVar)

guess what... when i cast the spell, the shadowstrike is cast SO MANY TIMES, that all of the units die.... instantly, they just perish....

the " A00K" ability has no cooldown, no MP cost, targets are "Vulnerable", it uses a custom buff (different text), different graphics etc..... its just like shadowstrike, except its damage is waaaay down, so it does like 50 initial and 15 decay dmg...

the levels detect fine, cuz it goes like 15/20/30 decay dmg and i can clearly see a bunch of "15"s or "20"s flying above the dead units.....


so, it looks like "we" either need to fix this problem, or make a new custom function that will cast the abilities ONLY ONCE....... or i'm doing something wrong ?!?

i also tried using this line, but the results are the same....
Custom script: call CasterCastAbilityLevelAOELoc( GetOwningPlayer(udg_UnitVar), 'A00K', udg_IntegerVar,"shadowstrike", udg_PointVar, udg_RealVar, false, true/false)
i tried both cuz i dunno if shadowstrike is instant or not, but the result was the same, they all died :)

the toughest unit so far had about 1100HP when i casted the spell, and it also died instantly, meaning that the spell was cast more than 12 times :) i'll try to "measure" the correct number of spell-casts, but i don't want to get deeper in this if there is a solution to my problem (if it is a problem at all)...

well, hope to hear from you soon, and i also hope that this is "old news" :)


You dont actuallky need to use the caster system... it would probably lagg less and not memory leak, but that can be fixed later. Right, first of all, make another caster unit in the object editor. Create three shadow strikes with the appropriate damage etc.Then make the following trigger -

Acid Fog
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Acid Fog (Triggerer)
Actions
Set PointVar = (Target point of ability being cast)
Set UnitVar = (Casting unit)
Set IntegerVar = (Level of (Ability being cast) for (Casting unit))
If IntegerVar = 1 Then
Pick every unit within 200 of pointvar
If owner of picked unit is an enemy of owner unitvar equal to true then
create newcaster at position of picked unit
set varcaster = last created unit
ability add acid fog 1 to varcaster
order varcaster to shadow strike picked unit
else
else
If IntegerVar = 2 Then
etc etc


hope it works : )
01-24-2005, 06:41 PM#4
xGT4x
LOL? He asked if the Caster System has a bug because he was experimenting with it. He didn't ask for another way because probably everyone here knows how to do that...
And the Caster System doesn't leak memory, seems like you don't even know it omfg...
01-24-2005, 06:42 PM#5
mogmiester
Quote:
Originally Posted by xGT4x
LOL? He asked if the Caster System has a bug because he was experimenting with it. He didn't ask for another way because probably everyone here knows how to do that...
oh rite sorry :( :\ o_O
well, one problem is that he hasnt set the variables at the start of the trigger but put in a wait func... anoither problem is that he is using triggering unit instead of casting unit..

EDIT: btw, i know the caster system doesnt leak, that was what i was getting at, and i said that my ver would leak but not vex's caster system
01-24-2005, 07:39 PM#6
Shark
my friend, triggering unit, casting unit, attacking unit.... its all the same :) they pretty much ALL do the work, and the wait thing.... that's not the problem either....

IF xGT4x is right, and Casting time is indeed the damage interval (altho i believe it to be Decay Power or something like that), then that's the problem..... if not - well, i guess i'll just have to find out then :)
01-24-2005, 07:48 PM#7
Shark
yup, GT4 was indeed right...... Casting time is the damage interval between shots (altho i was ABSOLUTELY sure it was decay power..... oh well)
i'm still a bit rusty and worn out with school, but i never doubted Vex's system :)
tnx GT4, i'm too lazy to give u respect with this connection (it lags like hell), but consider yourself alot better in my book (yeah, like i had an oppinion about you.... and like i actually have a "book") :))

you'll be getting your reward soon enuff.....
01-25-2005, 04:39 PM#8
Shark
okaay, Question # 2:
Can i use the caster system to do the following

- Attack units in range of a point (or a unit group) with a certain ability (i'm aiming at mass freeze breath)

- dammit, i forgot the other stuff.... oh well, this one should do it for the time being...
oh yeah, and i'd like to do this with the least number of trigger lines... and without tweaking the caster unit, i'm talking about Caster System functions....
otherwise, i can just make a couple of dummy "freezer" units with 1 dmg and freezing breath and thats it :)
01-25-2005, 06:33 PM#9
oNdizZ
Shark, when it comes to.. hmm the Triggering Unit, Casting Unit stuff, then always try to use the one that is as correct as possible.
And when you use an event with an ability involved, suck as Begins casting an ability etc etc. then if you use a wait in your trigger, and another player uses that ability at almost the same time: then it will be some problems..
01-29-2005, 02:29 PM#10
xGT4x
Quote:
Originally Posted by Shark
okaay, Question # 2:
Can i use the caster system to do the following

- Attack units in range of a point (or a unit group) with a certain ability (i'm aiming at mass freeze breath)

- dammit, i forgot the other stuff.... oh well, this one should do it for the time being...
oh yeah, and i'd like to do this with the least number of trigger lines... and without tweaking the caster unit, i'm talking about Caster System functions....
otherwise, i can just make a couple of dummy "freezer" units with 1 dmg and freezing breath and thats it :)
Hmm you want all units in an area around a point to get "freezed"?
I think easiest for this would be just changing frost nova to your wanted duration, no aoe/target dmg(If you want you can add target dmg) and no art(If you want just change art to your wanted) and then using the same as you used above.
But I'm not totally sure about what you wanted. o_O