mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-17 02:02:50 +00:00
feat(scripts): Portabello's starflies start moving when their mission is handed in
WBL_Starflies had no script. As the live script: when the mission given at that object is handed in, every object of the Starflies group starts its path. Check: in Portabello, hand in the starflies mission: the starflies fly off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
14
dScripts/zone/LUPs/WblStarflies.cpp
Normal file
14
dScripts/zone/LUPs/WblStarflies.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "WblStarflies.h"
|
||||
|
||||
#include "Entity.h"
|
||||
#include "EntityManager.h"
|
||||
#include "eMissionState.h"
|
||||
#include "MovingPlatformComponent.h"
|
||||
|
||||
void WblStarflies::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) {
|
||||
if (missionState != eMissionState::COMPLETE && missionState != eMissionState::READY_TO_COMPLETE) return;
|
||||
for (auto* starfly : Game::entityManager->GetEntitiesInGroup("Starflies")) {
|
||||
if (starfly == self) continue;
|
||||
if (auto* movingPlatform = starfly->GetComponent<MovingPlatformComponent>()) movingPlatform->StartPathing();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user