Jump to content
Guest e34p

Command Icon

Recommended Posts

Guest e34p

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.0

object 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

Link to comment
Share on other sites

Guest e34p

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.

Link to comment
Share on other sites

Guest e34p

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...