Multitouch Example Game SHEEP, question about groups

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
cu3e
Posts: 46
Joined: Mon May 23, 2011 10:03 am

Multitouch Example Game SHEEP, question about groups

Post by cu3e » Wed May 25, 2011 6:32 pm

Hello, I try to understand the Multitouch Example Sheep Game from Ben. Sadly there is only this short youtube video and no real tuturial. So far I understand the code but what I understand not, is the following.

The Sheep in the stack, is a group with something rectangle, invisible. What is that? How can I regroup the sheep to that, once I ungrouped it? It does not work without this group.

The stack can be found under the user stacks. I attached it here aswell.
Attachments
SheepHerder.zip
(45.59 KiB) Downloaded 269 times

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Multitouch Example Game SHEEP, question about groups

Post by BvG » Wed May 25, 2011 6:47 pm

I have no clue what a "something rectangle invisible" could be. Maybe a graphic object is in that group?
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

cu3e
Posts: 46
Joined: Mon May 23, 2011 10:03 am

Re: Multitouch Example Game SHEEP, question about groups

Post by cu3e » Wed May 25, 2011 7:15 pm

Sorry for my bad english. The Sheep is grouped with a bigger (invisible) object. When I click on the sheep, a large area is selected. When I ungroup the sheep. There is only the sheep left. The large area is gone. Do you understand what I mean?

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Multitouch Example Game SHEEP, question about groups

Post by BvG » Wed May 25, 2011 9:06 pm

It's a group, with locLock set to true. Nothing beyond that, but it's used in the code as the container for all the cloned sheeps the game creates. Every time a new sheep appears, it is created into that group. What exactly is it you do not understand in the workings of the stack?
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

cu3e
Posts: 46
Joined: Mon May 23, 2011 10:03 am

Re: Multitouch Example Game SHEEP, question about groups

Post by cu3e » Wed May 25, 2011 9:29 pm

Ok thank you that make sense. I ungrouped the sheep. How can I group it again with the LocLock?

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Multitouch Example Game SHEEP, question about groups

Post by BvG » Wed May 25, 2011 9:40 pm

i suggest looking at the original stack, or the card code, about how the group is named there (you need to use the same name). the lockLoc toggle is in the inspector on the "Size & Position" tab. Or you can use the message box:

Code: Select all

set the lockLoc of group "properGroupNameHere" to true
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

cu3e
Posts: 46
Joined: Mon May 23, 2011 10:03 am

Re: Multitouch Example Game SHEEP, question about groups

Post by cu3e » Wed May 25, 2011 9:54 pm

Thank you all!

Post Reply