Page 1 of 1

How do I attach sprite effect on projectile?

Posted: Fri Mar 13, 2009 11:15 am
by antis
May I know how I can attach sprite effect on projectile? I have seen people done it, like the following examples:
download/file.php?id=995
and
http://drivingblind.eu/quark_gun.jpg

Please tell me if you know, thanks!

Re: How do I attach sprite effect on projectile?

Posted: Fri Mar 13, 2009 12:58 pm
by Juutis
Welcome to the forums. :)

The manual:
effect0 name of predefined effect attached to projectile
effectbone0 name of bone to attach effect to, if not defined then the root bone is used
effect1 name of predefined effect attached to projectile
effectbone1 name of bone to attach effect to, if not defined then the root bone is used
effect2 name of predefined effect attached to projectile
effectbone2 name of bone to attach effect to, if not defined then the root bone is used
effect3 name of predefined effect attached to projectile
effectbone3 name of bone to attach effect to, if not defined then the root bone is used
effect4 name of predefined effect attached to projectile
effectbone4 name of bone to attach effect to, if not defined then the root bone is used

...

All the effects that can be attached to the projectile must be predefined and will move with the projectile as it moves. See Predefined Effects for more details on constructing these effects.
So in short: Create an effect in effect.ini and add this to the projectile definition in weapon.ini:

Code: Select all

effect0 = <your effect name>
effectbone0 = <the bone you want to attach the effect>
You can add multiple effects to a single projectile, too.

Re: How do I attach sprite effect on projectile?

Posted: Fri Mar 13, 2009 4:44 pm
by antis
Thank you very much. That's helpful. :D