Guest Dakati Posted October 17, 2009 Report Share Posted October 17, 2009 Hi,I Have a little problem.I've made a new script fr a command, put it in the right map etc.When i go to the Editor to Add the command, it is'nt in the left list.So, id do Assign new command SireneOnI Leave the editor andt test the mod, but the command just is'nt there?const char SIRENE_ON[] = "VcmdSireneOn";const char SIRENE_OFF[] = "VcmdSireneOff";object SireneOn : CommandScript{ VcmdSireneOn() { SetIcon("lighton"); SetCursor("lighton"); SetGroupID(DummyGroup); SetGroupLeader(true); SetRestrictions(RESTRICT_SELFEXECUTE); } bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; if (Caller->GetType() == ACTOR_VEHICLE) { return true; } return false; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if (!Caller->IsValid() || !Target->IsValid() || Target->GetID() != Caller->GetID()) return false; if (Caller->GetType() == ACTOR_VEHICLE) { return true; } return true; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Vehicle v(Caller); v.EnableBlueLights(true); v.AssignCommand(SIRENE_OFF); v.RemoveCommand(SIRENE_ON); }};object SireneOff : CommandScript{ VcmdSireneOff() { SetIcon("lightoff"); SetCursor("lightoff"); SetGroupID(DummyGroup); SetGroupLeader(true); SetRestrictions(RESTRICT_SELFEXECUTE); } bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; if (Caller->GetType() == ACTOR_VEHICLE) { return true; } return false; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if (!Caller->IsValid() || !Target->IsValid() || Target->GetID() != Caller->GetID()) return false; if (Caller->GetType() == ACTOR_VEHICLE) { return true; } return true; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Vehicle v(Caller); v.EnableBlueLights(false); v.AssignCommand(SIRENE_ON); v.RemoveCommand(SIRENE_OFF); } };Thanks! Quote Link to comment Share on other sites More sharing options...
LACityFFengineCo287 Posted October 17, 2009 Report Share Posted October 17, 2009 Hm... Have you saved it in the editor? Just asking, because I did the same thing once. And did you make sure it was a script done in 1. Wordpad, 2. It was saved as a .script file in your script file? Just make sure you have both of those, then i'll start looking into other possibilities too. Quote Link to comment Share on other sites More sharing options...