---
# System prepended metadata

title: 程式分線課程-RM
tags: [NCUGC]

---

---
tags: 'NCUGC'
---
# 程式分線課程-RM
> 2019.10.22
> 講師：UCCU黑客
 
 :::info
 [簡報連結](https://uccuz.github.io/)
 [簡報載點](https://drive.google.com/file/u/1/d/1CnLkhBdC47oclfaBcjH_Uwhq6V1Gfcmo/view)
 :::

## 腳本 
用javascript取代劇情內容區塊

顯示文字：
```javascript
$gameMessage.add("ahahauccu");
```
 
觸發事件：兩個事件坐標一樣
```javascript
var magic_id;
var rock_x = $gameMap.event(this._eventId).x; //this_eventID: 這個劇情事件的ID
var rock_y = $gameMap.event(this._eventId).y;
var magic_x = $gameMap.event(magic_id).x;
var magic_y = $gameMap.event(magic_id).y;
 
if(rock_x == magic_x && rock_y == magic_y){
     
 }
 ```
 - F12使用開發者工具
 - [指令大全](http://www.chimakier.com/rm-%e8%85%b3%e6%9c%ac%e6%8c%87%e4%bb%a4%e5%a4%a7%e5%85%a8/)
 