DarkflameServer/dScripts/ai/WILD/WildNinjaSensei.cpp
Aaron Kimbrell ce51438bc8
Implement some scripts for alpha FV (#1049)
* Implement maelstrom fog for alpha FV
add OnOffCollisionPhantom call to cppscripts
Add physics shape for gas blocking volume

* Add Ninja Sensie Script for alpha FV
and migration

* Fix private var casing

* And ninja wild scripts
they keep making me add more things

* address feedback

---------

Co-authored-by: Gie "Max" Vanommeslaeghe <gievanom@hotmail.com>
2023-04-12 11:46:31 -05:00

37 lines
1.4 KiB
C++

#include "WildNinjaSensei.h"
#include "Entity.h"
void WildNinjaSensei::OnStartup(Entity* self) {
GameMessages::SendPlayAnimation(self, u"bow");
self->AddTimer("CraneStart", 5);
}
void WildNinjaSensei::OnTimerDone(Entity* self, std::string timerName) {
if (timerName == "CraneStart") {
auto ninjas = EntityManager::Instance()->GetEntitiesInGroup("Ninjastuff");
for (auto ninja : ninjas) ninja->NotifyObject(self, "Crane");
self->AddTimer("Bow", 15.5f);
self->AddTimer("TigerStart", 25);
GameMessages::SendPlayAnimation(self, u"crane");
} else if (timerName == "TigerStart") {
auto ninjas = EntityManager::Instance()->GetEntitiesInGroup("Ninjastuff");
GameMessages::SendPlayAnimation(self, u"bow");
for (auto ninja : ninjas) ninja->NotifyObject(self, "Tiger");
self->AddTimer("Bow", 15.5f);
self->AddTimer("MantisStart", 25);
GameMessages::SendPlayAnimation(self, u"tiger");
} else if (timerName == "MantisStart") {
auto ninjas = EntityManager::Instance()->GetEntitiesInGroup("Ninjastuff");
GameMessages::SendPlayAnimation(self, u"tiger");
for (auto ninja : ninjas) ninja->NotifyObject(self, "Mantis");
self->AddTimer("Bow", 15.5f);
self->AddTimer("CraneStart", 25);
GameMessages::SendPlayAnimation(self, u"mantis");
} else if (timerName == "Bow") {
auto ninjas = EntityManager::Instance()->GetEntitiesInGroup("Ninjastuff");
for (auto ninja : ninjas) ninja->NotifyObject(self, "Bow");
GameMessages::SendPlayAnimation(self, u"bow");
}
}