Quote Posted by Nameless Voice
Okay, let's see... first I'll sum up how I made the original fire sword.
First, I used VK's TrapSMTrans script on the sword to listen for InvSelect messages.
I hooked this up to a timer, and the timer to a conversation. (Slightly later, I replaced this with a delayed EmitterTrap that emitted a Genie.)
The conversation added a metaproperty to the object PlyrArm (which is the special 'arm' object that gets created by the game when the player has a mêlée weapon drawn).
This metaprop had the Renderer->Mesh Attach property, set up to attach a concrete object (#21, IIRC) to the appropriate joint of the mesh it was applied to.
Because that property can't be inherited, I used S&Rs on the mprop to copy it from the mprop to the concrete PlyrArm object.
That was basically it. I also had TrapSMTrans listening for InvDeselect, which was linked to another timer which would trigger another conversation to teleport the particle effect into a blue room when the sword was put away (to stop it from lingering around.)
However, that system was very buggy, mainly because the amount of time between the player selecting the sword and the arm being created is variable, depending on what weapon the player had equipped before.
But anyway, that's not a problem anymore, because I have a custom script to do all the work much more reliably. I will now explain its setup:
Create the flaming sword object (or archetype), and give it the
NVNewWeapon script.
Set up the Editor->Design Note property as follows:
NVWeaponMeta="M-FlamingSword"; NVWeaponAttach1="SwordParticles".
Go to the object hierarchy and create a metaprop named
M-FlamingSword.
Give it the
Renderer->Mesh Attach property:
Attached Obj 1: (any number. It won't be used.)
Joint of skeleton: 3
x angle (0-65535): 13500
y angle (0-65535): 20500
z angle (0-65535): 0
Offset: X: 0; Y: 0.50; Z: 0
(If you do not specify the Mesh Attach property, the game will crash when you equip the weapon. I should probably write a failsafe into the script to avoid this...)
Also give it a Renderer->Transparency (Alpha) of around 0.50 (tweak it until it looks right to you.)
Now, create an archetype named
SwordParticles under
SFX->FireFX.
Set its properties as follows:
Renderer->Dynamic Light: 125
Renderer->LightColour: Hue: 0.10; Saturation: 0.75
A->AmbientHacked: Radius: 20; Schema Name: fire_flame
Add
SFX->Particles:
Active: True
Particle render type: Single-coloured disc
Particle animation: Launched continually
Particle group motion: Attached to object
Number of particles: 240
Size of particle: 0.20
Bitmap name: (Leave blank OR use Eshaktaar's flame TGAs.)
Velocity: 0, 0, 0
Gravity Vector: 0, 0, 0
Colour (Palettised): 125
2nd Colour: 188
3rd Colour: 47
Alpha: 90
~
Particle Fade Time: 0.50
Launch Period: 0.01
~
Always Simulate: True
[All else false]
SFX->Particle Launch Info:Launch Type: Bounding Box
Box Min: X: -0.05; Y: -0.05; Z: 1.20
Box Max: X: 0.05; Y: 0.05; Z: 3.50
~
Velocity Min: X: -0.50; Y: 0.00; Z: 0.50
Velocity Max: X: 0.50; Y: 0.00; Z: 0.50
~
Min Time: 1.00
Max Time: 1.50
That should do it.
I have checked all the settings. They are all correct.