Debian Codegraph @

scripts/ChrisTest.cpp

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 /////////////////////////////////////////////////////////////////////
20 // D.A.L.L.A.S. Generated Level Script - DLL Source File
21 //
22 // Filename: Train03.cpp
23 // Version: 3
24 /////////////////////////////////////////////////////////////////////
25 #include <stdio.h>
26 #include <stdlib.h>
27 #include <string.h>
28 #include <ctype.h>
29 #include "osiris_import.h"
30 #include "osiris_common.h"
31 #include "DallasFuncs.cpp"
32
33 #include "module.h"
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 DLLEXPORT char STDCALL InitializeDLL(tOSIRISModuleInit *func_list);
39 DLLEXPORT void STDCALL ShutdownDLL(void);
40 DLLEXPORT int STDCALL GetGOScriptID(const char *name, uint8_t is_door);
41 DLLEXPORT void STDCALLPTR CreateInstance(int id);
42 DLLEXPORT void STDCALL DestroyInstance(int id, void *ptr);
43 DLLEXPORT int16_t STDCALL CallInstanceEvent(int id, void *ptr, int event, tOSIRISEventInfo *data);
44 DLLEXPORT int STDCALL GetTriggerScriptID(int trigger_room, int trigger_face);
45 DLLEXPORT int STDCALL GetCOScriptList(int **list, int **id_list);
46 DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state);
47 #ifdef __cplusplus
48 }
49 #endif
50
51 // =================
52 // Script ID Numbers
53 // =================
54 #define ID_LEVEL_0000 0x000
55
56 #define ID_CUSTOM_OBJECT_1004 0x001
57
58 // ========================
59 // Script Class Definitions
60 // ========================
61
62 class BaseScript {
63 public:
64 BaseScript();
65 ~BaseScript();
66 virtual int16_t CallEvent(int event, tOSIRISEventInfo *data);
67 };
68
69 class LevelScript_0000 : public BaseScript {
70 public:
71 int16_t CallEvent(int event, tOSIRISEventInfo *data);
72 };
73
74 class CustomObjectScript_1004 : public BaseScript {
75 public:
76 int16_t CallEvent(int event, tOSIRISEventInfo *data);
77 };
78
79 // ======================
80 // Global Action Counters
81 // ======================
82
83 #define MAX_ACTION_CTR_VALUE 100000
84
85 int ScriptActionCtr_000 = 0;
86 int ScriptActionCtr_001 = 0;
87 int ScriptActionCtr_002 = 0;
88 int ScriptActionCtr_003 = 0;
89
90 // ========================================
91 // Function to Clear Global Action Counters
92 // ========================================
93 void ClearGlobalActionCtrs(void) {
94 ScriptActionCtr_000 = 0;
95 ScriptActionCtr_001 = 0;
96 ScriptActionCtr_002 = 0;
97 ScriptActionCtr_003 = 0;
98 }
99
100 // ========================================
101 // Function to Save Global Action Counters
102 // ========================================
103 void SaveGlobalActionCtrs(void *file_ptr) {
104 File_WriteInt(ScriptActionCtr_000, file_ptr);
105 File_WriteInt(ScriptActionCtr_001, file_ptr);
106 File_WriteInt(ScriptActionCtr_002, file_ptr);
107 File_WriteInt(ScriptActionCtr_003, file_ptr);
108 }
109
110 // ===========================================
111 // Function to Restore Global Action Counters
112 // ===========================================
113 void RestoreGlobalActionCtrs(void *file_ptr) {
114 ScriptActionCtr_000 = File_ReadInt(file_ptr);
115 ScriptActionCtr_001 = File_ReadInt(file_ptr);
116 ScriptActionCtr_002 = File_ReadInt(file_ptr);
117 ScriptActionCtr_003 = File_ReadInt(file_ptr);
118 }
119
120 // ===============================================================
121 // Start of Custom Script Block - DO NOT EDIT ANYTHING BEFORE THIS
122 // ===============================================================
123 /**{CUSTOM_SCRIPT_BLOCK_START}** DO NOT EDIT! **/
124
125 // Enter your custom script code here
126
127 /**{CUSTOM_SCRIPT_BLOCK_END}**** DO NOT EDIT! **/
128 // ============================================================
129 // End of Custom Script Block - DO NOT EDIT ANYTHING AFTER THIS
130 // ============================================================
131
132 // =================
133 // Message File Data
134 // =================
135
136 #define MAX_SCRIPT_MESSAGES 256
137 #define MAX_MSG_FILEBUF_LEN 1024
138 #define NO_MESSAGE_STRING "*Message Not Found*"
139 #define INV_MSGNAME_STRING "*Message Name Invalid*"
140 #define WHITESPACE_CHARS " \t\r\n"
141
142 // Structure for storing a script message
143 struct tScriptMessage {
144 char *name; // the name of the message
145 char *message; // the actual message text
146 };
147
148 // Global storage for level script messages
149 tScriptMessage *message_list[MAX_SCRIPT_MESSAGES];
150 int num_messages;
151
152 // ======================
153 // Message File Functions
154 // ======================
155
156 // Initializes the Message List
157 void InitMessageList(void) {
158 for (int j = 0; j < MAX_SCRIPT_MESSAGES; j++)
159 message_list[j] = NULL;
160 num_messages = 0;
161 }
162
163 // Clear the Message List
164 void ClearMessageList(void) {
165 for (int j = 0; j < num_messages; j++) {
166 free(message_list[j]->name);
167 free(message_list[j]->message);
168 free(message_list[j]);
169 message_list[j] = NULL;
170 }
171 num_messages = 0;
172 }
173
174 // Adds a message to the list
175 int AddMessageToList(char *name, char *msg) {
176 int pos;
177
178 // Make sure there is room in the list
179 if (num_messages >= MAX_SCRIPT_MESSAGES)
180 return false;
181
182 // Allocate memory for this message entry
183 pos = num_messages;
184 message_list[pos] = (tScriptMessage *)malloc(sizeof(tScriptMessage));
185 if (message_list[pos] == NULL)
186 return false;
187
188 // Allocate memory for the message name
189 message_list[pos]->name = (char *)malloc(strlen(name) + 1);
190 if (message_list[pos]->name == NULL) {
191 free(message_list[pos]);
192 return false;
193 }
194 strcpy(message_list[pos]->name, name);
195
196 // Allocate memory for the message name
197 message_list[pos]->message = (char *)malloc(strlen(msg) + 1);
198 if (message_list[pos]->message == NULL) {
199 free(message_list[pos]->name);
200 free(message_list[pos]);
201 return false;
202 }
203 strcpy(message_list[pos]->message, msg);
204 num_messages++;
205
206 return true;
207 }
208
209 // Removes any whitespace padding from the end of a string
210 void RemoveTrailingWhitespace(char *s) {
211 int last_char_pos;
212
213 last_char_pos = strlen(s) - 1;
214 while (last_char_pos >= 0 && isspace(s[last_char_pos])) {
215 s[last_char_pos] = '\0';
216 last_char_pos--;
217 }
218 }
219
220 // Returns a pointer to the first non-whitespace char in given string
221 char *SkipInitialWhitespace(char *s) {
222 while ((*s) != '\0' && isspace(*s))
223 s++;
224
225 return (s);
226 }
227
228 // Read in the Messages
229 int ReadMessageFile(const char *filename) {
230 void *infile;
231 char filebuffer[MAX_MSG_FILEBUF_LEN + 1];
232 char *line, *msg_start;
233 int line_num;
234 bool next_msgid_found;
235
236 // Try to open the file for loading
237 infile = File_Open(filename, "rt");
238 if (!infile)
239 return false;
240
241 line_num = 0;
242 next_msgid_found = true;
243
244 // Clear the message list
245 ClearMessageList();
246
247 // Read in and parse each line of the file
248 while (!File_eof(infile)) {
249
250 // Clear the buffer
251 strcpy(filebuffer, "");
252
253 // Read in a line from the file
254 File_ReadString(filebuffer, MAX_MSG_FILEBUF_LEN, infile);
255 line_num++;
256
257 // Remove whitespace padding at start and end of line
258 RemoveTrailingWhitespace(filebuffer);
259 line = SkipInitialWhitespace(filebuffer);
260
261 // If line is a comment, or empty, discard it
262 if (strlen(line) == 0 || strncmp(line, "//", 2) == 0)
263 continue;
264
265 if (!next_msgid_found) { // Parse out the last message ID number
266
267 // Grab the first keyword, make sure it's valid
268 line = strtok(line, WHITESPACE_CHARS);
269 if (line == NULL)
270 continue;
271
272 // Grab the second keyword, and assign it as the next message ID
273 line = strtok(NULL, WHITESPACE_CHARS);
274 if (line == NULL)
275 continue;
276
277 next_msgid_found = true;
278 } else { // Parse line as a message line
279
280 // Find the start of message, and mark it
281 msg_start = strchr(line, '=');
282 if (msg_start == NULL)
283 continue;
284 msg_start[0] = '\0';
285 msg_start++;
286
287 // Add the message to the list
288 AddMessageToList(line, msg_start);
289 }
290 }
291 File_Close(infile);
292
293 return true;
294 }
295
296 // Find a message
297 const char *GetMessage(const char *name) {
298 // Make sure given name is valid
299 if (name == NULL)
300 return INV_MSGNAME_STRING;
301
302 // Search message list for name
303 for (int j = 0; j < num_messages; j++)
304 if (strcmp(message_list[j]->name, name) == 0)
305 return (message_list[j]->message);
306
307 // Couldn't find it
308 return NO_MESSAGE_STRING;
309 }
310
311 //======================
312 // Name List Arrays
313 //======================
314
315 #define NUM_DOOR_NAMES 0
316 const char **Door_names = NULL;
317 int *Door_handles = NULL;
318
319 #define NUM_OBJECT_NAMES 1
320 const char *Object_names[NUM_OBJECT_NAMES] = {"Train1Position"};
321 int Object_handles[NUM_OBJECT_NAMES];
322
323 #define NUM_ROOM_NAMES 0
324 const char **Room_names = NULL;
325 int *Room_indexes = NULL;
326
327 #define NUM_TRIGGER_NAMES 0
328 const char **Trigger_names = NULL;
329 int *Trigger_indexes = NULL;
330 int *Trigger_faces = NULL;
331 int *Trigger_rooms = NULL;
332
333 #define NUM_SOUND_NAMES 0
334 const char **Sound_names = NULL;
335 int *Sound_indexes = NULL;
336
337 #define NUM_TEXTURE_NAMES 0
338 const char **Texture_names = NULL;
339 int *Texture_indexes = NULL;
340
341 #define NUM_PATH_NAMES 1
342 const char *Path_names[NUM_PATH_NAMES] = {"Train1"};
343 int Path_indexes[NUM_PATH_NAMES];
344
345 #define NUM_MATCEN_NAMES 1
346 const char *Matcen_names[NUM_MATCEN_NAMES] = {"Train 1"};
347 int Matcen_indexes[NUM_MATCEN_NAMES];
348
349 #define NUM_GOAL_NAMES 0
350 const char **Goal_names = NULL;
351 int *Goal_indexes = NULL;
352
353 #define NUM_MESSAGE_NAMES 0
354 const char **Message_names = NULL;
355 const char **Message_strings = NULL;
356
357 // ===============
358 // InitializeDLL()
359 // ===============
360 char STDCALL InitializeDLL(tOSIRISModuleInit *func_list) {
361 osicommon_Initialize((tOSIRISModuleInit *)func_list);
362 if (func_list->game_checksum != CHECKSUM) {
363 mprintf(0, "Game-Checksum FAIL!!! (%ul!=%ul)\n", func_list->game_checksum, CHECKSUM);
364 mprintf(0, "RECOMPILE YOUR SCRIPTS!!!\n");
365 return 0;
366 }
367
368 ClearGlobalActionCtrs();
369 dfInit();
370 InitMessageList();
371
372 // Build the filename of the message file
373 char filename[_MAX_PATH + 32];
374 int lang_type;
375 if (func_list->script_identifier != NULL) {
376 _splitpath(func_list->script_identifier, NULL, NULL, filename, NULL);
377 lang_type = Game_GetLanguage();
378 if (lang_type == LANGUAGE_FRENCH)
379 strcat(filename, "_FRN");
380 else if (lang_type == LANGUAGE_GERMAN)
381 strcat(filename, "_GER");
382 else if (lang_type == LANGUAGE_ITALIAN)
383 strcat(filename, "_ITN");
384 else if (lang_type == LANGUAGE_SPANISH)
385 strcat(filename, "_SPN");
386 strcat(filename, ".msg");
387 } else {
388 strcpy(filename, "Train03.msg");
389 lang_type = LANGUAGE_ENGLISH;
390 }
391 if (!ReadMessageFile(filename)) {
392 mprintf(0, "ERROR: Could not load message file - %s\n", filename);
393 }
394
395 int j;
396
397 // Do Door Index lookups
398 for (j = 0; j < NUM_DOOR_NAMES; j++)
399 Door_handles[j] = Scrpt_FindDoorName(Door_names[j]);
400
401 // Do Object Index lookups
402 for (j = 0; j < NUM_OBJECT_NAMES; j++)
403 Object_handles[j] = Scrpt_FindObjectName(Object_names[j]);
404
405 // Do Room Index lookups
406 for (j = 0; j < NUM_ROOM_NAMES; j++)
407 Room_indexes[j] = Scrpt_FindRoomName(Room_names[j]);
408
409 // Do Trigger Index lookups
410 for (j = 0; j < NUM_TRIGGER_NAMES; j++) {
411 Trigger_indexes[j] = Scrpt_FindTriggerName(Trigger_names[j]);
412 Trigger_faces[j] = Scrpt_GetTriggerFace(Trigger_indexes[j]);
413 Trigger_rooms[j] = Scrpt_GetTriggerRoom(Trigger_indexes[j]);
414 }
415
416 // Do Sound Index lookups
417 for (j = 0; j < NUM_SOUND_NAMES; j++)
418 Sound_indexes[j] = Scrpt_FindSoundName(Sound_names[j]);
419
420 // Do Texture Index lookups
421 for (j = 0; j < NUM_TEXTURE_NAMES; j++)
422 Texture_indexes[j] = Scrpt_FindTextureName(Texture_names[j]);
423
424 // Do Path Index lookups
425 for (j = 0; j < NUM_PATH_NAMES; j++)
426 Path_indexes[j] = Scrpt_FindPathName(Path_names[j]);
427
428 // Do Matcen Index lookups
429 for (j = 0; j < NUM_MATCEN_NAMES; j++)
430 Matcen_indexes[j] = Scrpt_FindMatcenName(Matcen_names[j]);
431
432 // Do Goal Index lookups
433 for (j = 0; j < NUM_GOAL_NAMES; j++)
434 Goal_indexes[j] = Scrpt_FindLevelGoalName(Goal_names[j]);
435
436 // Do Message Name lookups
437 for (j = 0; j < NUM_MESSAGE_NAMES; j++)
438 Message_strings[j] = GetMessage(Message_names[j]);
439
440 return 1;
441 }
442
443 // =============
444 // ShutdownDLL()
445 // =============
446 void STDCALL ShutdownDLL(void) { ClearMessageList(); }
447
448 // ===============
449 // GetGOScriptID()
450 // ===============
451 int STDCALL GetGOScriptID(const char *name, uint8_t isdoor) { return -1; }
452
453 // ================
454 // CreateInstance()
455 // ================
456 void STDCALLPTR CreateInstance(int id) {
457 switch (id) {
458 case ID_LEVEL_0000:
459 return new LevelScript_0000;
460 break;
461 case ID_CUSTOM_OBJECT_1004:
462 return new CustomObjectScript_1004;
463 break;
464 default:
465 mprintf(0, "SCRIPT: Illegal ID (%d)\n", id);
466 break;
467 }
468 return NULL;
469 }
470
471 // =================
472 // DestroyInstance()
473 // =================
474 void STDCALL DestroyInstance(int id, void *ptr) {
475 switch (id) {
476 case ID_LEVEL_0000:
477 delete ((LevelScript_0000 *)ptr);
478 break;
479 case ID_CUSTOM_OBJECT_1004:
480 delete ((CustomObjectScript_1004 *)ptr);
481 break;
482 default:
483 mprintf(0, "SCRIPT: Illegal ID (%d)\n", id);
484 break;
485 }
486 }
487
488 // ===================
489 // CallInstanceEvent()
490 // ===================
491 int16_t STDCALL CallInstanceEvent(int id, void *ptr, int event, tOSIRISEventInfo *data) {
492 switch (id) {
493 case ID_LEVEL_0000:
494 case ID_CUSTOM_OBJECT_1004:
495 return ((BaseScript *)ptr)->CallEvent(event, data);
496 break;
497 default:
498 mprintf(0, "SCRIPT: Illegal ID (%d)\n", id);
499 break;
500 }
501 return CONTINUE_CHAIN | CONTINUE_DEFAULT;
502 }
503
504 // ==================
505 // SaveRestoreState()
506 // ==================
507 int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state) { return 0; }
508
509 // ====================
510 // GetTriggerScriptID()
511 // ====================
512 int STDCALL GetTriggerScriptID(int trigger_room, int trigger_face) { return -1; }
513
514 // =================
515 // GetCOScriptList()
516 // =================
517 int STDCALL GetCOScriptList(int **list, int **id_list) {
518 static int cust_handle_list[1];
519 static int cust_id_list[1] = {ID_CUSTOM_OBJECT_1004};
520
521 // Fill in the custom handle list
522 cust_handle_list[0] = Object_handles[0];
523
524 *list = cust_handle_list;
525 *id_list = cust_id_list;
526
527 return 1;
528 }
529
530 //=======================
531 // Script Implementation
532 //=======================
533
534 BaseScript::BaseScript() {}
535
536 BaseScript::~BaseScript() {}
537
538 int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) {
539 mprintf(0, "BaseScript::CallEvent()\n");
540 return CONTINUE_CHAIN | CONTINUE_DEFAULT;
541 }
542
543 int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) {
544 switch (event) {
545 case EVT_SAVESTATE: {
546 tOSIRISEVTSAVESTATE *event_data = &data->evt_savestate;
547
548 SaveGlobalActionCtrs(event_data->fileptr);
549 dfSave(event_data->fileptr);
550 } break;
551 case EVT_RESTORESTATE: {
552 tOSIRISEVTRESTORESTATE *event_data = &data->evt_restorestate;
553
554 RestoreGlobalActionCtrs(event_data->fileptr);
555 dfRestore(event_data->fileptr);
556 } break;
557 case EVT_LEVELSTART: {
558 tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart;
559
560 ClearGlobalActionCtrs();
561 dfInit();
562
563 // Script 000: Level Start - Misc
564 if (1 == false) {
565 aObjGhostSet(1, Object_handles[0]);
566 aMatcenSetState(1, Matcen_indexes[0]);
567
568 // Increment the script action counter
569 if (ScriptActionCtr_000 < MAX_ACTION_CTR_VALUE)
570 ScriptActionCtr_000++;
571 }
572 } break;
573 case EVT_AIN_GOALCOMPLETE: {
574 tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_goalcomplete;
575
576 // Script 002: Train1 Done
577 if (event_data->goal_uid == 0) {
578 aMoveObjectToPositionClipboard(event_data->it_handle);
579 aAIGoalFollowPath(Object_handles[0], Path_indexes[0], 1, 2, 1, 3, 131328, 0);
580
581 // Increment the script action counter
582 if (ScriptActionCtr_002 < MAX_ACTION_CTR_VALUE)
583 ScriptActionCtr_002++;
584 }
585 } break;
586 case EVT_MATCEN_CREATE: {
587 tOSIRISEVTMATCENCREATE *event_data = &data->evt_matcen_create;
588
589 // Script 001: Train1 Matcen Produced a Train
590 if (1 == false) {
591 aStoreObjectInPositionClipboard(Object_handles[0]);
592 aMoveObjectToPositionClipboard(event_data->it_handle);
593 aAIGoalFollowPath(event_data->it_handle, Path_indexes[0], 1, 2, 1, 3, 131328, 0);
594
595 // Increment the script action counter
596 if (ScriptActionCtr_001 < MAX_ACTION_CTR_VALUE)
597 ScriptActionCtr_001++;
598 }
599 } break;
600 }
601 return CONTINUE_CHAIN | CONTINUE_DEFAULT;
602 }
603
604 int16_t CustomObjectScript_1004::CallEvent(int event, tOSIRISEventInfo *data) {
605 switch (event) {
606 case EVT_CREATED: {
607 tOSIRISEVTCREATED *event_data = &data->evt_created;
608
609 // Script 003: Script Description Goes Here
610 if (1) {
611 aStoreObjectInPositionClipboard(Object_handles[0]);
612 aMoveObjectToPositionClipboard(Object_handles[0]);
613 aAIGoalFollowPath(Object_handles[0], Path_indexes[0], 1, 2, 1, 3, 131328, 0);
614
615 // Increment the script action counter
616 if (ScriptActionCtr_003 < MAX_ACTION_CTR_VALUE)
617 ScriptActionCtr_003++;
618 }
619 } break;
620 }
621 return CONTINUE_CHAIN | CONTINUE_DEFAULT;
622 }
623
624 /*********************************************************
625 Script Save Block: DO NOT TOUCH ANYTHING IN THIS BLOCK!!!
626 **********************************************************
627 $$SCRIPT_BLOCK_START
628
629 VERSION 3
630 NEXT_ID 4
631
632 // UserType value blocks
633 $$UTYPE_VALS_START UserVar
634 $$UTYPE_VALS_END
635
636 $$UTYPE_VALS_START UserFlag
637 $$UTYPE_VALS_END
638
639 $$UTYPE_VALS_START SpewHandle
640 $$UTYPE_VALS_END
641
642 $$UTYPE_VALS_START TimerID
643 $$UTYPE_VALS_END
644
645 $$UTYPE_VALS_START SavedObjectSlot
646 $$UTYPE_VALS_END
647
648 $$UTYPE_VALS_START GoalID
649 0:Train1Done
650 $$UTYPE_VALS_END
651
652
653 // Name Lists
654 $$DOOR_LIST_START
655 $$DOOR_LIST_END
656
657 $$OBJECT_LIST_START
658 Train1Position
659 $$OBJECT_LIST_END
660
661 $$ROOM_LIST_START
662 $$ROOM_LIST_END
663
664 $$TRIGGER_LIST_START
665 $$TRIGGER_LIST_END
666
667 $$SOUND_LIST_START
668 $$SOUND_LIST_END
669
670 $$TEXTURE_LIST_START
671 $$TEXTURE_LIST_END
672
673 $$SPECNAME_LIST_START
674 $$SPECNAME_LIST_END
675
676 $$PATH_LIST_START
677 Train1
678 $$PATH_LIST_END
679
680 $$MATCEN_LIST_START
681 Train 1
682 $$MATCEN_LIST_END
683
684 $$GOAL_LIST_START
685 $$GOAL_LIST_END
686
687 $$STRM_AUDIO_LIST_START
688 $$STRM_AUDIO_LIST_END
689
690
691 // Script Tree Dump
692 00:0:Level Start - Misc
693 $$CHILD_BLOCK_START
694 01:2:0
695 02:6
696 03:0
697 $$CHILD_BLOCK_START
698 05:1
699 $$CHILD_BLOCK_START
700 10:5:1:Literal
701 07:0:7
702 $$CHILD_BLOCK_END
703 $$CHILD_BLOCK_END
704 04:0:0:0
705 $$CHILD_BLOCK_START
706 08:aObjGhostSet
707 $$CHILD_BLOCK_START
708 10:10:0:1:Ghost/Unghost
709 10:1:0:0:Object
710 $$CHILD_BLOCK_END
711 08:aMatcenSetState
712 $$CHILD_BLOCK_START
713 10:10:0:1:Activate/Deactivate
714 10:17:0:0:Matcen
715 $$CHILD_BLOCK_END
716 $$CHILD_BLOCK_END
717 $$CHILD_BLOCK_END
718 00:1:Train1 Matcen Produced a Train
719 $$CHILD_BLOCK_START
720 01:2:0
721 02:21
722 03:0
723 $$CHILD_BLOCK_START
724 05:1
725 $$CHILD_BLOCK_START
726 10:5:1:Literal
727 07:0:7
728 $$CHILD_BLOCK_END
729 $$CHILD_BLOCK_END
730 04:0:0:0
731 $$CHILD_BLOCK_START
732 08:aStoreObjectInPositionClipboard
733 $$CHILD_BLOCK_START
734 10:1:0:0:Object
735 $$CHILD_BLOCK_END
736 08:aMoveObjectToPositionClipboard
737 $$CHILD_BLOCK_START
738 10:1:1:-1:Object
739 $$CHILD_BLOCK_END
740 08:aAIGoalFollowPath
741 $$CHILD_BLOCK_START
742 10:1:1:-1:Object
743 10:16:0:Path
744 10:4:1:FirstNode
745 10:4:2:LastNode
746 10:4:1:StartNode
747 10:10:0:3:GoalPriority
748 10:15:131328:AIGoalFlags
749 10:10:0:0:GoalID
750 $$CHILD_BLOCK_END
751 $$CHILD_BLOCK_END
752 $$CHILD_BLOCK_END
753 00:2:Train1 Done
754 $$CHILD_BLOCK_START
755 01:2:0
756 02:13
757 03:0
758 $$CHILD_BLOCK_START
759 05:2
760 $$CHILD_BLOCK_START
761 10:10:1:0:GoalID
762 07:1:0
763 10:10:0:0:GoalID
764 $$CHILD_BLOCK_END
765 $$CHILD_BLOCK_END
766 04:0:0:0
767 $$CHILD_BLOCK_START
768 08:aMoveObjectToPositionClipboard
769 $$CHILD_BLOCK_START
770 10:1:1:-1:Object
771 $$CHILD_BLOCK_END
772 08:aAIGoalFollowPath
773 $$CHILD_BLOCK_START
774 10:1:0:0:Object
775 10:16:0:Path
776 10:4:1:FirstNode
777 10:4:2:LastNode
778 10:4:1:StartNode
779 10:10:0:3:GoalPriority
780 10:15:131328:AIGoalFlags
781 10:10:0:0:GoalID
782 $$CHILD_BLOCK_END
783 $$CHILD_BLOCK_END
784 $$CHILD_BLOCK_END
785 00:3:Script Description Goes Here
786 $$CHILD_BLOCK_START
787 01:1:0
788 02:2
789 03:0
790 $$CHILD_BLOCK_START
791 05:0
792 $$CHILD_BLOCK_END
793 04:0:0:0
794 $$CHILD_BLOCK_START
795 08:aStoreObjectInPositionClipboard
796 $$CHILD_BLOCK_START
797 10:1:0:0:Object
798 $$CHILD_BLOCK_END
799 08:aMoveObjectToPositionClipboard
800 $$CHILD_BLOCK_START
801 10:1:0:0:Object
802 $$CHILD_BLOCK_END
803 08:aAIGoalFollowPath
804 $$CHILD_BLOCK_START
805 10:1:0:0:Object
806 10:16:0:Path
807 10:4:1:FirstNode
808 10:4:2:LastNode
809 10:4:1:StartNode
810 10:10:0:3:GoalPriority
811 10:15:131328:AIGoalFlags
812 10:10:0:0:GoalID
813 $$CHILD_BLOCK_END
814 $$CHILD_BLOCK_END
815 $$CHILD_BLOCK_END
816
817 $$SCRIPT_BLOCK_END
818 *********************************************************/