5017 - Monsters Die sequence & Flags

02/23/2018 21:54 abdeen#1
Hello guys, i am working now on monsters die system
now guards and players can kill the monsters...

but when the monster dies , it`s names still appears, and i have a timer system to remove all dead monsters from screen after 4 seconds , but my problem now its i think i pass a wrong flag to monsters...

so what exactly flags i shall pass to monster when died and before it`s disappear from screen to act like normal co and to fade-away the right way ?

currently i am passing this flags after monster die, and i am not sure if they are correct values or not for version 5017.

Die = 0x400
Frozen = 1UL << 59
Ghost = 0x20
02/23/2018 22:17 JaniQ#2
Monsters don't have a ghost state
they die and then they fade/disappear.

Dead = 1UL << 5,
Disappear = 1UL << 11,
02/23/2018 22:49 abdeen#3
Quote:
Originally Posted by JaniQ View Post
Monsters don't have a ghost state
they die and then they fade/disappear.

Dead = 1UL << 5,
Disappear = 1UL << 11,
they die but not fade just stay like in this pic
[Only registered and activated users can see links. Click Here To Register...]
02/23/2018 23:06 JaniQ#4
Are you removing the monsters correctly using the remove entity action?
02/23/2018 23:14 abdeen#5
Quote:
Originally Posted by JaniQ View Post
Are you removing the monsters correctly using the remove entity action?
Yes but in this pic it`s before i send remove entity action
03/08/2018 22:46 Yupmoh#6
This is really easy, there are three stages to consider when handling death.
1- Dying - This is achieved by sending a MsgInteract.
Example:
Code:
Vision.SendToScreen(MsgInteract.Create(Attacker.UID, Creature.UID, X, Y, InteractActionType.Kill, deathtype), true);
2- Fading - This is achieved by sending a MsgUserAttribute if I remember correctly.
Example:
Code:
Vision.SendToScreen(MsgUserAttrib.Create(Creature.UID, UpdateType.StatusEffects, 2080));
3- Despawning - After 3 seconds of fading you need to completely remove the entity from players screens by sending an entity removal.
Example:
Code:
Vision.SendToScreen(MsgAction.Create(Creature.UID, 0, 0, 0, DataAction.RemoveEntity));
Thats just atop of my head. Hope it helped.