Increase skill level button
Im very new to this so please have patience. My question is, I have a game that once you complete a level you gain skill points to put towards your skills for example; attack strenght : health ; defence. Every catagory has its own increase button that you could spend these skill point towards. Right now the value is set to 1 skill point increase for everytime the increase button is pressed once. I would like to know how to change that value. Lets say from 1 point per press to 10 points per press. Thx in advance
Just change skill = skill + 1 to skill = skill + 10 then?
I don't mean this to sound mean or condescending, but your question is seemingly so basic, I'm can't even imagine what the "problem" really is. Could you elaborate? Post whatever code you have?
I don't mean this to sound mean or condescending, but your question is seemingly so basic, I'm can't even imagine what the "problem" really is. Could you elaborate? Post whatever code you have?
Try:
instead of:
or
Code:
health += 10;instead of:
Code:
health++;or
Code:
health += 1;Howling Moon Software - CrayonBall for Mac and iPhone, Contract Game Dev Work
Thanks for your reply. The file im working with has a .NIB extension. Please take a look, Thanks.
Code:
<string>increase_skill.png</string>
<dict>
<key>$class</key>
<dict>
<key>CF$UID</key>
<integer>31</integer>
</dict>
<key>UIAlpha</key>
<real>1</real>
<key>UIBlue</key>
<real>0.5215686559677124</real>
<key>UIColorComponentCount</key>
<integer>4</integer>
<key>UIGreen</key>
<real>0.30980393290519714</real>
<key>UIRed</key>
<real>0.19607843458652496</real>
</dict>
<dict>
<key>$class</key>
<dict>
<key>CF$UID</key>
<integer>31</integer>
</dict>
<key>UIAlpha</key>
<real>1</real>
<key>UIBlue</key>
<real>0.0</real>
<key>UIColorComponentCount</key>
<integer>4</integer>
<key>UIGreen</key>
<real>0.0</real>
<key>UIRed</key>
<real>0.0</real>
</dict>
<dict>
<key>$class</key>
<dict>
<key>CF$UID</key>
<integer>33</integer>
</dict>
<key>UIShadowColor</key>
<dict>
<key>CF$UID</key>
<integer>133</integer>
</dict>
<key>UITitle</key>
<dict>
<key>CF$UID</key>
<integer>29</integer>
</dict>
<key>UITitleColor</key>
<dict>
<key>CF$UID</key>
<integer>132</integer>
</dict>
</dict>
<dict>
<key>$class</key>
<dict>
<key>CF$UID</key>
<integer>31</integer>
</dict>
<key>UIAlpha</key>
<real>1</real>
<key>UIBlue</key>
<real>0.0</real>
<key>UIColorComponentCount</key>
<integer>4</integer>
<key>UIGreen</key>
<real>0.0</real>
<key>UIRed</key>
<real>0.0</real>
</dict>
<dict>
<key>$class</key>
<dict>
<key>CF$UID</key>
<integer>31</integer>
</dict>
<key>UIAlpha</key>
<real>1</real>
<key>UIBlue</key>
<real>0.0</real>
<key>UIColorComponentCount</key>
<integer>4</integer>
<key>UIGreen</key>
<real>0.0</real>
<key>UIRed</key>
<real>0.0</real>
</dict>
<dict>
<key>$class</key>
<dict>
<key>CF$UID</key>
<integer>33</integer>
</dict>
<key>UIImage</key>
<dict>
<key>CF$UID</key>
<integer>135</integer>
</dict>
<key>UIShadowColor</key>
<dict>
<key>CF$UID</key>
<integer>138</integer>
</dict>
<key>UITitle</key>
<dict>
<key>CF$UID</key>
<integer>29</integer>
</dict>
<key>UITitleColor</key>
<dict>
<key>CF$UID</key>
<integer>137</integer>
</dict>
</dict>
<dict>
<key>$class</key>
<dict>
<key>CF$UID</key>
<integer>16</integer>
</dict>
<key>UIImageHeight</key>
<real>1</real>
<key>UIImageWidth</key>
<real>1</real>
<key>UIResourceName</key>
<dict>
<key>CF$UID</key>
<integer>136</integer>
</dict>
</dict>
<string>increase_skill_click.png</string>
<dict>
<key>$class</key>
<dict>
<key>CF$UID</key>
<integer>31</integer>
</dict>
<key>UIAlpha</key>
<real>1</real>
<key>UIBlue</key>
<real>1</real>
<key>UIColorComponentCount</key>
<integer>4</integer>
<key>UIGreen</key>
<real>1</real>
<key>UIRed</key>
<real>1</real>
</dict>
<dict>
<key>$class</key>
<dict>
<key>CF$UID</key>
<integer>31</integer>
</dict>
<key>UIAlpha</key>
<real>1</real>
<key>UIBlue</key>
<real>0.0</real>
<key>UIColorComponentCount</key>
<integer>4</integer>
<key>UIGreen</key>
<real>0.0</real>
<key>UIRed</key>
<real>0.0</real>
</dict>
<dict>
<key>$class</key>
<dict>
<key>CF$UID</key>
<integer>33</integer>
</dict>
<key>UIShadowColor</key>
<dict>
<key>CF$UID</key>
<integer>141</integer>
</dict>
<key>UITitle</key>
<dict>
<key>CF$UID</key>
<integer>29</integer>
</dict>
<key>UITitleColor</key>
<dict>
<key>CF$UID</key>
<integer>140</integer>
</dict>
</dict>
<dict>
<key>$class</key>
<dict>
<key>CF$UID</key>
<integer>31</integer>
</dict>
<key>UIAlpha</key>
<real>1</real>
<key>UIBlue</key>
<real>0.0</real>
<key>UIColorComponentCount</key>
<integer>4</integer>
<key>UIGreen</key>
<real>0.0</real>
<key>UIRed</key>
<real>0.0</real>
</dict>
<dict>
<key>$class</key>
<dict>
<key>CF$UID</key>
<integer>31</integer>
</dict>
<key>UIAlpha</key>
<real>1</real>
<key>UIBlue</key>
<real>0.0</real>
<key>UIColorComponentCount</key>
<integer>4</integer>
<key>UIGreen</key>
<real>0.0</real>
<key>UIRed</key>
<real>0.0</real>
</dict>
<dict>
<key>$class</key>
<dict>
<key>CF$UID</key>
<integer>89</integer>
</dict>
<key>UIAutoresizeSubviews</key>
<true/>
<key>UIAutoresizingMask</key>
<integer>36</integer>
<key>UIBaselineAdjustment</key>
<integer>1</integer>
<key>UIBounds</key>
<dict>
<key>CF$UID</key>
<integer>143</integer>
</dict>
<key>UICenter</key>
<dict>
<key>CF$UID</key>
<integer>144</integer>
</dict>
<key>UIClipsToBounds</key>
<true/>
<key>UIFont</key>
<dict>
<key>CF$UID</key>
<integer>106</integer>
</dict>
<key>UIMinimumFontSize</key>
<real>10</real>
<key>UIShadowOffset</key>
<dict>
<key>CF$UID</key>
<integer>147</integer>
</dict>
<key>UIText</key>
<dict>
<key>CF$UID</key>
<integer>145</integer>
</dict>
<key>UITextColor</key>
<dict>
<key>CF$UID</key>
<integer>146</integer>
</dict>
<key>UIUserInteractionDisabled</key>
<true/>
Okay, so if you've got a nib file, you're almost certainly working with a program in objective-c. The actual code you'll want to change is in a .m file. I guess you didn't write this program, but you'll have to track down what clicking that button does in the actual code, not in the nib file.
Howling Moon Software - CrayonBall for Mac and iPhone, Contract Game Dev Work
Just to add: nib files don't *do* anything, they just hook things up. Like Andy said you need to find the *code* that gets when that button is clicked.
Are you trying to add a cheat button to someone else game? if so then I hate to say this but it's a really difficult task (sometimes beyond possibility).
Sir, e^iπ + 1 = 0, hence God exists; reply!
Hi Unknown, in a nut shell yes. Im trying to mod the existing scipt thats installed in my iphone. i cant find any .m extension files as mentioned by the previous members. when a app is installed, does the program place files outside its own folder? and if so, is there anyway to track it?
No, the code is compiled into machine language. Unless you're very familiar with computer science / reverse engineering, and can read and write assembly code, you're not going to make this happen. The iPhone does not allow any kind of scripting so there's no way you'll find any simple scripts to even attempt to poke at. There might be some configuration files somewhere in the bundle that might have something interesting to you, though.
There's also the legal/moral issue that if it's not your code, you don't have any right to mess with it unless it's stated clearly in its license that you can do that.
Other than that, you also run the risk of doing something that will damage your iPhone, but to be able to change the app and still run it you'd have to have jailbroken anyway, so you're already in the "something will break" territory.
Other than that, you also run the risk of doing something that will damage your iPhone, but to be able to change the app and still run it you'd have to have jailbroken anyway, so you're already in the "something will break" territory.
thanks for the replies.Freaksoftware where should i start looking?
Perhaps reading this page will help you understand how far out of the realm of possibility this is:
http://en.wikipedia.org/wiki/Assembly_language
http://en.wikipedia.org/wiki/Assembly_language
Howling Moon Software - CrayonBall for Mac and iPhone, Contract Game Dev Work
yup that did it. Thanks Andy
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Saving the game state when pressing the Home button | Nacho | 3 | 3,001 |
Feb 10, 2009 05:33 PM Last Post: Nacho |
|
| curiosity button question | imaumac | 6 | 2,903 |
Jan 27, 2009 04:02 PM Last Post: imaumac |
|
| how to load a .png image into round rect button? | ericnk | 3 | 5,446 |
Jan 8, 2009 09:54 AM Last Post: kodex |
|
| Major OpenGL performance increase | smallstepforman | 2 | 2,748 |
Dec 21, 2008 11:01 PM Last Post: smallstepforman |
|
| a small question (xcode button actions) | imaumac | 3 | 3,808 |
Oct 14, 2008 10:03 PM Last Post: imaumac |
|

