Files
DarkflameServer/dScripts/02_server/Map/General/SimpleOnceOnlyMoverSpinnerEvent.cpp
Aaron Kimbrell 423b55e0b8 feat(scripts): L_SIMPLE_ONCE_ONLY_MOVER_SPINNER_EVENT
The script of the platforms a spinner moves once: a simple mover (or a
mover on a two point path) in the spinner's group_deactivated_event
group goes to its waypoint 1 when the spinner fires the event named in
the platform's name_deactivated_event. The NJ spinner script already
fires those events at its groups.

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

11 lines
480 B
C++

#include "SimpleOnceOnlyMoverSpinnerEvent.h"
#include "Entity.h"
#include "MovingPlatformComponent.h"
void SimpleOnceOnlyMoverSpinnerEvent::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) {
const auto event = self->GetVarAsString(u"name_deactivated_event");
if (event.empty() || args != event) return;
if (auto* const platform = self->GetComponent<MovingPlatformComponent>()) platform->GotoWaypoint(1);
}