if(script != "") { // scripts always run if defined
std::istringstream stream(script);
- Sector::current()->run_script(stream, "powerup-script");
+ Sector::current()->run_script(stream, "BonusBlockScript");
}
start_bounce(player);
if(message == "") {
message = _("You found a secret area!");
}
+ reader.get("script", script);
message_displayed = false;
}
message_timer(),
message_displayed(),
message(_("You found a secret area!")),
- fade_tilemap(fade_tilemap)
+ fade_tilemap(fade_tilemap),
+ script()
{
bbox = area;
message_displayed = false;
}
}
+ if(script != "") {
+ std::istringstream stream(script);
+ Sector::current()->run_script(stream, "SecretAreaScript");
+ }
}
}
}
bool message_displayed;
std::string message; /**< message to display, default "You found a secret area!" */
std::string fade_tilemap; /**< tilemap to fade away when trigger is activated, or empty if you don't care */
+ std::string script; /**< optional script to run when trigger is activated */
};
#endif