Lotus Particle System

Blitz3D Forums/Blitz3D Beginners Area/Lotus Particle System

Jamie(Posted 2004) [#1]
Greetings All,


I am using the Lotus particle system and I am getting a weird error periodically. The error is "Runtime Error - Entity does not exist". I realize that this stems back to deleting an entity and then referencing later. The odd thing is the location of this error:

File: c_vector.bb
Function: LotusVec_Entity_Position.LotusVector(Entity,G=False)

Here is the code for the function:

Function LotusVec_Entity_Position.LotusVector(Entity,G=False)

If Entity=0 then Return Null
V.LotusVector = New LotusVector
V\X = EntityX(Entity,G)
V\Y = EntityY(Entity,G)
V\Z = EntityZ(Entity,G)
Return V
End Function

The error occurs on the EntityX line which leads me to believe that somewhere within the Lotus particle system the entity is being freed but is not being set to 0. I have checked my code a number of times (and will check it again) and could not find a place that I freed and entity without setting the entity to 0. Any insight would be helpful.


Thanks,

Jamie


N(Posted 2004) [#2]
Are you using Lotus R1 or R2 and are you remembering to initialize the system?


Jamie(Posted 2004) [#3]
Hello Noel,

Thank you for the reply. I am not sure which version of Lotus I am using. Is there an easy way to tell which version (a specific funciton that only exists in one of the versions or a comment blcok in one of the bb file)? I am definately initializing the system. The particle system works great except when this weird error pops up. It seems to happen periodically when I shoot one of the enemy helicopters at VERY close range. If the enemy if further away, it seems to work fine.

Any help would be greatly appreciated!!


Thanks,

Jamie


N(Posted 2004) [#4]
To tell which version you have, see if there's a c_particle.bb or if there's a c_particle_lite.bb (or something similar). The latter of the two is only included in R2 (Lite, which is the only available version, so there's no confusing full and lite at the moment).

Anyhow, I can't attempt to recreate the situation until I know which version, and Lotus R1 isn't being supported anymore so if you're using that version then it's something you're going to have to deal with yourself.


wizzlefish(Posted 2004) [#5]
And if you can't work out Lotus, try Particle Candy. But Lotus is free and is probably the better choice.


N(Posted 2004) [#6]
Or you could send me cash and get a copy of Lotus R2 full version (cheaper than Particle Candy), but it's unfinished so you'd be working with software that's still in-progress (I've not gotten around to finishing some bits of it up). You'd, of course, get free updates to any newer versions.


Jamie(Posted 2004) [#7]
Greetings...

The version I am using has a file called c_Particle.bb therefore I guess I am using R2 (Lite) I would be interested in using the full version, but would like to resolve the issue I am having first.

I finished going through my code and have been unable to finf anywhere that I delete an entity without setting it equal to 0. Any help would be greatly appreciated!


Thanks,

Jamie


N(Posted 2004) [#8]
Actually, that means you're using R1.

I'm not sure why this is occurring (and I honestly don't think it should be). What I'm going to suggest is pretty much backtrace from the error and see if you can find anything. In the mean time, I will try to reproduce this error, even if I've previously said I would not be supporting R1 anymore.


Jamie(Posted 2004) [#9]
Noel,

I appreciate your efforts. Out of curiousity how much "work" would it be start using R2 in my current application? I would be happy to change if it would make things easier.

Thanks


N(Posted 2004) [#10]
Not that much, actually. You'd just have to make sure you weren't using LPS scripts to load emitters (which, it turns out, isn't all that great- R2 will use XML for loading emitters instead).

The functions are pretty much the same between the two systems.


Jamie(Posted 2004) [#11]
I will start the process of converting over to R2. I will let you know how I progress and if I can reproduce the problem after switching from R1 to R2

Thanks,

Jamie


Jamie(Posted 2004) [#12]
Noel,

I have begun the process of converting and have a few questions. My implementation of Lotus R1 was totally based upon the "LotusTest.bb" file that came with R1. In this example your "fired" rockets ant a landscape. THe easiest way I could see to convert my app would be to get that example to work with the R2 files and then transfer the changes into my application. Well as soon as I started I ran into a function that I could not find. I am now looking through the code to find an an equivalent to SetEntityTrail from R1. I will let you know how I fair. Out of curiousity, do you have a version of the "rocket" demo that works with R2? If so that would help me greatly!!


Thanks

Jamie


N(Posted 2004) [#13]
I'd suggest just parenting an emitter to an entity to simulate SetEntityTrail (since that's pretty much the same thing). I'll try to port the rocket demo to R2 later.


Jamie(Posted 2004) [#14]
Noel, I wondered if you had a chance to convert the rocket demo over to R2 yet? I have kludged something together in the meantime but would really like to see "how it should be done"


Thanks,

Jamie


Jamie(Posted 2004) [#15]
Noel,

I am just now getting back to this project...work is killing me with the long hours! I was wondering if you had made any head-way with porting the rocket demo over to R2. As I mentioned earlier, I have thrown something together...but I am not entirely thrilled with it.

Thanks,

Jamie