SphereCommunity
2x i_memory - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: 2x i_memory (/Thread-2x-i-memory)



2x i_memory - ThatSide - 08-08-2015 01:48 PM

At first I have to apologize for shitty thread subject. Just couldn't come up with a better one.
Lets say this is my script:
Code:
[ITEMDEF i_mem_one]
ID=I_MEMORY
TYPE=T_EQ_SCRIPT
NAME=Memory One

ON=@CREATE
ATTR=attr_decay|attr_invis

On=@EQUIP
timer=10
cont.say You have 10 sec before You will get memory two.
return 1

on=@timer
SERV.NEWITEM i_mem_two
NEW.LINK=<cont.UID>
NEW.EQUIP
remove
return 1

[ITEMDEF i_mem_two]
ID=I_MEMORY
TYPE=T_EQ_SCRIPT
NAME=Memory Two

ON=@CREATE
ATTR=attr_decay|attr_invis

On=@EQUIP
timer=10
cont.say You have 10 sec before memory two will be removed.
return 1

on=@timer
cont.say Memory two has been removed.
remove
return 1

As far as I understand - The issue is that second memory doesn't link up with a player.
ERROR:GC: 1 unplaced object deleted
ERROR:UID=040001edd, id=04521 'Magic Shield', Invalid code=3202 (Object not placed in the world)

Is there some kind of conflict with adding second memory under first ones timer trigger?

I tried to add a function under the on=@timer trigger
Code:
on=@timer
cont.add_memory_two
remove
return 1

[function add_memory_two]
SERV.NEWITEM i_mem_two
NEW.LINK=<UID>
NEW.EQUIP

that works perfectly on its own or even while the first timer is active.
Just dont get it... Doubt Any ideas ?


RE: 2x i_memory - sco - 08-08-2015 08:50 PM

[ITEMDEF i_mem_one]
ID=I_MEMORY
TYPE=T_EQ_SCRIPT
NAME=Memory One

ON=@CREATE
ATTR=attr_decay|attr_invis

On=@EQUIP
timer=10
cont.say You have 10 sec before You will get memory two.
return 1

on=@timer
SERV.NEWITEM i_mem_two
NEW.LINK=<cont.UID>
cont.equip <NEW.uid>
remove
return 1


RE: 2x i_memory - ThatSide - 08-08-2015 09:37 PM

Damn.. How could I miss that ... TY, mate!
And apologies for my silly mistake