Sorry if i didnt post this in the right section. i didnt know where to post it. a mod can move it if needed.
anyways, i need help with a game im making.
i need to know how to make points. kind of like the points in spore, were you can add parts only if you have enough points and that will take away a certain amount of points, and if you remove the part, it gives you all the points back.
any ideas?
Offline
You can use a variable for the points, adding and subtracting points from the initial value whenever a part is added/removed (if that's what are going to do). ^^
Offline
MyRedNeptune wrote:
You can use a variable for the points, adding and subtracting points from the initial value whenever a part is added/removed (if that's what are going to do). ^^
but how do you make it so that you cant place the part if there isnt enough points?
Offline
wiimaster wrote:
MyRedNeptune wrote:
You can use a variable for the points, adding and subtracting points from the initial value whenever a part is added/removed (if that's what are going to do). ^^
but how do you make it so that you cant place the part if there isnt enough points?
For each part, before running the script that adds the part, you can make it check the points variable's value to see if it is greater that/less than a certain value (cost of the part).
For example, if your part costs 50 points:
[blocks]<when[ part ]clicked>
<if> <not> <( <{ points }> <<> 50 )> >>
[script that adds part goes here]
<end>
Offline