The Daily Click ::. Forums ::. Klik Coding Help ::. List creation and verification.
 

Post Reply  Post Oekaki 
 

Posted By Message

Fanotherpg

I'm living proof

Registered
  26/06/2004
Points
  522

Game of the Week WinnerKlikCast StarHas Donated, Thank You!Second GOTW AwardVIP MemberHasslevania 2!The OutlawPokemon Ball!Evil klikerComputer
I am an April FoolI donated an open source project
6th September, 2011 at 19:57:18 -

OK so there is limit of objects being able to be pasted to the background - and that's OK with my current game but it's bad for a tech which I'm doing ATM. But I found how to sort it out.

I got two objects A and B. A Discovers area, B Creates FOW effect by pasting itself in backdrop.

It works like that

B isn't overlapping A -> Set "A" X Position to ("B" X Position / 40)*40 ; Set "A" Y Position to ("B" Y Position / 40)*40

So it adds into background in each 40 pixel square.

But now my issue appears. I would like to save position of A object in each of those 40 pixel sized squared to the list of any kind (Array, List Object, whatever) but only if that position never appeared on the list.

Thanks to that object B will be pasting only in new just discovered areas.

Anyone able to tell me how to do it, or provide any example? I would like to make my idea public, so any help appreciated.

 
Click Convention 2009:
Working over conversion of Videos...
http://www.youtube.com/watch?v=Tumi-DcBxEA - First CC09 video!

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1833

VIP Member
6th September, 2011 at 23:40:53 -

A two-dimensional array would seem like the obvious solution.
Something like this:

+ Whenever...
+ If ValueAtXY( "Array", X("A")/40, Y("A")/40) = 0
-> Array: Write value "1" to X("A")/40, Y("A")/40
-> B: Paste into background

Have you considered using the Surface extension instead of pasting objects into the background? You wouldn't have to worry about the object limit that way.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click