

Nextrek
@ 1348
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
{ "uid": "48F8B42657161549B84B96159EEED379C0E0", "isLoaded": true, "lastModificationTime": 0, "items": { "name": "Update Name Box", "type": "data_record", "order": 7, "category": "commonEvents", "id": "48F8B42657161549B84B96159EEED379C0E0", "isFolder": false, "parentId": "665F7EFC4091674CD6383D3829AD031A9CCC", "data": { "name": "Update Name Box", "startCondition": 1, "conditionEnabled": false, "parallel": true, "autoPreload": true, "singleInstance": true, "inline": false, "parameters": [], "commands": [ { "id": "gs.Comment", "params": { "text": "This common event runs parallel, means it runs and repeats the whole time in the background until we quit the game. We use a global text variable \"Current Character\" where we put the name of the currently speaking character in. Then we check if the that variable is different from our local text variable \"Character Name\". If that is the case, we know that the currently speaking character has changed, so we have to update the name-box. If you check the \"Show Message Box\" common event you can see that we use the text \"{GT:2}\" for Show Text command. So after refresh, out text will show the value of our global text variable \"Current Character\", which stores the current character name. So if we call \"Set Object Data\", our name-box will show the correct name.\n\nTo avoid that the name-box is permanently updated even if the name has not changed, which would cost performance, we set our local text variable \"Character Name\" to the value of our global text variable \"Current Character\" so the condition will no longer be true until the content of the global text variable \"Current Character\" changes again." }, "indent": 0, "uid": "4299ABDF620AB64F1749F9871ADC3C029639", "expanded": true }, { "id": "gs.Script", "params": { "script": "GameManager.variableStore.stringsByDomain[\"com.degica.vnm.default\"][1] = lcs(SceneManager.scene.currentCharacter.name)" }, "indent": 0, "uid": "B235EC2B36E8F94A32194EF1A3E6CCA569F1", "expanded": true }, { "id": "gs.Condition", "params": { "variable": { "name": "Current Character", "index": 1, "scope": 1, "changed": true, "domain": "com.degica.vnm.default" }, "numberValue": 0, "textValue": { "name": "Character", "index": 0, "scope": 0 }, "switchValue": 0, "valueType": 2, "operation": 1, "previewBackground": { "name": "$live_preview_snapshot" } }, "indent": 0, "uid": "097B82C61C7A9441931AA782DC44F747DCC9" }, { "id": "gs.Condition", "params": { "variable": { "name": "Current Character", "index": 1, "scope": 1, "changed": true, "domain": "com.degica.vnm.default" }, "numberValue": 0, "textValue": "", "switchValue": 0, "valueType": 2, "operation": 1, "previewBackground": { "name": "$live_preview_snapshot" } }, "indent": 1, "uid": "5ABCE5B12CC5504DB7593F192376B9874794" }, { "id": "vn.SetObjectData", "params": { "objectType": 2, "number": 0, "layer": 0, "characterId": "BA77A09EK7F14A4C2BSA11BE8CC099F00810", "field": 0, "numberValue": 0, "textValue": { "name": "Current Character", "index": 1, "scope": 1, "changed": true, "domain": "com.degica.vnm.default" }, "switchValue": 0, "previewBackground": { "name": "$live_preview_snapshot" }, "numberDomain": "com.degica.vnm.default" }, "indent": 2, "uid": "698274B1143A96431B19B4A83EF77FF4EA3F" }, { "id": "gs.ChangeStringVariables", "params": { "target": 0, "targetVariable": { "name": "Character Name", "index": 0, "scope": 0 }, "targetRangeScope": 0, "rangeStart": 0, "rangeEnd": 0, "operation": 0, "valueType": 0, "textValue": { "lcId": "BA90F64D742A734A2F9A7A30277B41AF0C57", "defaultText": "{GT:com.degica.vnm.default.2}" }, "previewBackground": { "name": "$live_preview_snapshot" } }, "indent": 2, "expanded": true, "uid": "DECA95C945D4C443F73B00B8E1C292F2A11D" } ], "index": "48F8B42657161549B84B96159EEED379C0E0", "booleanVariables": [ { "name": "", "index": 0, "scope": 0 } ], "numberVariables": [ { "name": "", "index": 0, "scope": 0 } ], "stringVariables": [ { "name": "Character Name", "index": 0, "scope": 0, "domain": "com.degica.vnm.default" } ], "defaultExpressionId": "BF7CB12110894142C299D341A545C910AA86" }, "localizableStrings": { "939E154D2AB8234B2E59DBA7421ED5CB5F98": { "t": "{GT:2}", "d": { "eid": "DECA95C945D4C443F73B00B8E1C292F2A11D" } } } }, "summary": [ "name", "type", "order" ] } |