List Element: Difference between revisions

m
The examples all use .png file type
m (Rename to meaningful file names)
m (The examples all use .png file type)
Line 27: Line 27:
Here is the script for when a player shoots a bullet.
Here is the script for when a player shoots a bullet.


{{Image|List_Element_example1_bullet.jpg}}
{{Image|List_Element_example1_bullet.png}}


Explanation:
Explanation:
Line 38: Line 38:
How do we fix that?
How do we fix that?


{{Image|List_Element_example1_store_bullets.jpg}}
{{Image|List_Element_example1_store_bullets.png}}


Lists are like variables, but they can store more values in one, so we just have to store the bullets and their velocities like so.
Lists are like variables, but they can store more values in one, so we just have to store the bullets and their velocities like so.
We have to make sure to increment the index, otherwise the next bullet would be stored in the list with the same index giving us the same problem we had with the previous script.
We have to make sure to increment the index, otherwise the next bullet would be stored in the list with the same index giving us the same problem we had with the previous script.


{{Image|List_Element_example1_move_bullets.jpg}}
{{Image|List_Element_example1_move_bullets.png}}


Next thing we have to do is run the script for every bullet with a [[loop]].
Next thing we have to do is run the script for every bullet with a [[loop]].