irchamandy Posted September 7, 2010 Posted September 7, 2010 I have to keep track of shots on goal in a hockey game. I want to be able to have a field count up by one every time I press a button. Is that possible?
bruceR Posted September 7, 2010 Posted September 7, 2010 Create this script and attach it to a button: Set Field [ game::score; game::score + 1]
irchamandy Posted September 7, 2010 Author Posted September 7, 2010 Thank you. I don't think I know as much about FM as you may think! If I create this script and attach it to a button, where does the counting happen? How do I direct the "+1" to a field?
comment Posted September 7, 2010 Posted September 7, 2010 I suggest you read these two previous threads: http://fmforums.com/forum/showtopic.php?tid/216178/post/362915/#362915 http://fmforums.com/forum/showtopic.php?tid/213573/
irchamandy Posted September 7, 2010 Author Posted September 7, 2010 Sorry, I read them but I don't get it. Maybe the solution is beyond me. I need a simple outcome - a field whose value increases by 1 every time I press a button - but it seems the path to it is quite complex.
comment Posted September 7, 2010 Posted September 7, 2010 No, it is very simple - but I suggested you read those threads in order to understand that this would not be a good solution. There are also demo files in these threads and perhaps you should take more than 10 minutes to peruse them.
irchamandy Posted September 7, 2010 Author Posted September 7, 2010 I did take the time but I don't follow what they are saying. I get that it may seem simple to you, but I am not a natural programmer so what they are saying is over my head. If there is a step by step solution somewhere, I am happy to follow it.
irchamandy Posted September 7, 2010 Author Posted September 7, 2010 This worked perfectly. And so simple! Thank you Bruce.
Recommended Posts
This topic is 5532 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now