jestem pro
That is the question
- Joined
- Apr 20, 2013
- Messages
- 650
- Solutions
- 14
- Reaction score
- 87
Hello homies,
I need your advices and pointments.
I use 0.3.6 8.6 source, but can be for any.
GOAL: Add a prepareDeath method to source like onDeath/death is.
Why?: I have a script in creaturescripts, but it acts very weird. Not like it will suppouse to be.
Question: Is it possible to declare prepareDeath in the player class(player.cpp) and can work while a player is under dying?
I do not know how to join it into sources. I think about something like this:
for example dunno
I need your advices and pointments.
I use 0.3.6 8.6 source, but can be for any.
GOAL: Add a prepareDeath method to source like onDeath/death is.
Why?: I have a script in creaturescripts, but it acts very weird. Not like it will suppouse to be.
Question: Is it possible to declare prepareDeath in the player class(player.cpp) and can work while a player is under dying?
I do not know how to join it into sources. I think about something like this:
for example dunno
C++:
bool Player::onPrepareDeath()
{
player->internalAddItem(this, 2160)
for (CreatureEvent* deathEvent : getCreatureEvents(CREATURE_EVENT_PREPAREDEATH)) {
deathEvent->executeOnPrepareDeath(this, nullptr);
}
return true
}