for i = 1 to CurrentSpriteProp
if SpritePRop[i].id <> 0
if SpriteProp[i].flower = 1 or SpriteProp[i].flower = 5 or Spriteprop[i].flower = 20
for j = 1 to CurrentSpriteLine
if SpriteLine[j].id <> 0
a1 =0
b1 =0
if GetSpriteExists(SpriteProp[i].id)=1
a1= GetPhysicsCollision( SpriteProp[i].id,SpriteLine[j].id3 )
if a1 =1
x# = GetPhysicsCollisionWorldX( )
y# = GetPhysicsCollisionWorldY( )
SetSpritePositionByOffset(SpriteProp[i].id,x#,y#)
// SetSpritePhysicsOFf(SpriteProp[i].id)
// SetSpritePhysicsOFf(SpriteProp[i+1].id)
//SetSpritePhysicsOn(spriteProp[i].id,3)
if SpriteProp[i].flower = 1
SetSpriteAngle(SpriteProp[i+1].id,random(1,360))
SpriteProp[i].flower = 2
elseif SpriteProp[i].flower = 5
SpriteProp[i].flower = 6
elseif SpriteProp[i].flower = 20
SpriteProp[i].flower= 21
endif
tx# = random(1,75) * 0.1
tt = random(1,2)
if tt = 2 then tt = -1
if SpritePRop[i].flower <> 20
SpriteProp[i].angle = GetSpriteAngle(SpriteLine[j].id3)+90+tx#*tt
else
SpriteProp[i].angle = GetSpriteAngle(SpriteLine[j].id3)+90
RotateTree(i,SpriteProp[i].angle)
endif
SetSpriteAngle(SpriteProp[i].id,SpriteProp[i].angle)
weldingpoint = CreateWeldJoint(SpriteProp[i].id,SpriteLine[j].id3, x#,y#,1)
//b = CreateRevoluteJoint(SpriteProp[i].id,SpriteLine[j].id3,x#,y#,1)
SpriteProp[i].time1.time = TIMER1
SpriteProp[i].time1.delay = 2500
SpriteProp[i].lineConnect = j
SpriteProp[i].lineConnectX = GetSpriteXFromWorld(SpriteLine[j].id3,x#,y#)
SpriteProp[i].lineConnectY = GetSpriteYFromWorld(SpriteLine[j].id3,x#,y#)
SpriteProp[i].flip = 0
else
endif
endif
endif
next j
if a1 = 0
f1 = 0
for j = 1 to CurrentSpriteProp
if SpritePRop[j].phys > 0 and SpriteProp[j].flower = 25
f1= GetPhysicsCollision( SpriteProp[j].id,SpriteProp[i].id )
print(f1)
if f1 > 0
print("HEre")
x# = GetPhysicsCollisionWorldX( )
y# = GetPhysicsCollisionWorldY( )
SetSpritePositionByOffset(SpriteProp[i].id,x#,y#)
if SpriteProp[i].flower = 1
SetSpriteAngle(SpriteProp[i+1].id,random(1,360))
SpriteProp[i].flower = 2
elseif SpriteProp[i].flower = 5
SpriteProp[i].flower = 6
elseif SpriteProp[i].flower = 20
SpriteProp[i].flower= 21
endif
tx# = random(1,75) * 0.1
tt = random(1,2)
if tt = 2 then tt = -1
if SpritePRop[i].flower <> 20
SpriteProp[i].angle = GetSpriteAngle(SpriteProp[j].id)+90+tx#*tt
else
SpriteProp[i].angle = GetSpriteAngle(SpriteProp[j].id)+90
RotateTree(i,SpriteProp[i].angle)
endif
SetSpriteAngle(SpriteProp[i].id,SpriteProp[i].angle)
weldingpoint = CreateWeldJoint(SpriteProp[i].id,SpriteProp[j].id, x#,y#,1)
//b = CreateRevoluteJoint(SpriteProp[i].id,SpriteLine[j].id3,x#,y#,1)
SpriteProp[i].time1.time = TIMER1
SpriteProp[i].time1.delay = 2500
SpriteProp[i].lineConnect = j
SpriteProp[i].lineConnectX = GetSpriteXFromWorld(SpriteProp[j].id,x#,y#)
SpriteProp[i].lineConnectY = GetSpriteYFromWorld(SpriteProp[j].id,x#,y#)
//SpriteProp[i].flip = 0
endif
endif
next j
ok so in the first collision checking it works and the welingpoint is workig on the second it returns f1 = 0
any ideas?