SphereCommunity
Trash - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Trash (/Thread-Trash)

Pages: 1 2


Trash - victorstelzer - 01-26-2014 04:40 AM

A problem in the script - When I play the item in the trash as it does not add the script.

Can someone help me?

[ITEMDEF i_trash_can2]
ID = i_barrel_open
DefName = i_trash_can2
NAME = Trash
TYPE = T_CONTAINER
WEIGHT = 10
CATEGORY = Provisions - Miscellaneous
Subsection = Containers
DESCRIPTION = Trash Can
SKILLMAKE SKILL_TINKERING = 55.0, t_tinker_tools
RESOURCES = 10 i_log

ON = @ CREATE
COLOR = 600
ATTR = attr_static


On = @ ItemDropOn_Ground
src.sysmessage This item will decay in 20 seconds.
act.timerf 20 f_item_decay

On = @ ItemPickUp_Ground
act.timerf clear



[EOF]


RE: Trash - XuN - 01-26-2014 05:16 AM

A item can ONLY have actions related to it, if you want the items droped by players on the ground to be removed on 20 seconds, you'll have to add your code to any event for players, however act.timerf clear won't wont be a good idea since you can stop any other timerf on this item, use act.timerf STOP,f_item_decay


RE: Trash - victorstelzer - 01-26-2014 11:21 AM

doing so ??



On = @ ItemDropOn_Ground
src.sysmessage This item will decay in 20 seconds.
act.timerf STOP f_item_decay

On = @ ItemPickUp_Ground
act.timerf clear



[EOF]


RE: Trash - XuN - 01-26-2014 06:59 PM

This must be part of an event placed on players: http://wiki.sphere.torfo.org/index.php/EVENTS


RE: Trash - Mordaunt - 01-27-2014 01:02 AM

Placing that event on a player would be a HORRIBLE idea. Anything dropped in your house would also decay.

Instead of @ItemDropOn_Ground, which is a character trigger not an item trigger, use @DropOn_Self on the trash can item.
That way items dropped in the trash will decay rather than items just dropped anywhere.

To cancel the timer use @PickUp_Self

-1 Xun as a dev you should know better.


RE: Trash - XuN - 01-27-2014 01:08 AM

I told him what he asked about, nothing more, you should know about that!!! ^^ -1 Mordaunt for fast -1 without decent arguments!


RE: Trash - Mordaunt - 01-27-2014 01:14 AM

He asked why putting an item in the trash wasn't doing what he wanted.
The answer is because he is using the wrong triggers...

Go sit in the corner and think about your life


RE: Trash - victorstelzer - 01-27-2014 06:43 AM

[ITEMDEF i_trash_can2]
ID=i_barrel_open
DEFNAME=i_trash_can2
NAME=Lixeira
TYPE=T_CONTAINER
WEIGHT=10
CATEGORY=Provisions - Miscellaneous
SUBSECTION=Containers
DESCRIPTION=Trash Can
SKILLMAKE=SKILL_TINKERING 55.0,t_tinker_tools
RESOURCES=10 i_log

ON=@CREATE
COLOR=600
ATTR=attr_static

On= @DropOn_Self
src.sysmessage O item sumira em 20 seconds.
act.timerf 20 f_item_decay

------------------------------------------------------------
The timer does not work
-------------------------------------------------------------
error in the sphere

18:41:ERROR:(trashcan.scp,19)Undefined keyword 'act.timerf


RE: Trash - Mordaunt - 01-27-2014 08:25 AM

Because the item is argo not act, which is why i linked the respective wiki pages....


RE: Trash - Extreme - 01-27-2014 09:48 AM

On=@DropOn_Self
src.sysmessage O item sumira em 20 seconds.
argo.timerf 20,f_item_decay