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

Post Reply  Post Oekaki 

Posted By Message


I'm living proof


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... - First CC09 video!


Cornwall UK


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.


Post Reply



Worth A Click