| Author |
Message |
Verdagon
Veteran Member
Joined: 05 Oct 2003 Posts: 1047 Location: San Luis Obispo, CA
|
Posted: Tue Jan 27, 2004 6:15 pm Post subject: Counters |
What's a counter? Is it like a variable?
|
|
Wizard
Established Forum User

Joined: 30 Nov 2003 Posts: 68 Location: Bristol, England
|
Posted: Wed Jan 28, 2004 12:25 am |
Yes.
I was going to think of an example - but its early.! sorry.
|
|
Wizard
Established Forum User

Joined: 30 Nov 2003 Posts: 68 Location: Bristol, England
|
Posted: Wed Jan 28, 2004 4:59 am |
OK, I am awake now.!
Um a counter can be used to for something like the following...
every time a user builds a gun tower
increase a counter by one.
check for the value of the counter and if it is over a specific value create some more enemy units.
that sort of thing
|
|
Verdagon
Veteran Member
Joined: 05 Oct 2003 Posts: 1047 Location: San Luis Obispo, CA
|
Posted: Fri Jan 30, 2004 11:59 pm |
Ok thanks wiz.
|
|
Verdagon
Veteran Member
Joined: 05 Oct 2003 Posts: 1047 Location: San Luis Obispo, CA
|
Posted: Sat Jan 31, 2004 12:26 am |
Wizard, what's the condition that checks the counters? I cant find it.
Theres something called "Test persistent variable" but isnt that for the whole-campaign variables?
|
|
crakerz
Mega-Poster

Joined: 17 Sep 2003 Posts: 353 Location: California Bay Area
|
Posted: Wed Feb 04, 2004 3:55 pm |
Did you guys figure out how to test for counters? 'Cuz it would sure be nice!
|
|
crakerz
Mega-Poster

Joined: 17 Sep 2003 Posts: 353 Location: California Bay Area
|
Posted: Mon Feb 09, 2004 9:07 pm Post subject: Bump! |
I hate to bump, but as we progress with testing and building, I see more and more of a need to answer these issues.
1. Can we use them?
2. HOW?
I can create and modify, but not test. Not much use if the last can't be done. Anybody figure it out yet?
|
|
Wizard
Established Forum User

Joined: 30 Nov 2003 Posts: 68 Location: Bristol, England
|
Posted: Tue Feb 10, 2004 12:44 am |
Yes.
There is a MODIFY COUNTER action...
This, take from my newly created CHM Help File...
Modify Counter
--------------------------------------------------------------------------------
Format :
Counter 'Counter': Set/Add/Subtract quantity
Description :
Use this to modify the value of a Counter
Example :
Counter 'cntCounter': Set 60
Counter 'cntCounter': Subtract 5
There is no SET COUNTER, as you set the value as in the first example.
Also, DON'T think in terms of counters (up/down) but in terms of variables.
|
|
Verdagon
Veteran Member
Joined: 05 Oct 2003 Posts: 1047 Location: San Luis Obispo, CA
|
Posted: Tue Feb 10, 2004 8:03 am |
Thanks wizard! I was wondering where it was... I was looking under 'S' for "Set"...
...We've made and 'modified' the variable, how do we check/test it?
|
|
crakerz
Mega-Poster

Joined: 17 Sep 2003 Posts: 353 Location: California Bay Area
|
Posted: Tue Feb 10, 2004 10:51 am |
Wizard,
I appreciate the above, but you misunderstand my personal dilemma. I know about the Modify Counter action. I know how to set, add, subtract from it. But, as I posted in the sticky bug thread, if I use that action it freezes the level during load (even if it is the only action). Not sure if you also have this issue.
I understand that it is really a variable, also (many years of programming). I want to use it in that fashion.
What I want to know is how to TEST it. No Condition seems to look at it. I've tried using the Test Persistant Variable (which is the only one that *might* work), as well as just about every other condition that tests a quantity. I've tried many formats, including the use of preceding symbols (!@#$%&*etc) and enclosures ({[<>]}) in all combinations.
Nothing works.
|
|
Wizard
Established Forum User

Joined: 30 Nov 2003 Posts: 68 Location: Bristol, England
|
Posted: Tue Feb 10, 2004 11:43 am |
In that case we need one of the developers to help us out here.!
Calling scottlu.!
|
|
crakerz
Mega-Poster

Joined: 17 Sep 2003 Posts: 353 Location: California Bay Area
|
Posted: Tue Feb 10, 2004 3:05 pm |
Wiz, I am afraid Scott is having too much fun in San Jose looking at all the cool new OS 6 stuff  He won't be back until tonight.
I wanted to go. I even got the Developer's discount. But, I thought "spend the $$ on a new PDA or commute four hours round-trip in bumper-to-bumper?"
What really sucks, is I probably won't spend the $$ on the PDA, either 
|
|
Verdagon
Veteran Member
Joined: 05 Oct 2003 Posts: 1047 Location: San Luis Obispo, CA
|
Posted: Tue Feb 10, 2004 4:34 pm |
[quote="crakerz"]Wiz, I am afraid Scott is having too much fun in San Jose looking at all the cool new OS 6 stuff  He won't be back until tonight.
I wanted to go. I even got the Developer's discount. But, I thought "spend the $$ on a new PDA or commute four hours round-trip in bumper-to-bumper?"
What really sucks, is I probably won't spend the $$ on the PDA, either  [/quote]
Good choice Crakz. A meeting can last an hour, but a PDA can last a year. Don't get the Zodiac. It sucks.
|
|
scottlu
WI Founder

Joined: 15 Aug 2003 Posts: 1773
|
Posted: Wed Feb 11, 2004 1:37 am |
You guys found an action that was conceptualized but never implemented in-game! In other words it _seemed_ like a good idea at some point but didn't cross the finish line. I'll remove it for the next build.
To do counters you can use the "Test Persistent Variable" condition and the "Modify Persistent Variable" action.
About the conference: Palm OS 6 looks well engineered (this is coming from a former OS engineer). I'm giving it a tenative thumbs up. Can't wait for hardware.
|
|
Verdagon
Veteran Member
Joined: 05 Oct 2003 Posts: 1047 Location: San Luis Obispo, CA
|
Posted: Wed Feb 11, 2004 7:53 am |
[quote="scottlu"]You guys found an action that was conceptualized but never implemented in-game! In other words it _seemed_ like a good idea at some point but didn't cross the finish line. I'll remove it for the next build.
To do counters you can use the "Test Persistent Variable" condition and the "Modify Persistent Variable" action.
About the conference: Palm OS 6 looks well engineered (this is coming from a former OS engineer). I'm giving it a tenative thumbs up. Can't wait for hardware.[/quote]
So do we just type in the name of the counter inside the "test persistent variable" field?
|
|
Wizard
Established Forum User

Joined: 30 Nov 2003 Posts: 68 Location: Bristol, England
|
Posted: Wed Feb 11, 2004 8:17 am |
[quote="Verdagon"]So do we just type in the name of the counter inside the "test persistent variable" field?[/quote]
No, forget about the counters. Use Persistent Variables.!
Counters will no longer exist.
There is "Modify Persistent Variable" which contains a SET option to give it an inital value. It also has ADD and SUBTRACT.
There is also a "Set Persistent Variable Text". I have no idea why its there, or what it could be used for. 
|
|
crakerz
Mega-Poster

Joined: 17 Sep 2003 Posts: 353 Location: California Bay Area
|
Posted: Wed Feb 11, 2004 10:46 am |
Wiz, There are two types of variable here: text or string and integer. For example, rank is an integer, but $ranktitle is text or string.
Scott, we can't really use the persistant variables until we know what they all are
How's the list coming?
(So, you think PalmSource will continue to support garnet after they release cobalt?)
|
|
scottlu
WI Founder

Joined: 15 Aug 2003 Posts: 1773
|
Posted: Thu Feb 12, 2004 12:29 pm |
You can make up your own pvars just by picking a name as a reference. The fixed runtime variables are:
$ranktitle (text of title)
$grayscale (1 for grayscale, 0 otherwise)
$difficulty (1==easy, 2, 3==hard)
$demo (1 demo, 0 registered)
|
|
scottlu
WI Founder

Joined: 15 Aug 2003 Posts: 1773
|
Posted: Fri Feb 13, 2004 12:26 am |
In reply to your question crakerz about Garnet / Cobalt: I think they will continue to support Garnet for awhile because Cobalt is fresh - really fresh, as in it hasn't passed the test of maturity yet, and there is a thriving Garnet market that they don't want to kill until they have Cobalt established. I have to say though I remember their statement when OS 5 was released about maintaining an OS 5 build that would run on 68K processors (because of ARM transition fear) however I don't see any of those around.
|
|
Read-only historical archive — rebuilt from the original phpBB 2 database.
Forum software © 2001-2008 phpBB Group. Posts © their respective authors.
Warfare Incorporated © 2003-2026 Spiffcode, Inc.