: : : Could someone please explain to me how I would use the following default code? I dont really understand it and I dont need to modify it enough to warrant me learning the depths of pascal :P
: : :
: : : Thx <3
: : :
: : :
: : :
: : :
: : :
: : :
: : : unit UserDefined;{Dont change this!}
: : :
: : : interface
: : : uses SysUtils, AS_Functions{Dont delete this!};
: : :
: : : //Use the following 2 procedures to react on ET-Events
: : : procedure On_HotKey(AHotKey : Cardinal);
: : : procedure On_LogLine(ALogLine : String);
: : :
: : : //Use the procedure ExecETCommand(Command : String) to send a command to ET
: : : implementation
: : :
: : : procedure On_HotKey(AHotKey : Cardinal);
: : : begin
: : : writeln('HotKey:'+IntToStr(AHotKey));
: : : end;
: : :
: : : procedure On_LogLine(ALogLine : String);
: : : begin
: : : writeln('LogLine:'+AlogLine);
: : : end;
: : :
: : : end.
: : :
: : You can call both procedures like any other procedure:
: :
: : program Example;
: :
: : uses
: : UserDefines;
: :
: : begin
: : On_LogLine('Hello World');
: : end.
: :
: :
:
:
: I probably should have given some kind of context for this -
: Its the "advanced scripting" part of a program that reads lines from the console of a quake3 engine based game, such as "xx killed xx with a knife" or "You picked up a health pack" etc.
: What I'm looking for is the correct syntax to do stuff like "When the console says xxxx, do xxxx"
:
: Thats what those two default procedures are for, the On_LogLine one reads from the console, and the ExecETCommand one writes commands to the console.
:
: I just dont know how to use them :P
:
: Thanks anyway though.
:
:
: Any further help would be greatly appreciated <3
:
My guess is that you change the implementation (ie. between
begin and
end;) part of those functions to what you want it to say. That's the only thing I can think of based on this code.