b2bomber Posted September 17, 2011 Report Share Posted September 17, 2011 Hi all,I have had 1-2 years now of scripting experience now and I have decided to try out working with emergency's base. I have two questions for you, one is a bit more specific than the other so here I go.Q 1. Ok, well I know this script is missing a lot probably but basically I am looking for an answer of how to get it to start working in the game...So here is the error in the log file that I am getting when I start up the editor and load the mod with the script in it.?(_Airhornfc246a): Error: Symbol CLASS_AirHornAirHorn is not defined in current scope its saying the the object/class that I have created is not defined in the current scope, is there some where that I need to be defining the script to something?here's the script...//==================================================================================================// // ///ENGLISH-USA setup/////// AirHorn.script// By B2bomber// on 9/16/11//// Usage of this script in any content is NOT allowed without the expressed// written consent of Jacob McKim/B2bomber//// This script is used to make the air horn effect for emergency apparatus// in em4////// Last Edit : 9/17/11//// Version #: 1.0.0//// ///DEUTSCH-Fertig mit Google Translate///////// AirHorn.script// Von B2bomber// Auf 17/9/11//// Aufruf des Skripts in beliebiger Inhalte ist ohne ausdrückliche erlaubt// Zustimmung von Jacob McKim/B2bomber geschrieben//// Dieses Skript wird verwendet, um die Luft Horn-Effekt für den// Notfall apparat machen In EM4////// Letzte Änderung: 17/9/11//// Version #: 1.0.0//////================================================================================================// Start by creating the objectobject AirHorn : CommandScript{VcmdAirHorn (){SetIcon (Sirens);SetPossibleCallers(ACTOR_VEHICLE);SetValidTargets(ACTOR_VEHICLE);SetRestrictions(RESTRICT_SELFEXECUTE);SetDeselectCaller(false);}bool CheckGroupVisibility(GameObject *Caller){if(!Caller->IsValid() || Caller->GetType() != ACTOR_VEHICLE) {return false;}else { return true; }}bool CheckTarget(GameObject *Caller, Actor *Target, int childID){ if(!Caller->IsValid() || !Target->IsValid() || Target->GetID() != Caller->GetID()) {return false;} else {return true;}}void PushActions (GameObject *Caller, Actor *Target, int childID){Vehicle v(Caller);int soundID;Vector VPos=v.GetPosition();soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/airhorn.wav", VPos, false);}}Q 2. Now In general can someone please describe to me how the flow of emergency's scripts work. I have worked with several different game engines some object oriented some not (Unity,Blitz,Torque,Unreal Engine). Although I really haven't found a good reference for how the flow of the program works. I can kind of see how it working but really would like to see if someone could clarify it for me. I have been using so far...-Modding Studio 2012-LA Mod Scripts as comparitive-http://www.emergency...tegorie:ScriptsThanks,B2Bomber Quote Link to comment Share on other sites More sharing options...
rafaelmfernandez Posted September 17, 2011 Report Share Posted September 17, 2011 Shouldnt the script end like this? vvvvvv yours ends with }}soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/airhorn.wav", VPos, false); }}; Quote Link to comment Share on other sites More sharing options...
cops Posted October 6, 2011 Report Share Posted October 6, 2011 well for so far I can seeVcmdAirHorn (){SetIcon (Sirens);VcmdAirHorn (){SetIcon (Airhorn);I guess, you will need the last one I showed you and what rafaelmfernandez says Quote Link to comment Share on other sites More sharing options...