Hey all, I've got a couple, probably easy, questions. I'd be really happy if someone could help me answer them! :)
1) Getting one item from a list:
Say I have a list (balllist) with a lot of ball types (tball) in it. How can I, instead of looping through the entire list, get data from one item in the list? For instance getting ball.speed from one of the balls in balllist.
2) Scope within functions:
I have a lot of classes (types) for stuff such as ball, paddle, powerup etc. When I want to make a new ball for instance, I do 'Global ball:tball = New tball'. If I do this in a function though, for instance 'Function createball()', the ball variable is not seen anywhere outside the function. I realize this is working as intended, but how do I deal with it?
1) Getting one item from a list:
Say I have a list (balllist) with a lot of ball types (tball) in it. How can I, instead of looping through the entire list, get data from one item in the list? For instance getting ball.speed from one of the balls in balllist.
2) Scope within functions:
I have a lot of classes (types) for stuff such as ball, paddle, powerup etc. When I want to make a new ball for instance, I do 'Global ball:tball = New tball'. If I do this in a function though, for instance 'Function createball()', the ball variable is not seen anywhere outside the function. I realize this is working as intended, but how do I deal with it?