![]() |
i_memory: where you store the mem_flags - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: i_memory: where you store the mem_flags (/Thread-i-memory-where-you-store-the-mem-flags) Pages: 1 2 |
RE: i_memory: where you store the mem_flags - Rizz - 05-22-2015 09:01 PM Yes I know but the problem is: if i use that trigger to set timer=300, after 300 second the memory will start again with a timer of 18 and never decay. So maybe I can use that trigger to set a tag and then put some code undert the item i_memory? RE: i_memory: where you store the mem_flags - XuN - 05-22-2015 10:01 PM Memories are mean to be updated every time they tick, excepting layer_criminal and a few more ones, the only way to remove them is to get rid of their flags (stored in the color value) and removing them when there's no color. [function AddMemoryFlags] //argn1 = Flags // Adding to SRC's memory on this character ARGN1 flags. ref1=<MemoryFind <src>> ref1.color |=<argn1> [function DelMemoryFlags] argn = Flags // Deleting ARGN1 flags to SRC's memory on this character. // If no flags are left, memory will be removed ref1 = <MemoryFind <src>> ref1.color &=~<argn1> if (<ref1.color> <= 0 ) ref1.remove endif These 2 functions may help you in the proccess of adding and removing flags, of course you'll have to use them on certain situations, for example: ON=@CombatDelete //src is passed from trigger to the function DelMemoryFlags MEMORY_HARMEDBY RE: i_memory: where you store the mem_flags - ForesteR - 06-19-2015 05:16 AM (05-20-2015 05:32 PM)XuN Wrote: This is how notoriety is being checked now. Can u post the custom functions? RE: i_memory: where you store the mem_flags - XuN - 06-19-2015 05:55 AM Which custom functions? I don't get what do you mean with 'custom'. RE: i_memory: where you store the mem_flags - ForesteR - 06-19-2015 06:37 AM findmemories_with_one_of_these_flags, isinsamepartyof, isalliedwith, isatwarwith |