Level Lock tutorial video?
THRSTN
Member Posts: 178
Hi all I'm having some trouble getting the levels locking in the game I'm working on.I've followed a couple of the tutorials that I've found on here and still cant seem to get it to work. I was wondering if anyone has done a video tutorial on this yet?I've also Downloaded a couple of demos but for some reason still cant get the darn thing to unlock once the player has gone thru the level.
1.I have two attributes declared LastLevelPlayed and HighestLevelPlayed both integers set to 1
2.I have Two actors "TrackLevel" and "LoadLevel"
3.inside the track actor i have
Change Attribute to game.LastLevelPlayed to scene.Name
Save attibute game.LastLevelPlayed to Key:lastplayed
then a rule
When All
attribute game.LastLevelPlayed > game.HighestLevelPlayed
Change Attribute game.HighestLevelPlayed to game.LastLevelPlayed
Save Attribute game.HighestLevelPlayed to key: currentlevel
4.Inside the LoadLevels actor i have
Load Attribute
key:highestlevel Attribute game.HighesdtLevelPlayed
5.I have LoadLevels inside of my scene selection scene
and tracklevel inside of my levels
6.i have one blank actor as the Levels themselves and use the show text to label them individually
inside of them i have (example of Level 2)
Rule
When All conditions are valid
attribute game.HighestLevelPlayed >2
then Rule
Actor Receives touch Change scene to level 2
otherwise
Spawn Actor
actor Locked in front of actor
ive gotta be missing something and if someone knows of a video tutorial (maybe tshirt booth if you've got some spare time) that would be awesome.
Thanks
THRSTN
1.I have two attributes declared LastLevelPlayed and HighestLevelPlayed both integers set to 1
2.I have Two actors "TrackLevel" and "LoadLevel"
3.inside the track actor i have
Change Attribute to game.LastLevelPlayed to scene.Name
Save attibute game.LastLevelPlayed to Key:lastplayed
then a rule
When All
attribute game.LastLevelPlayed > game.HighestLevelPlayed
Change Attribute game.HighestLevelPlayed to game.LastLevelPlayed
Save Attribute game.HighestLevelPlayed to key: currentlevel
4.Inside the LoadLevels actor i have
Load Attribute
key:highestlevel Attribute game.HighesdtLevelPlayed
5.I have LoadLevels inside of my scene selection scene
and tracklevel inside of my levels
6.i have one blank actor as the Levels themselves and use the show text to label them individually
inside of them i have (example of Level 2)
Rule
When All conditions are valid
attribute game.HighestLevelPlayed >2
then Rule
Actor Receives touch Change scene to level 2
otherwise
Spawn Actor
actor Locked in front of actor
ive gotta be missing something and if someone knows of a video tutorial (maybe tshirt booth if you've got some spare time) that would be awesome.
Thanks
THRSTN
Comments
/bump
(amen)
Make a global boolean attribute called level2 (or whatever you want).
When you complete level 1change level2 to true and save the boolean as level2unlocked.
Have a controller on your level select screen that loads the level2unlocked.
On the level select screen on the level 2 actor do if touch is pressed and level2unlocked=true change scene to level 2 and so on and so on.
If you have awards or medals you will have to use an integer but it's the same method as above.
One thing to remember if you doing medals, gold silver bronze for eg is to only save if they get a better medal as you don't want to earn a silver one time then go back replay level and end up with bronze.
Darren.
I rustled this up quickly if you're interested. http://gamesalad.com/game/play/82738
P.S. I know it's not a video, but it's really simple.
Darren.
Either way, if it is something that the character (I'm assuming you have a character or something similar) interacts with to complete the level you could use a simple rule (the values would have to be changed in the instance on each level scene).
`
When actor overlaps or collides with actor of type character
+ When attribute game.levels complete is < (value of current level, i.e. 6)
- change attribute game.levelsunlocked to (value of current level)
`
If the character doesn't interact with anything you could just create a game settings actor (or put the rule on a common actor). For example if you need to collect a certain amount of coins you could use a rule like:
`
When attribute game.coins >= 10
+ When attribute game.levels complete is < (value of current level, i.e. 6)
- change attribute game.levelsunlocked to (value of current level)
`
Hope you get it sorted.
THRSTN