Hey everyone, I’d like to as, you all for some tips on how to make an upgrade choicescript code and make work for the stats,
Your support is appreciated,
Hey everyone, I’d like to as, you all for some tips on how to make an upgrade choicescript code and make work for the stats,
Your support is appreciated,
Yikes, that’s a very broad and difficult question. You would need to show us the code that you’ve written already and then explain what you want to do with it and what you need help with. I don’t think anyone can just give you “an upgrade system” on its own without any further context.
I’ve noticed that you ask a lot of broad questions that people here have a hard time answering. Have you considered messaging a coder and talking to them one on one? It might be helpful to develop that kind of relationship, and there are a lot of us to choose from when it comes to coders
In addition, sometimes just trial and error is the best way to go about this.
I’m definitely not trying to discourage you asking questions, but the only way you’re going to learn is by making those frustrating mistakes…
And having those frustrating mistakes gives us workable code to help give you advice.
Please remember to check the wiki and tutorial, as well as the standard intro pages for CS. In addition, you can go to the …/scenes page of any WIP on DashingDon and get an idea of how other authors have programmed their games.
Everyone wants to help, but it’s really hard to do so with such generalized questions
Good luck with your game, @Star_saber_studios
“Upgrade” meaning “an upgrade system for a robot game”? I suggest you to make questions more clear so a commenter doesn’t have to guess what did you mean.
Well, I haven’t made any robot games, but I have some suggestions.
*create speed 0
*create armor 0
When creating our still not upgraded robot, we assign new values for our variables:
How quick and well armored will your robot be?
*fake_choice
#Very quick, but not well-armored.
*set speed 10
*set armor 5
#Well-protected, but slow.
*set speed 5
*set armor 10
Ta-da! You've built your robot.
*create super_armor false
What should I do?
*fake_choice
#Find more resources.
You spend your day mining asteroids.
*set resources +20
#Do some research.
You spend your day testing new materials.
*set research +20
*label buy_upgrades
You can add upgrades now! You have ${resources} resources to spend on them.
*choice
#I want to buy super-upgrades.
*goto super_upgr
*if (research >= 50) #I'll buy super-duper upgrades.
*goto super_duper
*if (research >= 80) #I want these mega-upgrades!
*goto mega_upgr
#I don't want to buy anything.
*goto end_upgrade
Those *goto commands send you to labels where you buy upgrades, such as:
*label super_upgr
*choice
*selectable_if ((resources >= 100) and (super_armor = false)) #Buy super-armor upgrade for 100 resources.
You get super armor! Your armor improves by 20.
*set armor +20
*set resources -100
*set super_armor true
*goto super_upgr
*selectable_if ((resources >= 100) and (super_speed = false)) #Buy super-speed upgrade for 100 resources.
You get super speed! Your speed improves by 20.
*set speed +20
*set resources -100
*set super_speed true
*goto super_upgr
#Go back.
*goto buy_upgrades
What these conditions for *selectable_if in front of an option mean? They mean you can only choose this option if you both have at least 100 resources and don’t have this particular upgrade installed. Otherwise this option will be inactive.
Anyway, I hope that helps.