Feature Request: Passing tempTriggers their return value.

Post Reply
User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Feature Request: Passing tempTriggers their return value.

Post by tsuujin »

I have had a recurring issue while using mudlet regarding reloading a script that has an active tempTrigger, which causes the variable holding the ID to be cleared, and thus lose the ability to kill that trigger entirely. I think it'd be great if I could pass the ID I want to use to the tempTrigger, so that I can always kill triggers I know will exist, regardless of what else happens.

tempTrigger("to trigger on", [[some script to do]], "trigger id!")
ie:
Code: [show] | [select all] lua
tempTrigger("Tsuujin", [[fg("red")]], "tsuuTrig")
killTrigger("tsuuTrig")

Yetzederixx
Posts: 186
Joined: Sun Nov 14, 2010 5:57 am

Re: Feature Request: Passing tempTriggers their return value

Post by Yetzederixx »

wouldn't this in some config script work?
Code: [show] | [select all] lua
tempTrigID = tempTriggerID or -1

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Feature Request: Passing tempTriggers their return value

Post by Vadi »

You could serailize the ID's with table.save/table.load and then get them back... otherwise, being able to name temp triggers would be good.

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: Feature Request: Passing tempTriggers their return value

Post by tsuujin »

Yetzederixx wrote:wouldn't this in some config script work?
Code: [show] | [select all] lua
tempTrigID = tempTriggerID or -1
This doesn't work when you're using modules, because refreshing the module seems to completely destroy all of the data inside of it.

Post Reply