Ask a Question related to Macromedia Director Lingo, Design and Development.
-
gailw20 webforumsuser@macromedia.com #1
matching game !!help!!
hi,
help!! pls!! im totally doomed at this point. looking at examples but dunno how to modify the code to fit into my game... :( help!!!
i'm trying to make a matching/concentration game similar to "http://www.i-dac.com/game/door/door3.html"
so, i make a little prototype game by using a triangle, a square, and a circle. 1st, the user got 2sec to memorize the position. after 2 sec, those pieces will be positioned on the bottom of the stage. if the user drag one into the wrong black box, then "game over." otherwise if the user position all pieces correctly, he/she'll get the win screen. ideally, if the user using more than 5sec to play the game, then it'll also go to the "lost" screen.
here r the problems i have...
1) how do i make it randomized and have the pieces remember its position?
2) how to have the pieces repositioned on the bottom?
3) how to make the "ideal" part?
here's the url where u can download my testing file....
[url]http://stage.itp.nyu.edu/~yfw204/director/matching_test.dir[/url]
thx a bunch!
-gail
Referring URLs
[url]http://www.i-dac.com/game/door/door3.html[/url]
[url]http://stage.itp.nyu.edu/~yfw204/director/matching_test.dir[/url]
gailw20 webforumsuser@macromedia.com Guest
-
making this game multiuser game
hi all, i am working on this, and want to know how to make it multiuser (peer-to-peer) ... -
Text Matching
Hi everyone. I am working with an Illustrator 9.0 drawing that was given to my, drawn by someone else. I'm just trying to do some updating to it.... -
matching
I have the following code to find a quote in a string and replace it with a slashquote. ie " goes to \" How do I get it to do more than one... -
Matching URls
Hi, Does anyone know of a link to or an example of a decent regexp that wil recognize internet URLs? (It needs to match urls starting with... -
Matching Problems
Christopher Boyce wrote: Yes. {2,} John -- use Perl; program fulfillment -
rick@mcorp webforumsuser@macromedia.com #2
Re: matching game !!help!!
You'll need to use behaviours and property lists if you want to do a half decent job.
-- 1) how do i make it randomized and have the pieces remember its position?
I'd use a property list for this, basically you need to store 3 values - square, triangle and circle so you end up with a random list like this : [1:triangle, 2:circle, 3:square].
This way you can refer to shapelist to position your objects & check if they are in their correct positions.
on position
temp = list("square","triangle","circle")
shapelist = [:]
repeat while temp.count > 0
i = i + 1
pos = random(temp.count)
val = temp[pos]
shapelist.setaprop(i, val)
temp.deleteat(pos)
end repeat
end
-- 2) how to have the pieces repositioned on the bottom?
easiest way of doing this is by jumping to another frame with the 3 sprites already positioned at the bottom of the screen
-- 3) how to make the "ideal" part?
you need to use some kind of timer eg.
property ptime
on exitframe me
if ptime = void then
ptime = the ticks + 300 -- (5 seconds)
end if
put the ticks - ptime
if the ticks >= ptime then
x = the ticks
go "timeout frame" -- do something if timed out
end if
go the frame
end
hope this is useful
rick@mcorp webforumsuser@macromedia.com Guest
-
gailw20 webforumsuser@macromedia.com #3
Re: matching game !!help!!
hi rick,
thank u for ur help. i've been trying get this to work, and have no luck. :( do u mind email me an example dir file pls? i'd be really appreciated. thank u so much!
my email: [email]gailwang@earthlink.net[/email]
-gail
gailw20 webforumsuser@macromedia.com Guest



Reply With Quote

