Hello all,
Been creating a game in Scratch where a robot moves around a grid and depletes energy according to the movements. I have 9 different sprites for the different types of robots. The robots have an energy variable which depletes when they move.
I now want to add some sprites for them to "collect". The aim of the game is to rescue all people and return to a base sprite.
The issue I have is that I create the sprites, put them on the map and I want to make it so that each robot has a different capacity. I've created a capcity variable but when the robot deposits the first lot of passengers off and the capcity is reset to 0 no other passengers will be collected.
Anyone have an idea of what sorta script I could use?
Thanks
Offline
Maybe give each robot a variable and a list, make the variable set to the maximum amount of passengers a robot can carry. Whenever a robot picks up a passenger it adds a slot to the list. Then when the length of the list = capacity, it can no longer pick up passengers. When depositing the first load, just clear the whole list but do not change the capacity variable.
Offline
Kileymeister_test wrote:
Maybe give each robot a variable and a list, make the variable set to the maximum amount of passengers a robot can carry. Whenever a robot picks up a passenger it adds a slot to the list. Then when the length of the list = capacity, it can no longer pick up passengers. When depositing the first load, just clear the whole list but do not change the capacity variable.
ha, I was gonna put about the same thing and was typing it until I saw this
Offline