Signal-Script (EM4)

Achtung: Aktuell können keine E-Mails an den Provider outlook.com/hotmail.de übermittelt werden. Dies trifft auch auf die Aktivierungs-Mails zu.
Information: The EMERGENCY community board is completely free and is financed by advertisement. Please deactivate adblocker if you use this site. Thank you!
Note about the webdisk: Downloading larger files should be possible again.
  • Example script for the realization of a signal in EMERGENCY 4.
    == Signal-Script ==
    The signal script is used to control the signal from emergency vehicles. For this purpose every emergency vehicle has assigned a control button and a sound file via a script.


    1 Necessary adjustments


    In order to get the script working, some changes to the respective script files must be performed manually. In the following lines, the paths of the prototype to the vehicles must be specified. For each vehicle its own sound file is played.

    Code
    // Here specify the paths of your vehicles!
    const char PROTO_FF_RW[] = "mod:Prototypes/Vehicles/Fire Department/rw.e4p";
    const char PROTO_FF_TLF[] = "mod:Prototypes/Vehicles/Fire Department/tlf.e4p";
    const char PROTO_FF_DLK[] = "mod:Prototypes/Vehicles/Fire Department/dlk.e4p";


    In the following lines, the strings above ("PROTO_XX_XXX") must be entered. Also the paths to the respective sound files are defined here.



    2 Script


    The script is offered as a download, as well as a code directly from this page. (sosi.rar)


    Includes: - Continuous signal ccript - all necessary dummies.


    Features: - Players can enable and disable signal manually - Continuous signal goes off automatically when the vehicle has arrived or begins to extinguish / install itself (DLK).


    Fixes in V.2.0: - Continuous signal ends when a vehicle is driven to the base - Continuous signal ends when a vehicle has been sent directly from the base to a certain point.


    Explanations of the script: I'm sorry, but the fact that some problems have set, I am no longer able to explain the script amateur justice - it has become rather complicated. However, for direct questions I am able to help.



    3 Adaptation to other scripts


    To disable the signal automatically, we need a small piece of code in each script the following list:

    • Cool.script
    • Deinstall.script
    • Emptycar.script
    • Extinguish.script
    • GoHome.script
    • Install.script
    • Move.script

    For correct function, the code must be within the "void Push Action (GameObject * Caller, Actor * Target, int childID)" - but possibly at the end!


    The code must be as follows:


    Code
    if (Caller->GetType() == ACTOR_VEHICLE)
    {
    Vehicle v(Caller);
    v.PushActionExecuteCommand(ACTION_APPEND, "VCmdSiren", Caller, 2, false);
    }


    Below an explanation of each function:


    Vehicle v(Caller); - Transfers the caller, so the performing part of the script is a vehicle v (v = the "Name").
    PushActionExecuteCommand - Executes a command in order.
    ACTION_APPEND - The specification of the order (here ACTION_APPEND for the inserting to the end of the existing list).
    VCmdSiren - The name of the performing comands.
    Caller - Here, the target for the executed command is passed, in this case, the caller itself.
    2 - Is a so-called child ID, here there are 2 options!
    1 → The vehicle turns off the signal the blue lights are turned off.
    2 → The vehicle runs the blue lights.
    false - Specifies whether to be tested in the executed command if the command is possible (we in this case dont care, so false for "no").


    Alternatively, the modified source files are also available for download. In addition, there is subsequently a revised sample script.


    Example script: „deinstall.script“


    4 Troubleshooting


    If error messages and problems occur, the author of the script can be contacted. For this, a detailed description of the fault and, optimally, a log file is to be added.


    Author: Bass-ti
    Contact: Bass-ti@ddr-mod.de
    Script name: SoSi.script
    Script version: V.2.0 Datum: 24.04.2006
    Note: This script uses a DUMMY-Command which normally should not see as a player. To hide it, it is necessary that the hazard lights script is used.