Playing ParticleFX in GUI (SOLVED)

Having trouble getting the correct address to play a particle effect. Done a lot of trial and error and read a lot of threads and guides to no success.

Hierarchy and particle vfx id

Code:

function init(self)
	msg.post(".", "acquire_input_focus")
	print(msg.url())
	particlefx.play("#potionpot_highlight",testpfx)
end

error printed

image

I have tried many many other addresses in combinations of the variety of nested items.

Thank you for your consideration and help

You need to use the gui.play_particlefx() when working with particle effects attached to a gui component:

1 Like

Thank you so much! Really appreciate it.

Part of the confusion came because the manual for Particle FX does not mention it (specifically this spot here, which links to the dedicated particle fx but not gui fx)

Perhaps it would be helpful to include a link to the GUI FX documentation in that spot as well, since this page seems to cover Particle FX for both objects and gui instances.

Thanks again!

Yes, there is a separate manual for GUI ParticleFX:

But I agree, it could be referenced in the ParticleFX manual.

Here’s a small Pull Request for it:

Thanks :heart:

1 Like