Ok so i'm doing an exam for computing in which i have to make a game called botmod, the objective of the game is the move your robot around and collect all the passengers on the map and return them to base without running out of power units.You start with 150 power units and each move costs a power units, the cost of power units per move is determined by the your traction and the terrain you are on on the map.What i need help with is programming the mods for the bot, the parts which impact the amount of power units used each turn. There are tracks, wheels and skis,i just need help with choosing your mods at the start menu and them then being applied to the bot in-game.Like for an example, i have a menu at the start of the game labelled ''Mods'' once this is clicked you will be presented with 3 buttons, Skis, tracks and wheels how do i make it so when i click on one of those it will apply it to the bot and have an impact on the amount of power units used per turn. Any tips and or tricks will be appreciated, thanks in advance
Offline
My class is making bot-mod on scratch aswell, what part do you need help with and what school do you go to?
Offline
Please ignore badman.
Probably the easiest way to do what you want to is to have a variable called WheelType. When you click on one of the buttons set the variable to wheels, tracks or skis.
Alternatively you could assign a number for each of them and have the variable store that number. For example: 1 for wheels, 2 for tracks and 3 for skis.
Your sprite for the bot would then change when you press start game by have a set of if statements to check which applies. You would also use if statements for other situations in the game such as checking traction for terrain based on your wheel type.
Offline
Surely this is cheating if you're asking for help for an exam project? Can't your teacher teach?
Offline
mills-potter wrote:
Surely this is cheating if you're asking for help for an exam project? Can't your teacher teach?
Our teacher has told us not to even talk to our peers about the Controlled Assessment, so this is a bit OTT.
Offline