The Daily Click ::. Forums ::. Klik Coding Help ::. Overlapping 2 actives, but only take 1?
 

Post Reply  Post Oekaki 
 

Posted By Message

Solgryn

Solgryn dot org

Registered
  20/12/2008
Points
  12572

GOTW Winner!VIP MemberWii OwnerIt's-a me, Mario!The Cake is a LieGOTM 2ND PLACE! - APRIL 2009GOTM 2ND PLACE - JUNE 2009PS3 OwnerKlikCast #15 Compo Winner!LOL Sign
You've Been Circy'd!GOTM WINNER - JANUARY 2010I am an April FoolGOTW MARCH 2010 WINNER!Santa Hat
22nd May, 2009 at 22:38:46 -

How do I do this?

What I mean is, if you have a character that can pick up stuff and hes overlapping 2 boxes (The actives), how do you make him only to take 1 box? Because if you do the overlapping he obviously takes them both. I guess it has something to do with fixed values or something but I would like an example or something since I can't get it to work .

Thanks in advance!

 
www.Solgryn.org

Image

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
22nd May, 2009 at 22:43:32 -

Limit the condition to do it once each time it loops?

 
n/a

Solgryn

Solgryn dot org

Registered
  20/12/2008
Points
  12572

GOTW Winner!VIP MemberWii OwnerIt's-a me, Mario!The Cake is a LieGOTM 2ND PLACE! - APRIL 2009GOTM 2ND PLACE - JUNE 2009PS3 OwnerKlikCast #15 Compo Winner!LOL Sign
You've Been Circy'd!GOTM WINNER - JANUARY 2010I am an April FoolGOTW MARCH 2010 WINNER!Santa Hat
22nd May, 2009 at 22:48:26 -

well if I do that, I can only take a box one time :/ weird

 
www.Solgryn.org

Image

Rob Rule

Rusten Crating

Registered
  22/12/2007
Points
  532
22nd May, 2009 at 23:41:45 -

I'd use the layer object myself.

Commented example:

http://www.sendspace.com/file/2v27tb

Hosted on sendspace because I'm lazy, and I'm sure you'll download within 7 days.

 
It'll all blow over.

Solgryn

Solgryn dot org

Registered
  20/12/2008
Points
  12572

GOTW Winner!VIP MemberWii OwnerIt's-a me, Mario!The Cake is a LieGOTM 2ND PLACE! - APRIL 2009GOTM 2ND PLACE - JUNE 2009PS3 OwnerKlikCast #15 Compo Winner!LOL Sign
You've Been Circy'd!GOTM WINNER - JANUARY 2010I am an April FoolGOTW MARCH 2010 WINNER!Santa Hat
22nd May, 2009 at 23:47:43 -

ill download it right now

 
www.Solgryn.org

Image

Rob Rule

Rusten Crating

Registered
  22/12/2007
Points
  532
22nd May, 2009 at 23:49:50 -

Let me know how you get on.

 
It'll all blow over.

Solgryn

Solgryn dot org

Registered
  20/12/2008
Points
  12572

GOTW Winner!VIP MemberWii OwnerIt's-a me, Mario!The Cake is a LieGOTM 2ND PLACE! - APRIL 2009GOTM 2ND PLACE - JUNE 2009PS3 OwnerKlikCast #15 Compo Winner!LOL Sign
You've Been Circy'd!GOTM WINNER - JANUARY 2010I am an April FoolGOTW MARCH 2010 WINNER!Santa Hat
22nd May, 2009 at 23:53:18 -

Well I tried the "A is over B" and it worked! But then I can't pickup objects that arent over another object. I tried to create duplicate actions with the "A is over B" negated, but then when I try to pick up it just creating new objects :/

EDIT:!

I got it working! I just need to create duplicate actions without the "A is over B" and it worked ! Thanks so much for the help
But it wont work if there are 3 objects on top of eachother, then it will take 2 objects and leave 1 alone :/

Edited by Solgryn

 
www.Solgryn.org

Image

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
23rd May, 2009 at 00:40:41 -

Upon Pressing "Space"
+ Player is overlapping Box A
+ Pick a box A at random

> Destroy.


This selects all the boxes that the player is overlapping and then it narrows down the selection to just one of the boxes at random out of the ones he is overlapping.

EDIT: Note that the order of the conditions is extremely important. "Pick a Box A at random" must be last.

Edited by an Administrator

 
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

Solgryn

Solgryn dot org

Registered
  20/12/2008
Points
  12572

GOTW Winner!VIP MemberWii OwnerIt's-a me, Mario!The Cake is a LieGOTM 2ND PLACE! - APRIL 2009GOTM 2ND PLACE - JUNE 2009PS3 OwnerKlikCast #15 Compo Winner!LOL Sign
You've Been Circy'd!GOTM WINNER - JANUARY 2010I am an April FoolGOTW MARCH 2010 WINNER!Santa Hat
23rd May, 2009 at 01:01:04 -


Originally Posted by Assault Andy
Upon Pressing "Space"
+ Player is overlapping Box A
+ Pick a box A at random

> Destroy.


This selects all the boxes that the player is overlapping and then it narrows down the selection to just one of the boxes at random out of the ones he is overlapping.

EDIT: Note that the order of the conditions is extremely important. "Pick a Box A at random" must be last.



Okay but I only see "Pick an object at random", there is no condition for "pick a Box A at random". :/
Btw tried the "Pick an object at random" and it works the same way, if there are 3 boxes if takes 2 and leave one alone :/

Edited by Solgryn

 
www.Solgryn.org

Image

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
23rd May, 2009 at 02:44:46 -

Here is an example of the code I just said to try:
http://www.mediafire.com/download.php?nmjigyfzlzy

The "Pick a box at random" is under the box's conditions > Pick or Count > Pick "Box" at random.

Press space while overlapping some boxes. This works. It only destroys one box at a time.

 
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

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  50102

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
23rd May, 2009 at 04:53:40 -

what Assault Andy said is correct, I use that command all the time for those sorts of situations.

 
n/a

Solgryn

Solgryn dot org

Registered
  20/12/2008
Points
  12572

GOTW Winner!VIP MemberWii OwnerIt's-a me, Mario!The Cake is a LieGOTM 2ND PLACE! - APRIL 2009GOTM 2ND PLACE - JUNE 2009PS3 OwnerKlikCast #15 Compo Winner!LOL Sign
You've Been Circy'd!GOTM WINNER - JANUARY 2010I am an April FoolGOTW MARCH 2010 WINNER!Santa Hat
23rd May, 2009 at 10:44:27 -

well, I tried this and it works on ur example but it wont work with my app :/,

I have said that
Player overlaps Box
pick a Box at random

Box
>destroy

create
>picked up box at player


EDIT:!!!

Omg got it working! Just needed to create the pickup box at the box and not the player! thanks all for ur help =D

:/

Edited by Solgryn

 
www.Solgryn.org

Image
   

Post Reply



 



Advertisement

Worth A Click