Weapon Reward System With Points
TouchTiltGames
Member Posts: 1,162
I'm wondering what the best route is to take for a problem I need to solve:
I have a score system in place so when you hit an actor with one of the objects, you gain points, only I want to award more weapons/items to the player when they reach certain point intervals in the game - a reward system if you will.
So:
at 200 points you get X.Weapon
at 300 points you get X.Weapon
etc...
I was thinking that I just say on my points actor: If points attribute is greater than 100pts, spawn X.Weapon in a position. If greater than 200pts, spawn another Weapon etc.
I want to have all the weapons there on the HUD but greyed/locked until they reach the points. So could I get this job done just by using what I described above? Is it the best way to do this for a whole wack of guns/actors on the screen?
Thanks in advance
I have a score system in place so when you hit an actor with one of the objects, you gain points, only I want to award more weapons/items to the player when they reach certain point intervals in the game - a reward system if you will.
So:
at 200 points you get X.Weapon
at 300 points you get X.Weapon
etc...
I was thinking that I just say on my points actor: If points attribute is greater than 100pts, spawn X.Weapon in a position. If greater than 200pts, spawn another Weapon etc.
I want to have all the weapons there on the HUD but greyed/locked until they reach the points. So could I get this job done just by using what I described above? Is it the best way to do this for a whole wack of guns/actors on the screen?
Thanks in advance
Comments
e.g.
If score >99
If score <200
Spawn weapon
Next
if score >199
If score < x
etc etc
On your greyed out actors, when score > x
change image/alpha
That should be fine
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
To get to this go self.color.alpha
if you put the alpha at 0 its transparent, if you put it at 1 you can totally see it......
Soo if you wanted it at 20% enter .2
Hope that helps! Good Luck!
Just an example:
So when game.score > 1000 change hidden actor to true, when hidden actor is true: do this
Hope that helps, Good Luck!
There are four 'special weapons' - let's call them W1, W2, W3 and so on...
They can each be upgraded four times.
So what I do is give each of those a starting value of 0.
W1 = 0
W2 = 0
etc
If the value is at 0, they are dormant. You cannot use them.
If the value is 10, then they're at power 1.
If the value is 20, then they're at power 2.
If the value is 30, then they're at power 3.
If the value is 40, then they're at power 4.
So, in your case, you have your powerup at the start of the game at 0 (not working)
When you reach a certain score, let powerup value = 10
Get further, let powerup value =20
That should help. Sorry if it confuses, it was made with a 'shop' in mind.
Cheers,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
-shane
There an easier more efficient way?
Rule
When ALL conditions are valid:
Touch is Pressed
self.alpha = 1
-----[do something]