i have the worm hole code written in c++
set up code:
With My_Particle1
.CreateBillboardSystem 502, 0, 3, Vector3(0,0,0), 0, GetTex("My_Texture1")
.ParticleSize = 9
.SetAlphaBlendingMode TV_CHANGE_ALPHA, D3DBLEND_SRCALPHA, D3DBLEND_ONE
.SetGravity 0, 0.3
.SetGeneratorSpeed 5
.SetParticleSpeed 0.1
End With
With My_Particle2
.CreateBillboardSystem 301, 0, 3, Vector3(0,0,0), 0, GetTex("My_Texture2")
.ParticleSize = 11
.SetAlphaBlendingMode TV_CHANGE_ALPHA, D3DBLEND_SRCALPHA, D3DBLEND_ONE
.SetGravity 0, 0.3
.SetGeneratorSpeed 50
.SetParticleSpeed 0.1
End With
With My_Particle3
.CreateBillboardSystem 301, 0, 3, Vector3(0,0,0), 0, GetTex("My_Texture3")
.ParticleSize = 28
.SetAlphaBlendingMode TV_CHANGE_ALPHA, D3DBLEND_SRCALPHA, D3DBLEND_ONE
.SetGravity 0, 0.3
.SetGeneratorSpeed 50
.SetParticleSpeed 0.07
End With
event code:
'Event Code for My_Particle1 :
LifeTime = 2
Dim tmpVel as D3DVECTOR
tmpVel = VScale(VNormalize(Vector3(0,0,0)), 0.6)
VelocX = tmpVel.x
VelocY = tmpVel.y
VelocZ = tmpVel.z
Dim vNewPosition As D3DVECTOR
Dim tmpAngle1 As Single, tmpAngle2 As Single
tmpAngle1 = Deg2Rad(Rnd * 360)
tmpAngle2 = Deg2Rad(Rnd * 360)
vNewPosition.x = 15 * Cos(tmpAngle1) * Cos(tmpAngle2) + 0
vNewPosition.y = 15 * Sin(tmpAngle2) + 0
vNewPosition.z = 15 * Sin(tmpAngle1) * Cos(tmpAngle2) + 0
My_Particle1.MoveEmittor vNewPosition
ColorR = 9.803922E-02
ColorG = 1
ColorB = 0
ColorA = 1
'Event Code for My_Particle2 :
LifeTime = 10
Dim tmpVel as D3DVECTOR
tmpVel = VScale(VNormalize(Vector3(0,0,0)), 5)
VelocX = tmpVel.x
VelocY = tmpVel.y
VelocZ = tmpVel.z
Dim vNewPosition As D3DVECTOR
Dim tmpAngle1 As Single, tmpAngle2 As Single
tmpAngle1 = Deg2Rad(Rnd * 360)
tmpAngle2 = Deg2Rad(Rnd * 360)
vNewPosition.x = 15 * Cos(tmpAngle1) * Cos(tmpAngle2) + 0
vNewPosition.y = 15 * Sin(tmpAngle2) + 0
vNewPosition.z = 14 * Sin(tmpAngle1) * Cos(tmpAngle2) + 0
My_Particle2.MoveEmittor vNewPosition
ColorR = 1
ColorG = 4.705882E-02
ColorB = 0.172549
ColorA = 1
'Event Code for My_Particle3 :
LifeTime = 10
Dim tmpVel as D3DVECTOR
tmpVel = VScale(VNormalize(Vector3(0,0,0)), 1.1)
VelocX = tmpVel.x
VelocY = tmpVel.y
VelocZ = tmpVel.z
Dim tmpPos As Integer
Dim vNewPosition As D3DVECTOR
tmpPos = Rnd * 360
vNewPosition.x = Sin(Deg2Rad(tmpPos)) * 30 + 0
vNewPosition.y = Sin(Deg2Rad(tmpPos)) * 15 + 0
vNewPosition.z = Cos(Deg2Rad(tmpPos)) * 30 + 0
My_Particle3.MoveEmittor vNewPosition
ColorR = 2.352941E-02
ColorG = 0.1215686
ColorB = 1
ColorA = 1
render loop code :
My_Particle1.UpdateParticles TV_UPDATE_BOUNCE_ON_Y0_PLANE Or TV_UPDATE_GENERATOR
My_Particle2.UpdateParticles TV_UPDATE_BOUNCE_ON_Y0_PLANE Or TV_UPDATE_GENERATOR
My_Particle3.UpdateParticles TV_UPDATE_BOUNCE_ON_Y0_PLANE Or TV_UPDATE_GENERATOR
My_Particle1.RenderParticles
My_Particle2.RenderParticles
My_Particle3.RenderParticles