[RMXP] Puzzle Script!

Started by PrinceEndymion88, September 08, 2013, 10:37:23 am

Previous topic - Next topic

PrinceEndymion88

I want to add an extra feature to my game. During the game, the player can found some pieces of a puzzle and complete it! Maybe I can explain it with images...
The puzzle can be called by Scene_Puzzle.new into the game menu.
When no pieces were found, the player see an empy puzzle:


When the player found a piece of puzzle, a switch will be activated and he can see a new piece!


Anothe piece found? Another switch and a new image =)


and so on


I hope I was clear. =) Sorry for my english...
Actually I use these scripts: ccoa's weather script, KH SAVE, ums by ccoa, mode7, CCOA 3.04 RTA, Mog Damage System, DRG - Scene Menu Animated Cursor, Scene into flash, mana title, MOG Scene Shop, mog scene story, Party Changer, Stop the victory ME, Skill Chrono Trigger, shadow text, ,dash, region system, mog battler effects, Light Effects XP 2.1



orochii

Just as a little commentary, that puzzle stuff reminds me of good-old Banjo Kazooie. Good times.

Sixdd

Wouldn't it make more sense to store the number of pieces in a variable? Unless you want to control each piece individually. Seems like you would need a lot of switches for one feature.

LiTTleDRAgo

September 10, 2013, 04:38:17 am #5 Last Edit: September 10, 2013, 04:44:53 am by LiTTleDRAgo
princeendymion requested switch,

I have updated the scripts.rxdata, now it using script call

to adding unlocked piece
$game_system.puzzle_unlock.push(Integer)


to deleting unlocked piece
$game_system.puzzle_unlock.delete(Integer)


to clear all piece
$game_system.puzzle_unlock.clear


to add on conditional branch (Individual)
$game_system.puzzle_unlock.include?(Integer)


to add on conditional branch (Have any of the piece)
$game_system.puzzle_unlock.any? {|s| [Integer,Integer,Integer].include?(s) }


to add on conditional branch (Have all of the piece)
$game_system.puzzle_unlock.all? {|s| [Integer,Integer,Integer].include?(s) }


Integer is number from 1 - 42

PrinceEndymion88

wow! this is much better ;D thanks!!!