I hope that I don't disturb you much.
After solution with removing Property from Array (thanks CWO) I went on and implement nice Buff Icons display for our shard.
That system was made with RusseL help and with guialtran help.
I synthesized these two and made it.
But! I still have another issue, which I can't understand how to fix it.
Example with Target Spell script - Reactive Armor.
Code: Select all
DoTempMod( cast_on, str_mod, CInt( power ), CInt( duration ), mod_type, spelldata.caster );
var buff_icons := BuffOn( cast_on, spelldata.cfg_elem.name, power, duration );
All works fine!
But! If we use script with Target Area Spell like Arch Protections or Mass Curse, where is foreach endforeach - we have a trouble. Script cast to the first character and stopped, 'cause wait to remove Buff icons from that character and follow to another.
Example with Mass Curse:
Code: Select all
foreach cast_on in ....
...
DoTempMod( cast_on, Lower(spelldata.cfg_elem.mod), (0 - mod_amount), 15, Lower(spelldata.cfg_elem.ModType));
var buff_icons := BuffOn( cast_on, spelldata.cfg_elem.name, mod_amount, 15 );
endforeach
TimeToBuffOff( who, icon, duration );
Code: Select all
function TimeToBuffOff( who, buff, duration )
if (duration <= 0)
duration := 0;
endif
//print(" buffIcon.inc | TimeToBuffOff() | duration : " + duration ); // DEBUG
Detach();
Sleep(duration);
//BuffOff( who, buff );
BuffDebuff_removeIcone2( who, buff );
endfunction
I don't know, how and what I have to do, to fix this trouble with Sleep() function.
Oh, eah.. You can see Detach(); function and it doesn't work.
Best regards!