SpawnPlayerEngine
method into the game
class.Method SpawnPlayerEngine:Int()
20
pixels right behind the ship with the GetVector
method.Local d:Float[] = player.GetVector(20,180.0+player.angle)
obj = eng.CreateImage(atlas, 16,96,16,16, d[0],d[1])
layerFX
.obj.SetAngle(player.angle) obj.SetScale(0.5) obj.SetLayer(layerFX)
100
milliseconds, call CreateObjTimer
. After that, close that method.eng.CreateObjTimer(obj, tmObjRemove, 100) Return 0 End
The method SpawnPlayerEngine
creates a nice particle effect that reassembles the thrust of an engine. It also creates a timer for each particle so it will be removed after its lifetime.
18.218.15.248