TheManGoesWild Posted May 24, 2016 Report Share Posted May 24, 2016 Is there anyway to play a supervisor video in a script? like I have a test call for fire station script which plays tone test, I was wondering if its possible to add play super video video to the script? Below is my script that I've edited object TestAlarm : CommandScript { TestAlarm () { SetIcon("tones"); SetCursor("tones"); SetRestrictions(RESTRICT_SELFEXECUTE); SetPossibleCallers(ACTOR_VEHICLE); } bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; if (!Caller->GetType() == ACTOR_VEHICLE) return false; return true; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if (!Target->IsValid() || Target->GetID() != Caller->GetID()) return false; return true; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Vehicle v(Caller); if (!v.HasCommand(DUMMY_HASSIREN)) { if (!v.IsBlueLightEnabled()) { v.EnableBlueLights(true); } Vector Pos = Caller->GetPosition(); Audio::PlaySample3D("mod:Audio/FX/tones/Test.wav", Pos); } if (v.HasCommand(DUMMY_HASSIREN)) { if (childID == 1) { v.EnableBlueLights(false); } int ref = v.GetUserData(); v.UnattachSound(ref); Audio::StopSample(ref); int mSirTest; GameObjectList list = Game::GetGameObjects(NAME_DUMMYOBJECT); for(int i=0; i<list.GetNumObjects(); i++) { GameObject *obj = list.GetObject(i); if (obj->GetUserData() == ref) { mSirTest = i; } } GameObject *obj = list.GetObject(mSirTest); obj->PushActionDeleteOwner(ACTION_NEWLIST); if (v.HasCommand(DUMMY_HASSIREN)) v.RemoveCommand(DUMMY_HASSIREN); return; } } }; Quote Link to comment Share on other sites More sharing options...
itchboy Posted May 24, 2016 Report Share Posted May 24, 2016 (edited) everything for the audio part look ok to my eyes. ive been reading through the script/code SDK and found nothing that allows the player to play a supervisor type video. there are 2 others that allow for videos to be played ingame, but they are not what you are looking for unfortunately. one function plays an actual mpg video overtop the entire gameplay (and makes the game unplayable as the video plays), while another one plays a video on an object. the second function is actually useful for doing things like video billboards or movie screens in a theater. try looking at the SDK though, i may have missed something. found the function. it is this. Mission::PlayComment("PATH TO VIDEO FILE HERE"); Simply put the path of the vid file "mod:Lang/blah" and be sure to use the correct resolution, file format and video and audio format as well. Edited May 24, 2016 by itchboy found the function Quote Link to comment Share on other sites More sharing options...