Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: StroryInit
- <<set $Flag = {}>>
- :: In any passage
- <<set $Flag[candy] = true>>
- <<set $Flag[candy] = 1234>>
- <<set $Flag[candy] = "sour">>
- :: Testing the Flag
- <<if $Flags["candy"]>>
- The candy I ate was $Flags["candy"]!
- <</if>>
- :: Delete the Flag
- <<run delete $Flags["candy"]>>
- :: The New Widget
- <<widget "MakeAFlag>>
- <<if def $args[1]>> <- if you give a flag a value or delete it
- <<if $args[1] == false>>
- <<;if def $Flags[_args[0]]>>
- <<run delete $Flags[_args[0]]>>
- <</if>>
- <<else>>
- <<set $Flags[_args[0]] = _args[1]>>
- <</if>>
- <<else>>
- <<set $Flags[_args[0]] = true>>
- <</if>>
- <</widget>>
- <<MakeAFlag "flagname" "value">>
Advertisement
Add Comment
Please, Sign In to add comment