Welcome to Phrogram Sign in | Join | Help


Re: How do the enemies in "Planes" work?

  •  11-10-2006, 9:10 PM

    Re: How do the enemies in "Planes" work?

    Hi Peej, you need to remember that the targets are in a list and you need to be moving through the list in a loop or checking each item individually by item index in the list

    if you take the code you have here and put it in a loop like

    For i = 1 To tlist.count

        your code here

    Next

    Or you can check each one like:

    If SpritesIntersect( tlist.item(1).Name, fire.Name ) Then

        tlist.Item(1).Visible = False

    End If

    If SpritesIntersect( tlist.item(2).Name, fire.Name ) Then

        tlist.Item(2).Visible = False

    End If

    The loop method is far better but it you only wanted to test for intersection with one of you targets this would be the way to do it.

    Have Fun, hope this helps

    Filed under: , ,
View Complete Thread