About Store Forum Documentation Contact



Post Reply 
Particles won't load
Author Message
yvanvds Offline
Member

Post: #1
Particles won't load
Hi.

I'm having trouble loading particles from code. They work ok when I just add them to a world and load that world, but not when I load them by code. It should be possible to write:

PHP Code:
Particles p;
p.create(*ParticlesCache(UID(134962758012264512167187257652878621812))); 

... but this fails with 'can't load Particles "<particleID>"

Even just using this:

PHP Code:
ParticlesCache(UID(134962758012264512167187257652878621812)); 

gives the same error. I'd think the particle in question could not be found or is corrupt. But it does exist and looks fine in the editor.

I've created a small test project which demonstrates this behaviour:
.zip  particle test.zip (Size: 9.52 KB / Downloads: 0)
12-07-2014 02:52 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Particles won't load
Hello,

I haven't checked the zip file, because I think if you're creating it in the editor then it must be a game object, and not particles cache.
Please look at game particle object source how it handles loading particles from an object.
https://github.com/Esenthel/EsenthelEngi...ticles.cpp

You can reuse that code:
Game.ObjParticles p;
p.craete(from game object);
use created p.particles.
12-07-2014 10:21 PM
Find all posts by this user Quote this message in a reply
Post Reply