mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-14 15:57:13 +00:00
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>
14 lines
596 B
C++
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);
|
|
};
|