# GameSceneとビジュアルスクリプトのアタッチについて

**URL:** <https://guild.rpgmakerofficial.com/t/topic/355>\
**Category:** 質問\
**Tags:** 日本語\
**Created:** [2025 年 6 月 20 日午後 1:24 UTC](https://guild.rpgmakerofficial.com/t/topic/355 "2025-06-20T13:24:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kome](https://sea2.discourse-cdn.com/flex002/user_avatar/guild.rpgmakerofficial.com/kome/32/811_2.png) [@Kome](https://guild.rpgmakerofficial.com/u/Kome)\
**Post date:** [2025 年 6 月 20 日午後 1:24 UTC](https://guild.rpgmakerofficial.com/t/topic/355/1 "2025-06-20T13:24:18Z")

</div>

お世話になっております。

・GameSceneについてなのですが、ゲームが１面、２面という感じで進むとして  
面ごとにGameScene\_１面、GameScene\_２面 という感じで別のGameSceneを構築し、各オブジェクトを配置するという認識であっていますでしょうか？

・上記が合っているとすると、キャラなどのオブジェクト（シーン）に付けるVisualScriptはほとんどの場合「組み込みスクリプト」を選ぶ方が良いのでしょうか？  
１面のplayerにＶＳを組み込まないで付けると、２面に配置したplayerにはＶＳが付いていない・・ということになりますよね？  
１面のＶＳを２面のplayerにアタッチすることは可能ですが、playerみたいな数の少ないキャラならともかく、大量に出てくるエネミーにはしんどいですね。

組み込みスクリプトにはいくつか制約がある・・との説明もありますし、組み込みＶＳと組み込まないＶＳの、それぞれの使い道などをご教授頂けるとうれしいです。

---

<div class="post-metadata">

**Author:** ![Brasten](https://sea2.discourse-cdn.com/flex002/user_avatar/guild.rpgmakerofficial.com/brasten/32/387_2.png) [@Brasten](https://guild.rpgmakerofficial.com/u/Brasten)\
**Post date:** [2025 年 6 月 20 日午後 7:33 UTC](https://guild.rpgmakerofficial.com/t/topic/355/2 "2025-06-20T19:33:26Z")

</div>

Yes. Each GameScene as a file. Godot [プロジェクトの構成](https://docs.godotengine.org/ja/4.x/tutorials/best_practices/project_organization.html)。

> フォルダー名とファイル名には snake\_case。

Example folder

```auto
project 📁
    scenes 📁
        game_scene_1.tscn 🎬
        game_scene_2.tscn 🎬
        game_scene_3.tscn 🎬
    game_objects 📁
        player 📁
                player.tscn # GameObject
                player.vs
        enemies 📁
                slimes 📁
                    slime_1.tscn # GameObject
                    slime_2.tscn
                    slime.vs

```

 ![組み込みスクリプト](https://us1.discourse-cdn.com/flex002/uploads/rpgmaker_community/original/1X/49facb2a1dadab7bd6b1d1f7c07e9facb911f8ad.png)

Stored in `.tscn`

```auto
[sub_resource type="VisualScript" id="VisualScript_o1b1i"]
data = {
"any_state_pos": Vector2(0, 0),
"base_type": &"GameObject",
"is_created_first_action_node": true,
"nodes": [
0, Vector2(-26.6667, 106.667), SubResource("VisualScriptAction_06ixh"), 
1, Vector2(186.667, 80), SubResource("VisualScriptAction_jgf6y"), 
2, Vector2(0, 0), SubResource("VisualScriptActionLink_d6fgq"), 
3, Vector2(0, 0), SubResource("VisualScriptActionLink_siowv"), 
4, Vector2(0, 0), SubResource("VisualScriptActionLink_rupok")],
"scroll": Vector2(-49.3939, -398)
}

```

Good for prototyping. Bad long term.

| ゲームシーン | ゲームオブジェクト | メニューシーン | インスタンス化されたゲームオブジェクト「組み込みスクリプト」 |
| --- | --- | --- | --- |
| GameScene | GameObject | MenuScene | Instantiated GameObject​🎬 with built-in script |
| ![image](https://us1.discourse-cdn.com/flex002/uploads/rpgmaker_community/original/1X/e948b8c1960c63a517e717687d5d88b5c3fdcbe7.png) | ![image](https://us1.discourse-cdn.com/flex002/uploads/rpgmaker_community/original/1X/e532b0bfa7bec0b6fce3df95e6df927d75148c21.png) | ![image](https://us1.discourse-cdn.com/flex002/uploads/rpgmaker_community/original/1X/a1f9c0f6b28f720bef6fd90a45387c0b315f0de0.png) | ![image](https://us1.discourse-cdn.com/flex002/uploads/rpgmaker_community/original/1X/e532b0bfa7bec0b6fce3df95e6df927d75148c21.png) 🎬 |
| ❌ | ⚠ | ❌ | ⚠ |
| ![image](https://us1.discourse-cdn.com/flex002/uploads/rpgmaker_community/original/1X/f055d9b127de7fe9ba67fab8744345ce8ddf911d.png) | ![image](https://us1.discourse-cdn.com/flex002/uploads/rpgmaker_community/original/1X/2ea72b97a4bdeff9ade18b8130126159acb52a15.png) | ![image](https://us1.discourse-cdn.com/flex002/uploads/rpgmaker_community/original/1X/60d8557d2951540ddcb8b681ad843769755b7e10.png) | ![image](https://us1.discourse-cdn.com/flex002/uploads/rpgmaker_community/original/1X/8cf27996da044b71a391366fd165d391dca5f0d9.png) |

I would only use built-in scripts in `GameObject` scenes `.tscn`. I do not think it is good practice. I only do it for disposable prototypes.

I hope this helps.

---

<div class="post-metadata">

**Author:** ![Kome](https://sea2.discourse-cdn.com/flex002/user_avatar/guild.rpgmakerofficial.com/kome/32/811_2.png) [@Kome](https://guild.rpgmakerofficial.com/u/Kome)\
**Post date:** [2025 年 6 月 20 日午後 7:49 UTC](https://guild.rpgmakerofficial.com/t/topic/355/3 "2025-06-20T19:49:45Z")

</div>

Thank you, Brasten.

I was surprised to receive a reply while I was in the middle of re-editing the original question text.  
Thank you for your careful explanation, even going so far as to create a table. I’m not very smart, so I still can’t understand it, but I’ll take my time to look over it and think about what you taught me.  
Thank you for your reply.

---

<div class="post-metadata">

**Author:** ![Kome](https://sea2.discourse-cdn.com/flex002/user_avatar/guild.rpgmakerofficial.com/kome/32/811_2.png) [@Kome](https://guild.rpgmakerofficial.com/u/Kome)\
**Post date:** [2025 年 6 月 21 日午前 2:10 UTC](https://guild.rpgmakerofficial.com/t/topic/355/4 "2025-06-21T02:10:30Z")

</div>

Thank you, Brasten.

前半のプロジェクトフォルダでのシーンの構築につきましては理解できました。  
やはりステージ（面）ごとに、game\_sceneを増やしていくということですね、ありがとうございます。

後半の組み込みスクリプトにつきましては  
せっかく画像を使い表の形で説明して下さっているのに、私の頭では難しい様です。  
ただ、プロトタイプのオブジェクト以外では、組み込みスクリプトは使わない方が良い、ということだけは理解できました。  
ゆっくり勉強していきたいと思います。ありがとうございます。
