You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do I run a check for when duel stops? I'm Working on system that needs to check status I did get some ideas looking at DuelHandler.cpp in core, so far works in logic but I can't seem to get it to detect if player fails a duel.
This is code I made up so far:
void OnDuelComplete(Player* player, Player* opponent, DuelCompleteType reason)
{
// Check if duel is completed
if (reason == DUEL_WON || reason == DUEL_INTERRUPTED)
{
if (player->GetHealth() == 0) // Player lost I'm also checking Health
{
// Player lost the duel
}
else if (opponent->GetHealth() == 0) // Opponent lost I'm also checking Health
{
// Opponent lost the duel
}
}
}
I'm guessing I'm close but missing something.. My outcome is to trigger a custom message to the loser of Duel
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
How do I run a check for when duel stops? I'm Working on system that needs to check status I did get some ideas looking at DuelHandler.cpp in core, so far works in logic but I can't seem to get it to detect if player fails a duel.
This is code I made up so far:
I'm guessing I'm close but missing something.. My outcome is to trigger a custom message to the loser of Duel
In top of code I have set:
Beta Was this translation helpful? Give feedback.
All reactions