Problems with SetEmitterTarget()

So I spawn my enemies using some simple spawn code and add them to a table.

Then in my game loop I have

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
if enemies[1]  then
                
                Particles.SetEmitterTarget( "smallShipFiring1", enemies[1], false, 0, 0, 0  )
 
end     
        
        
if enemies[2] then
                
                Particles.SetEmitterTarget( "smallShipFiring2", enemies[2], false, 0, 0, 0 )
 
end     
        
if enemies[3] then
                
                Particles.SetEmitterTarget( "smallShipFiring3", enemies[3], false, 0, 0, 0 )
                                
end     
        
if enemies[4] then
                
                Particles.SetEmitterTarget( "smallShipFiring4", enemies[4], false, 0, 0, 0 )
 
end     
        
if enemies[5] then
                
                Particles.SetEmitterTarget( "smallShipFiring5", enemies[5], false, 0, 0, 0 )
                
end
views:1792 update:2012/2/10 9:26:24
corona forums © 2003-2011