• 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!

C++ Sending floating text via source

reisbro

Member
Joined
May 15, 2017
Messages
94
Solutions
1
Reaction score
7
With the help of xeraphus I managed to get a code where items have x chance to be created with extra stats. However sometimes this chance can be pretty low, and it would suck for players lool at each item they drop in search of enhanced items. Is there any way I could send a magic effect to the position an item was created via source? I am on my cellphone now and don't have access to my code, but in item.cpp it goes like this:
C++:
if (rand ()%(100+1) < it.attackchance)
{
  setAttrValue (ITEM_ATTRIBUTE_ATTACK, it.attack + it.attackMax)
  // I WOULD LIKE TO SEND FLOATING TEXT HERE!
}

So basically that's it, is it possible to get the position of an item created via source file?
 
C++:
g_game.addAnimatedText("text", pos, color);
color needs to be TextColor_t enum type (can be found in const.h file)
 
Back
Top