SphereCommunity
Need Help Attaching Effect To Item Instead Of Player - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Expired/Outdated Versions (/Forum-Expired-Outdated-Versions)
+--- Forum: Sphere 51a Help (/Forum-Sphere-51a-Help)
+--- Thread: Need Help Attaching Effect To Item Instead Of Player (/Thread-Need-Help-Attaching-Effect-To-Item-Instead-Of-Player)



Need Help Attaching Effect To Item Instead Of Player - Admin Drew - 06-25-2013 08:09 AM

Hi all, I made a ressurection ankh that makes a small visual effect when you dclick on it.. The problem is the graphic effect appears on the player clicking on the Ankh, and I want the effect to appear on the Ankh itself instead. If someone could help me out with the script and let me know how to attach the effect to the Ankh instead of the player I would really appreciate it!
Thanks all & here is the script-

[XXXX]
ID=1d97
TYPE=18
NAME=Ressurection Ankh
COLOR=00
ONTRIGGER=DCLICK
SRC.EFFECT=3,03728,6,15,1
if <SRC.Hitpoints> < 1
src.sysmessage Live Again Mortale!
SRC.RESURRECT
else
src.sysmessage You Still Have Life In You! Continue On Warrior..
endif

//I tried this second way also which in theory should work but it produces no effect in this second version if you use the DClick trigger. What's weird is if I use this second style with no SRC. before the word effect it will produce the effect on a weapon if I use the ONTrigger=Damage tag, but If I try to use ONtrigger=DClick with just Effect= under it it won't give me the effect on an item that you Dclick on at all //

[XXXX]
ID=1d97
TYPE=18
NAME=Ressurection Ankh
COLOR=00
ONTRIGGER=DCLICK
EFFECT=3,03728,6,15,1
if <SRC.Hitpoints> < 1
src.sysmessage Live Again Mortale!
SRC.RESURRECT
else
src.sysmessage You Still Have Life In You! Continue On Warrior..
endif


*Just want the effect to appear on ankh instead of player*


RE: Need Help Attaching Effect To Item Instead Of Player - RanXerox - 06-25-2013 10:27 AM

EFFECT 3 doesn't run on items... Try 2 instead. If that doesn't work, create the item (in your example it is 03728), set its location in the world, set its attributes so it will decay (and not be picked up etc), then set its timer...


RE: Need Help Attaching Effect To Item Instead Of Player - Admin Drew - 06-25-2013 11:51 AM

Yah changing the 3 doesn't work.. Do you have an example of what it would look like added onto mine? If I use the SRC.NEW.ITEM= the item will appear on the player once again.
Thanks


RE: Need Help Attaching Effect To Item Instead Of Player - Mulambo - 06-25-2013 08:30 PM

try
Code:
CONT.EFFECT



RE: Need Help Attaching Effect To Item Instead Of Player - Admin Drew - 06-26-2013 06:09 PM

Got it working another way thanks guys!