Im New and need help! Visual Novel Maker Password Loop

VincentValentine

Villager
Member
Joined
Mar 28, 2018
Messages
6
Reaction score
0
First Language
portuguese
Primarily Uses
VNM
Hi my friends!


Im actualy new in this world of visual novel maker. Im trying my best to develope my own visual novel but im struggling to make the most common things haha.

basicaly my atual problem is: i need to make a loop in a password event.

Like: the "player" need to write the password using the input device and them if the password are right he will be able to continue the history or if the password are wrong , the event will loop and ask again for the password.

beside this, i need a counter thats get +1 every time the player miss the password ( the counter starts on 0 and when the counter gets 2 them the player go to a scene where he dies.

Someone can help me? sorry for my bad english.

thanks in advance
 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,141
Reaction score
15,473
First Language
Filipino
Primarily Uses
RMMZ
You already got the logic down so it should've been easy to translate to VNM? But here you go. I already tested this and it works fine.

Show Message | Character: Unnamed | Voice: None | Expression Change: No Change | 250ms | Wait
--------------------------
Please enter the password.
==========================
Label | Name: start
==========================
Input Text | Letters: 7 | Store in Variable: L[0001: PASSWORD]
==========================
Condition | If: Text | Variable: L[0001: PASSWORD] | Is: Equal to | Value: BEST123 |
==========================
Show Message | Character: Unnamed | Voice: None | Expression Change: No Change | 250ms | Wait
--------------------------
Correct Password!
==========================
Jump to Label | Name: end | Target: Active Context
==========================
Else If | If: Number | Variable: L[0001: WRONG PASSWORD] | Is: Greater or equal to | Value: 3 |
==========================
Show Message | Character: Unnamed | Voice: None | Expression Change: No Change | 250ms | Wait
--------------------------
Sorry, time to die.
==========================
Change Scene | Scene: None | Save Previous: No
==========================
Else |
==========================
Show Message | Character: Unnamed | Voice: None | Expression Change: No Change | 250ms | Wait
--------------------------
Wrong Password
==========================
Number Variable | Target: Variable | Variable: L[0001: WRONG PASSWORD] | Operation: Add | Source: Value | Value: 1 |
==========================
Jump to Label | Name: start | Target: Active Context
==========================
Label | Name: end
==========================
Show Message | Character: Unnamed | Voice: None | Expression Change: No Change | 250ms | Wait
--------------------------
Sweet, you got the password right.
==========================

Code:
[
    {
        "id": "gs.ShowMessage",
        "params": {
            "waitForCompletion": 1,
            "duration": 15,
            "expressionId": null,
            "custom": {
                "object": {
                    "x": 0,
                    "y": 0,
                    "size": {
                        "width": 300,
                        "height": 100
                    }
                }
            },
            "message": {
                "lcId": "85C33F7C1599F54DE85925E6F4782389F402",
                "defaultText": "Please enter the password."
            },
            "position": 0,
            "characterId": 0,
            "partial": 0,
            "fieldFlags": {
                "duration": 1
            },
            "expressions": [],
            "animations": []
        },
        "indent": 0,
        "uid": "0BA2BC84424EA647723996789541EBFE3A54",
        "expanded": true
    },
    {
        "id": "gs.Label",
        "params": {
            "name": "start"
        },
        "indent": 0
    },
    {
        "id": "gs.InputText",
        "params": {
            "variable": {
                "name": "PASSWORD",
                "index": 0,
                "scope": 0,
                "domain": "com.degica.vnm.default"
            },
            "letters": 7,
            "previewBackground": {
                "name": "$live_preview_snapshot"
            }
        },
        "indent": 0,
        "uid": "9C6388638E11624C88289442C80235EA3477"
    },
    {
        "id": "gs.Condition",
        "params": {
            "variable": {
                "name": "PASSWORD",
                "index": 0,
                "scope": 0,
                "domain": "com.degica.vnm.default"
            },
            "numberValue": 0,
            "textValue": "BEST123",
            "switchValue": 0,
            "valueType": 2,
            "operation": 0,
            "previewBackground": {
                "name": "$live_preview_snapshot"
            }
        },
        "indent": 0,
        "uid": "4BED920146B557438C3ADBE1BFD338C58567"
    },
    {
        "id": "gs.ShowMessage",
        "params": {
            "waitForCompletion": 1,
            "duration": 15,
            "expressionId": null,
            "custom": {
                "object": {
                    "x": 0,
                    "y": 0,
                    "size": {
                        "width": 300,
                        "height": 100
                    }
                }
            },
            "message": {
                "lcId": "2824F28F3D1D7846D74A39964E17968C2627",
                "defaultText": "Correct Password!"
            },
            "position": 0,
            "characterId": 0,
            "partial": 0,
            "fieldFlags": {
                "duration": 1
            },
            "expressions": [],
            "animations": []
        },
        "indent": 1,
        "uid": "8DF927A82539B647362B6535D94BCF4BCDCB",
        "expanded": true
    },
    {
        "id": "gs.JumpToLabel",
        "params": {
            "name": "end",
            "target": "activeContext"
        },
        "indent": 1,
        "uid": "456915AD2A8A0745592B6C625C20A40DDDB6"
    },
    {
        "id": "gs.ConditionElseIf",
        "params": {
            "variable": {
                "name": "WRONG PASSWORD",
                "index": 0,
                "scope": 0,
                "domain": "com.degica.vnm.default"
            },
            "numberValue": 3,
            "textValue": "",
            "switchValue": 0,
            "valueType": 0,
            "operation": 3,
            "previewBackground": {
                "name": "$live_preview_snapshot"
            }
        },
        "indent": 0,
        "uid": "D220B093067F704E4F5A18A9BC305F40681C"
    },
    {
        "id": "gs.ShowMessage",
        "params": {
            "waitForCompletion": 1,
            "duration": 15,
            "expressionId": null,
            "custom": {
                "object": {
                    "x": 0,
                    "y": 0,
                    "size": {
                        "width": 300,
                        "height": 100
                    }
                }
            },
            "message": {
                "lcId": "CD6BDFCA7BC4104E06395956E57C2CE09C65",
                "defaultText": "Sorry, time to die."
            },
            "position": 0,
            "characterId": 0,
            "partial": 0,
            "fieldFlags": {
                "duration": 1
            },
            "expressions": [],
            "animations": []
        },
        "indent": 1,
        "uid": "D8B183527B78644AEE5B33A74706CFCB4028",
        "expanded": true
    },
    {
        "id": "vn.ChangeScene",
        "params": {
            "scene": null,
            "savePrevious": 0,
            "erasePictures": 0,
            "eraseTexts": 0,
            "eraseVideos": 0
        },
        "indent": 1,
        "uid": "8FF29E5D4576E4439E889702D2FA8EC08A14"
    },
    {
        "id": "gs.ConditionElse",
        "params": {},
        "indent": 0,
        "uid": "2F4F3B72248722417E3BA8B5D260187490DC"
    },
    {
        "id": "gs.ShowMessage",
        "params": {
            "waitForCompletion": 1,
            "duration": 15,
            "expressionId": null,
            "custom": {
                "object": {
                    "x": 0,
                    "y": 0,
                    "size": {
                        "width": 300,
                        "height": 100
                    }
                }
            },
            "message": {
                "lcId": "CAB332DE58E37545AB5B97B195666978F690",
                "defaultText": "Wrong Password\n"
            },
            "position": 0,
            "characterId": 0,
            "partial": 0,
            "fieldFlags": {
                "duration": 1
            },
            "expressions": [],
            "animations": []
        },
        "indent": 1,
        "uid": "2D437A7B243297437C8899F2A2367AAB8BFA",
        "expanded": true
    },
    {
        "id": "gs.ChangeNumberVariables",
        "params": {
            "target": 0,
            "targetVariable": {
                "name": "WRONG PASSWORD",
                "index": 0,
                "scope": 0,
                "domain": "com.degica.vnm.default"
            },
            "targetScope": 0,
            "targetRange": {
                "start": 0,
                "end": 0
            },
            "targetReferenceDomain": "com.degica.vnm.default",
            "targetReference": {
                "index": 0,
                "scope": 1,
                "domain": "com.degica.vnm.default"
            },
            "operation": 1,
            "source": 0,
            "sourceValue": 1,
            "sourceRandom": {
                "start": 0,
                "end": 0
            },
            "sourceScope": 0,
            "sourceVariable": {
                "index": 0,
                "scope": 1,
                "domain": "com.degica.vnm.default"
            },
            "sourceReferenceDomain": "com.degica.vnm.default",
            "sourceReference": {
                "index": 0,
                "scope": 1,
                "domain": "com.degica.vnm.default"
            },
            "previewBackground": {
                "name": "$live_preview_snapshot"
            }
        },
        "indent": 1,
        "uid": "200C2F954A8D434F326BC543F9B96F75B560"
    },
    {
        "id": "gs.JumpToLabel",
        "params": {
            "name": "start",
            "target": "activeContext"
        },
        "indent": 1,
        "uid": "207080D6315E37484A5815F109559C2ACE5E"
    },
    {
        "id": "gs.Label",
        "params": {
            "name": "end"
        },
        "indent": 0,
        "uid": "EEB01BEA5E36C74A3D5B76895DAE66040F32"
    },
    {
        "id": "gs.ShowMessage",
        "params": {
            "waitForCompletion": 1,
            "duration": 15,
            "expressionId": null,
            "custom": {
                "object": {
                    "x": 0,
                    "y": 0,
                    "size": {
                        "width": 300,
                        "height": 100
                    }
                }
            },
            "message": {
                "lcId": "A048BDF97DEAB7409318EFE04092D851C7F2",
                "defaultText": "Sweet, you got the password right.\n"
            },
            "position": 0,
            "characterId": 0,
            "partial": 0,
            "fieldFlags": {
                "duration": 1
            },
            "expressions": [],
            "animations": []
        },
        "indent": 0,
        "uid": "CDF7815C4B69014F4C68D769E0F85DA36F5D",
        "expanded": true
    }
].novelsharp/vn-scene-command
 

VincentValentine

Villager
Member
Joined
Mar 28, 2018
Messages
6
Reaction score
0
First Language
portuguese
Primarily Uses
VNM
thanks for the help! i will implement in my game and test =D
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top