• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

MagicEffects stack position

fish04k

Member
Joined
Mar 23, 2008
Messages
102
Reaction score
19
I searched and couldn't find anything in regards to this.

Wanted to know if it was possible to have a Magic Effect always show up under another magic effect? (Or creature/npc)

I know I could arrange them in the script to stack as I want but these two effects have different animation lengths so they begin to stack off and on.

example.jpg


Thanks
 
Just change the order in which you use doSendMagicEffect

So for example if right now you are currently doing:
doSendMagicEffect > arrow
doSendMagicEffect > box

Instead use:
doSendMagicEffect > box
doSendMagicEffect > arrow
 
I stated above they are different animation lengths. The box is about 1500-2000ms and the arrow 3000ms.

So when they are looping they eventually overlap despite the order you put them in.

Didnt know if there was a way to select which stack position its in.

(Same goes for npcs and monsters. I havent been able to find a way to put the box below them. It is always displayed above.)
 
Sorry I did not understand what you meant in your original post. Are you sure that the arrow and box are different lengths? (for me they are exactly the same (8.6) o_O) Either way, without a custom client I fear there is no way to force them on top of one another aside from changing the order they are sent to the client.
 
No problem. They are different lengths. I put them both the same delay and the arrow would last and the box would disappear.

Any idea if maybe source edits could accomplish this? Like the square box under a NPC idea I said previously?
 
Any idea if maybe source edits could accomplish this? Like the square box under a NPC idea I said previously?
No I believe that is all handled by the client. The only thing the server does is send the effect and position to the client.

Code:
void ProtocolGame::AddMagicEffect(NetworkMessage_ptr msg,const Position& pos, uint8_t type)
{
    msg->put<char>(0x83);
    msg->putPosition(pos);
    msg->put<char>(type + 1);
}
 
Sorry TFS 1.1.

Thought it was impossible on all servers so didn't think it would make a difference what server version I was on.

*And thank you for your help Xagul. I guess i'll just have to live with it. :-/
 
Back
Top