Magic Effect 'move' with player?

GSMaster

Why? for money
Joined
Oct 26, 2008
Messages
160
Reaction score
8
Location
HKS <3
hello, how to make the animation on player (eg if it has 7 animations) was still on him (player) if player moves?
 

margoh

{{ user.title }}
Joined
Apr 1, 2013
Messages
684
Reaction score
229
If you want to make it sticked to character, you need to draw it in void Creature::internalDrawOutfit in creature.cpp file.
 
OP
GSMaster

GSMaster

Why? for money
Joined
Oct 26, 2008
Messages
160
Reaction score
8
Location
HKS <3
hm, i must combine something with this or not this way?
Code:
    void drawEffect(const Point& dest, float scaleFactor, bool animate, int offsetX = 0, int offsetY = 0, LightView *lightView = nullptr);

        for(const EffectPtr& effect : m_effects)
            effect->drawEffect(dest - m_drawElevation*scaleFactor, scaleFactor, animate, m_position.x - g_map.getCentralPosition().x, m_position.y - g_map.getCentralPosition().y, lightView);
 
Top