Guest e34p Posted June 8, 2013 Report Share Posted June 8, 2013 Hi all.I'm trying to get the Icon for this script (see spoiler) to work. However, in game, no matter what I do it still appears as the red cross (indicating no icon).Does anyone know what is missing from this?// ##// ## Winterberger 4 Scripting// ## Version 6.0// ##// ## Script Belichting(Umfeld)// ##// ## Release 07.07.2008// ##// ## created by WitchDoctor// Hier muss der Name(!) des Bildes aus dem UI-Ordner stehen.const char IMG[] = "use";const char DUMMY_HASBELICHTING[] = "DUMMYHasBelichting";int DummyGroup = 20;// 1.0object Lockers : CommandScript{VCmdLockers(){SetIcon("IMG");SetCursor("IMG");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);if (v.HasCommand(DUMMY_HASBELICHTING)){v.SetChildEnabled("NSF1", false);v.SetChildEnabled("NSF2", false);v.SetChildEnabled("NSM", false);v.SetChildEnabled("NSR1", false);v.SetChildEnabled("NSR2", false);v.SetChildEnabled("Pump1", false);v.SetChildEnabled("Pump2", false);v.SetChildEnabled("Pump3", false);v.SetChildEnabled("Pump4", false);v.SetChildEnabled("OSF1", false);v.SetChildEnabled("OSF2", false);v.SetChildEnabled("OSM", false);v.SetChildEnabled("OSR1", false);v.SetChildEnabled("OSR2", false);v.SetChildEnabled("invis4", false);v.SetChildEnabled("invis5", false);v.RemoveCommand(DUMMY_HASBELICHTING);} else if (!v.HasCommand(DUMMY_HASBELICHTING)){v.SetChildEnabled("NSF1", true);v.SetChildEnabled("NSF2", true);v.SetChildEnabled("NSM", true);v.SetChildEnabled("NSR1", true);v.SetChildEnabled("NSR2", true);v.SetChildEnabled("Pump1", true);v.SetChildEnabled("Pump2", true);v.SetChildEnabled("Pump3", true);v.SetChildEnabled("Pump4", true);v.SetChildEnabled("OSF1", true);v.SetChildEnabled("OSF2", true);v.SetChildEnabled("OSM", true);v.SetChildEnabled("OSR1", true);v.SetChildEnabled("OSR2", true);v.SetChildEnabled("invis4", true);v.SetChildEnabled("invis5", true);v.AssignCommand(DUMMY_HASBELICHTING);}}};E34P Quote Link to comment Share on other sites More sharing options...
cops Posted June 8, 2013 Report Share Posted June 8, 2013 here is your problem VCmdLockers(){SetIcon("IMG");SetCursor("IMG");SetRestrictions(RESTRICT_SELFEXECUTE);}Did you named your icons as IMG ?Cause the IMG indicate what kind of command icon it has to look for Quote Link to comment Share on other sites More sharing options...
Guest e34p Posted June 8, 2013 Report Share Posted June 8, 2013 Yes, I've tried changing that to "use" (for example) and it still appears as the red cross.I was wondering that it might have something to do with: // Hier muss der Name(!) des Bildes aus dem UI-Ordner stehen.const char IMG[] = "use"; However, the "use" in that doesn't change it in the game either. Quote Link to comment Share on other sites More sharing options...
Guest e34p Posted June 8, 2013 Report Share Posted June 8, 2013 Sorry for the double post.I figured it out.Had to remove the VCmd from:VCmdLockers(){SetIcon("IMG");SetCursor("IMG");SetRestrictions(RESTRICT_SELFEXECUTE);}Thanks for your help. Quote Link to comment Share on other sites More sharing options...