I need help.
I thought it would be cool if I had little black spheres representing smoke to come out of the exhaust pipe of my car-like things in my latest game-like thing. They would rise up and fade away, in which case I'd delete them.
Well, I'm not too good at Blitz3D... yet, but I tried... and failed miserably.
Here's the pertinent code:
When an entity gets to the point of deletion, no matter what number I set for that point, an error pops up at me saying that the entity does not exist (it highlights the MoveEntity line).
If I try using "delete bubble\entity" instead of FreeEntity (is there a difference?), it says it "can't delete non-Newtype."
Furthermore, the bubbles always spawn from the same point, and not from the end of my exhaust pipe.
Basically, here are the big three questions:
1. How can I delete the bubbles?
2. Is there a difference between FreeEntity and Delete?
3. How can I make the bubbles not follow me, but spawn from the end of the exhaust pipe?
I thought it would be cool if I had little black spheres representing smoke to come out of the exhaust pipe of my car-like things in my latest game-like thing. They would rise up and fade away, in which case I'd delete them.
Well, I'm not too good at Blitz3D... yet, but I tried... and failed miserably.
Here's the pertinent code:
Function bubbles() For bubble.bubble = Each bubble MoveEntity bubble\entity, Rnd(-.1, .1), .2, Rnd(-.1, .1) ScaleEntity bubble\entity, 2.5, 2.5, 2.5, True bubble\alpha# = bubble\alpha# - .05 EntityAlpha bubble\entity, bubble\alpha# Print bubble\alpha# WaitKey If bubble\alpha# < .1 FreeEntity bubble\entity Return EndIf Next If Rand(5) = 5 bubble.bubble = New bubble bubble\entity = CreateSphere(8) bubble\alpha = 1 ScaleEntity bubble\entity, .1, .1, .1 EntityColor bubble\entity, 0, 0, 0 PositionEntity bubble\entity, EntityX(sphere\exhaustpipe), EntityY(sphere\exhaustpipe), EntityZ(sphere\exhaustpipe) - 2 EndIf End Function
When an entity gets to the point of deletion, no matter what number I set for that point, an error pops up at me saying that the entity does not exist (it highlights the MoveEntity line).
If I try using "delete bubble\entity" instead of FreeEntity (is there a difference?), it says it "can't delete non-Newtype."
Furthermore, the bubbles always spawn from the same point, and not from the end of my exhaust pipe.
Basically, here are the big three questions:
1. How can I delete the bubbles?
2. Is there a difference between FreeEntity and Delete?
3. How can I make the bubbles not follow me, but spawn from the end of the exhaust pipe?