Ability to define custom macros

Issue #49 new
Ewan Branda
created an issue

It would be very helpful if story developers could write custom JS macros and register them with Harlowe.

Comments (3)

  1. kai beasley

    yes, this would be very helpful. maybe even integrate it, ex:
    (define-macro: "(set-variable: _variable, _value)")[(set: _variable to _value)]
    would allow you to say: (set-variable: $name, "blabla")
    which would set $name to blabla.

    the above example would not be very usefull, but its just an example. you can see my concept uses temp variables like the new (for:) macro does.

    (update: changed the name of the macro to (define-macro:) from (define-function:)

  2. Log in to comment