Adding Levels To a Game
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Adding Levels To a Game
HI all,
I am new to livecode and have developed a simple game. Im looking to transfer between levels in the game which will be on different cards in my stack but im not sure how to go about it. I was thinking of a bit of code to make a button appear after a set time or for the card to automatically change after a set time or reaching a set score...can anyone help please?
I am new to livecode and have developed a simple game. Im looking to transfer between levels in the game which will be on different cards in my stack but im not sure how to go about it. I was thinking of a bit of code to make a button appear after a set time or for the card to automatically change after a set time or reaching a set score...can anyone help please?
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Adding Levels To a Game
Hi.
Have you written any scripts yet? Do you know what a message is? Does this make sense:
Write back if this is old hat, completely unintelligible, or somewhere in the middle.
The good news is that you have found the right tool for the job.
Craig Newman
Have you written any scripts yet? Do you know what a message is? Does this make sense:
Code: Select all
on openCard
wait 10 seconds
go card 2
end opencard
The good news is that you have found the right tool for the job.
Craig Newman
Re: Adding Levels To a Game
Thanks a lot. I have the different cards scripts already done so will have a try and see how this works.
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Adding Levels To a Game
Terrific.
Read in the dictionary about the "send" command, especially its "send in time" variant. You may not need this now, but I bet it will come in handy if you want to make an invisible object appear after a set time. There are dozens of ways of detecting and acting on a value reached in a field. To really have fun, try to make this aspect of your game work in three different ways.
Write back with your progress.
Craig Newman
Read in the dictionary about the "send" command, especially its "send in time" variant. You may not need this now, but I bet it will come in handy if you want to make an invisible object appear after a set time. There are dozens of ways of detecting and acting on a value reached in a field. To really have fun, try to make this aspect of your game work in three different ways.
Write back with your progress.
Craig Newman
Re: Adding Levels To a Game
Thanks for the help.... I've tried the wait code but that doesn't allow the game to play it just waits and goes to the next card. Do you have any ideas so I can get it to work off a score or wait a set amount of time and still play the game whilst it's waiting.
Thanks
James
Thanks
James
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Adding Levels To a Game
Yes, "wait" locks everything up for the duration. It has its uses, but in your case is not the way to go. It was just an example. Wherever you used that command, you might substitute a "send in time" command instead. This will take a little practice, but allows interaction through the duration.
How is the number in your field updated? Are you OK with the mechanics of your game but just having trouble with the card change? How is the time thing integrated into the working of the game itself?
All your issues can be solved with a few short scripts. I am just not sure what to help you with yet.
Craig Newman
How is the number in your field updated? Are you OK with the mechanics of your game but just having trouble with the card change? How is the time thing integrated into the working of the game itself?
All your issues can be solved with a few short scripts. I am just not sure what to help you with yet.
Craig Newman
Re: Adding Levels To a Game
Hi jizzle,
I removed your double posting, please only one thread per question, thanks!,
and will move this one to the correct forum!
Best
Klaus
I removed your double posting, please only one thread per question, thanks!,
and will move this one to the correct forum!
Best
Klaus