Jump to content


Air horn script


  • This topic is locked This topic is locked
126 replies to this topic

#121 SirMoo

SirMoo

    Captain

  • Members
  • 239 posts
  • Gender:Male
  • Location:Texas <3

Posted 13 October 2009 - 03:26 AM

You have the wrong script then. Because the script I gave you plays the air horn once, at the vehicle's current location.

Below is what I have in my LAHorn.script file. Which is the most recent one you posted. It plays it over and over as well as stays in the spot and not with the vehicle.
object VcmdHorn : CommandScript{    VcmdHorn()    {        SetIcon("sirenson");        SetCursor("sirens");        SetRestrictions(RESTRICT_SELFEXECUTE);        SetPossibleCallers(ACTOR_VEHICLE);    }    bool CheckPossible(GameObject *Caller)    {        if (!Caller->IsValid())            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)    {        Audio::PlaySample3D("mod:Audio/FX/Sirens/airhorn.wav", Caller->GetPosition(), false);    }};


#122 Guest_[SAP]Francis_*

Guest_[SAP]Francis_*
  • Guests

Posted 13 October 2009 - 03:57 AM

I don't know what is wrong. I have the exact same script and does the job perfectly..

#123 billyfromhill

billyfromhill

    Battalion Chief

  • Members
  • 766 posts
  • Gender:Male
  • Location:Ohio, USA

Posted 13 October 2009 - 04:06 AM

Same here.

#124 SirMoo

SirMoo

    Captain

  • Members
  • 239 posts
  • Gender:Male
  • Location:Texas <3

Posted 13 October 2009 - 05:38 AM

Mind re uploading your airhorn.wav file.
To make sure I'm getting these steps right... add it to the vehicles in the editor and all is go? Does it need to be positioned at a certian location? :\ I'm not really sure at this point.

#125 Dominic22

Dominic22

    Captain

  • Members
  • 109 posts
  • Gender:Male
  • Location:Ohio
  • Interests:Watching Firefighter movies

Posted 13 October 2009 - 06:15 PM

Well, how would I go about making it follow the vehicle? Like how the siren does.

#126 Guest_[SAP]Francis_*

Guest_[SAP]Francis_*
  • Guests

Posted 13 October 2009 - 10:25 PM

Well, how would I go about making it follow the vehicle? Like how the siren does.

Well that would be by using one of the scripts on the 1st or the 2nd page.

#127 Dominic22

Dominic22

    Captain

  • Members
  • 109 posts
  • Gender:Male
  • Location:Ohio
  • Interests:Watching Firefighter movies

Posted 14 October 2009 - 07:38 PM

None of them are working the way I wanted them to.