How to trigger animations and particle effects in client

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
nmaligec
Warrior
Warrior
Posts: 253
Joined: 08 Apr 2010, 01:55

How to trigger animations and particle effects in client

Post by nmaligec »

I am trying to do a ranged boss mob. The standard use of attack animation in the spritesheed cannot handle doing a ranged attack. I managed to trigger one of the hardcoded eAthena effects to show on the target player when a mob_skill is used. I edited the procedures for a skill in skill.c and added a call to clif_specialeffect().

The only problem with this is that the monster attack animation is not triggered, it just stands there.

Is there anyway to force the client to call the animatedsprite function play(action)? The being class calls play() but only after checking against a limited set of valid actions. It would be great to skip this and just get at play(), if what it does is trigger any labeled action in the xml.

An alternative I was thinking about would be to emulate the way magic attacks work. I was thinking specifically of how the lightning bolt spell calls a particle over a targeted enemy. I really dont know how it is done, and havent been able to figure it out from the src. Any pointers on this would be appriciated.

My dream goal would be to enable the special attacks to trigger a specific animated action in the invoker's xml AND trigger a custom particle effect over the target.
nmaligec
Warrior
Warrior
Posts: 253
Joined: 08 Apr 2010, 01:55

Re: How to trigger animations and particle effects in client

Post by nmaligec »

I was wondering if it would be alright to modify the mob attack routines to add a check for displaying an attack effect over the target?

I was thinking maybe modify mob_db with 1 extra column which would be the effect number. If left out, the file parser, for mob data, could assign 0. In the attack if there is a non zero value, call clif_specialeffect() with the value for the effect #.

Unless there is already built in support for displaying an effect over the mob's target that I am unaware of, this seems to be the only way to do a decent long range mob attack. This feature SHOULD be supported, otherwise you are limited to melee monsters or range with so-so particle effects.
Post Reply