How can you make the quest update notification visible to the player without them having to use the "go to quests and see what has changed" method?
No, all animations are there. A complete set, plus three types of dialogue, and much more.
By the way, take a look at the script itself.
- avoid "magic" numbers (4 instead of the resource name).
- move repeating string constants into variables, so that if you need to change them, you only need to change them in one place (if the player is always number 1 and has only one main hero)
player_id = PLAYER_1;
player_hero = 'Markel2'; - replace the ugly resource allocation construct with a functionfunction SetRes(res, num)
local curr_num = GetPlayerResource(player_id, res);
SetPlayerResource(player_id, res, curr_num + num, player_hero);
end - if you plan to have many effects, move their unwieldy names into a separate table, here is a snippet from "Path of the Hero" (there are actually many more effects there):-- list of effects for PlayVisualEffect
effects_table =
{
['Haste'] = 'Spells/Haste', -- breeze
['StoneSkin'] = 'Spells/StoneSkin', -- stone wall around
['Bless'] = 'Spells/Bless', -- light from the sky
['DeflectArrows'] = 'Spells/DeflectArrows', -- something like a shield on the side
['Dispel'] = 'Spells/Dispel', -- magical fog ending in an explosion
['Dispel_fail'] = 'Spells/Dispel_fail', -- magical fog without an explosion
};
function GetEffectName(id)
return '/Effects/_(Effect)/'..effects_table[id]..'.xdb#xpointer(/Effect)'
end
PlayVisualEffect(GetEffectName('Dispel'), ...);