Files
DarkflameServer/dScripts/02_server/Map/General/SimpleMoverSwitch.h
Aaron Kimbrell beed2651e5 feat(scripts): L_SIMPLE_MOVER_SWITCH, the platforms of the NJ attic switches
The script (with L_BASE_SWITCH_ACTIVATED_SERVER) asks the switches in the
platform's switchGroup to tell it when they are activated and
deactivated, and sends the platform to waypoint 1 on the one and back to
waypoint 0 on the other. The NJ monastery's ice and lightning attic
platforms (LOTs 14539 and 14376) run it.

A switch can now be asked for that (SwitchComponent::
AddActivationCallback). Where live's switch tells its group that it has
loaded, the platform here looks for its switches again each second until
it has found one.

The script was on the list of scripts left out, with a note that its
platform does not exist; it is taken off the list.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 16:57:15 -06:00

14 lines
596 B
C++

#pragma once
#include "CppScripts.h"
// L_SIMPLE_MOVER_SWITCH.lua with L_BASE_SWITCH_ACTIVATED_SERVER.lua: a moving platform that a switch sends to and fro
// (the NJ monastery's ice and lightning attic puzzles). It asks the switches in its switchGroup to tell it when they
// are activated and deactivated, and goes to waypoint 1 on the one and back to waypoint 0 on the other.
class SimpleMoverSwitch : public CppScripts::Script {
public:
void OnStartup(Entity* self) override;
void OnTimerDone(Entity* self, std::string timerName) override;
private:
void RequestSwitches(Entity* self);
};