1. 먼저 zoadk 가 빌드한 최신 에디터를 켜줍니다 .
run nox mapedit latest version.(link> https://github.com/NoxTools/MapEditor/releases/latest )
이 맵에디터를 클릭해 줍니다 .
click this editor.
2. 벽과 타일셋을 배치해 줍니다 .
put wall and tile set on your map.
3. 녹스 트리거를 작성하기 위해 visual studio code 프로그램을 켜줍니다 .
run the visual studio code to create the nox trigger.
그리고 newFunction 탭에서 + 버튼을 누르시고, 맵이름.ns 라고 입력합니다 .
click '+' button and write name the mapname.ns.
새로 생성된 트리거 모습입니다 .
new trigger is spawn.
4. 본격적인 코딩 작업입니다 .
Begin coding in earnest.
우선 맵으로 가서 원하시는 위치에 pressurePlate 를 놓으시고, 실행될 트리거의 이름과 pressurePlate 의 activated 부분의 이름을 동일하게 설정하십시오 .
Place the pressurePlate in the desired location, same to name trigger part with activated part.
pressurePlate 의 트리거 이름을 fistTrap1 부터 4까지 설정해줍니다.
Set the unit names in order. (fistTrap1 ~ fistTrap4)
다시 트리거로 돌아와서 아래의 트리거 코드를 복사하여 붙여넣어 줍니다 .
copy all below triggers code. and paste to your trigger code file.
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 | //@ignore_object_type
void MapInitialize() { initFistTrap(4); }
void fistTrapOn() { int var_0 = GetDirection(self);
CastSpellObjectLocation("SPELL_FIST", getLight(var_0, -1), GetObjectX(self), GetObjectY(self)); Delete(getLight(var_0, -1)); ObjectOff(self); FrameTimerWithArg(200, GetTrigger(), resetTrap); }
void resetTrap(int arg_0) { int var_0;
ObjectOn(arg_0); MoveWaypoint(1, GetObjectX(arg_0), GetObjectY(arg_0)); AudioEvent("TriggerReleased", 1); var_0 = CreateObject("InvisibleLightBlueHigh", 1); getLight(var_0, GetDirection(arg_0)); }
void initFistTrap(int max) { int var_0; int i;
for(i = 0 ; i < max ; i += 1) { var_0 = Object("fistTrap" + IntToString(i + 1)); LookWithAngle(var_0, i); MoveWaypoint(1, GetObjectX(var_0), GetObjectY(var_0)); var_0 = CreateObject("InvisibleLightBlueHigh", 1); getLight(var_0, i); } }
int getLight(int arg_0, int arg_1) { int var_0[10];
if (arg_1 != -1) { var_0[arg_1] = arg_0; return 0; } else { return var_0[arg_0]; } } Colored by Color Scripter | cs |
그리고 ctrl+S 로 현재 트리거 파일을 저장한 후, 곧바로 F5 를 눌러서 작성된 트리거를 컴파일 합니다.
save your trigger file and press F5 key, then your triggers code is compile.
file - import Script 버튼을 누릅니다.
press button : file - import Script
방금 작성한 트리거 파일을 찾아 열어줍니다. 그리고 맵을 저장합니다.
open your triggers code file.
and save your map.
코드 실행 결과입니다. 아주 잘됩니다.
The result of the code execution. Very well.
예제용 맵과 트리거 파일을 첨부합니다.
Attach a sample map and trigger file.
fistex.zip
fistex.ns