Remove particles through script
Posted: January 9th, 2011, 8:31 am
I am trying to do the following:
There is a key surrounded by a particle beam (cylinder). When the player picks up the key, the particle beam disappears.
I managed to create the key using a spawn point and it is possible to pick it up.
How can I destroy the beam after the key has been picked up?
From what I understand I should use the "destroy" command on the particle beam. But to be able to get a reference to the particle beam object, I need to spawn it using a spawn point, just like for the key. The problem is that there seems to be no command to spawn particles/effects. I even checked the source code and it seems that it's only possible to spawn creatures, items and objects.
Any idea if there is another way to do it ?
Else this is a feature that should be added. I have some other ideas regarding the appearance or disappearance of permanent particle effects.
Thanks,
Vincent
There is a key surrounded by a particle beam (cylinder). When the player picks up the key, the particle beam disappears.
I managed to create the key using a spawn point and it is possible to pick it up.
How can I destroy the beam after the key has been picked up?
From what I understand I should use the "destroy" command on the particle beam. But to be able to get a reference to the particle beam object, I need to spawn it using a spawn point, just like for the key. The problem is that there seems to be no command to spawn particles/effects. I even checked the source code and it seems that it's only possible to spawn creatures, items and objects.
Any idea if there is another way to do it ?
Else this is a feature that should be added. I have some other ideas regarding the appearance or disappearance of permanent particle effects.
Thanks,
Vincent