The Daily Click ::. Forums ::. Klik Coding Help ::. Compare to the number of objects with this value
 

Post Reply  Post Oekaki 
 

Posted By Message

Nillo



Registered
  19/10/2003
Points
  151

Has Donated, Thank You!
11th December, 2004 at 16:30:25 -

I want to check how many Example Object that have alterable value A=1. Is this possible? If so, how does it work?

Thanks in advance.

 
n/a

Liquixcat

Administrator
Lazy Coder

Registered
  08/12/2002
Points
  201

VIP MemberLikes TDCKitty
11th December, 2004 at 16:57:31 -

+alt value a of object1 = 0
:set value b = 1

+always
set counter to (number of object1 in playfield - object1 alt value b)
??
i dunno, maybe

 
thinking is like pong, it's easy, but you miss sometimes.

Liquixcat

Administrator
Lazy Coder

Registered
  08/12/2002
Points
  201

VIP MemberLikes TDCKitty
11th December, 2004 at 16:59:26 -

you'd also have to add a negate if that even works incase the value a changes from 0 to 1+

+alt value a of object1 = <=1
:set value b = 0

Image Edited by the Author.

also...if you have any duplicates of an object then you'd prolly have to divide each single object by how many objects there is...or else it migth not work...

but other then that, works for me

Image Edited by the Author.

 
thinking is like pong, it's easy, but you miss sometimes.

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
11th December, 2004 at 18:34:48 -

You'd have to use the Selected Object counter object, in an event with 'Value A of Object = 1'.

 
n/a

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
11th December, 2004 at 20:05:16 -

The Selected Object Counter object doesn't work with qualifiers though, for that you'll need the Value Finder object.

 
- Tigerworks

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
11th December, 2004 at 20:06:09 -

Couldn't you just use "Pick all objects with referance to their alterable value"? It's listed in conditions under the create object icon.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Jatzek(DreamEvil Corp)



Registered
  21/06/2003
Points
  949

VIP Member
12th December, 2004 at 13:01:30 -

Each "Example Object" has the same Alterable Value...

 
"Some nightmares never go away"

I'm waiting for you in SILENT HILL!

Nillo



Registered
  19/10/2003
Points
  151

Has Donated, Thank You!
12th December, 2004 at 13:07:32 -

>You'd have to use the Selected Object counter object, in an event with 'Value A of Object = 1'.

I'll go download that right away. Thanks!

 
n/a

Airflow

imafirinmahlazr

Registered
  24/09/2003
Points
  -197

VIP MemberSonic SpeedSnow Cloud!Computer
13th December, 2004 at 05:03:41 -

I tried to do that in a RTS game to count how many units are selected.
In short: It's abandonware.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click