Jump to content



Photo

SetGIsEnabled


Best Answer BilboX , 11 July 2015 - 07:39 AM

SetGIsEnabled, as for Solenoids or lamps, is just in debug state and are not working correctly yet.

I suggest you reimplement it yourself if it is not VPM driven and interface using specifics...

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 10 July 2015 - 06:52 PM

Trying to use this method but it only seems to disable the first one in the collection. Game doesn't have any GI slots I'm just putting in my own for effects.

 

This method should go through all and disable?

    public override void InitGIsObjects()
    {
        base.InitGIsObjects();
        string GI = "Bulb";

        for (int i = 1; i < 22; i++)
            {
               GI = GI + i;
               try
               {
                   AddGI(GI, 0);                    
                }
                catch (System.Exception)
                {
                    Debug.LogError("failed adding GI");                    
               }              
            }
    }

Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#2 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 11 July 2015 - 07:39 AM   Best Answer

SetGIsEnabled, as for Solenoids or lamps, is just in debug state and are not working correctly yet.

I suggest you reimplement it yourself if it is not VPM driven and interface using specifics...


UP2


#3 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 11 July 2015 - 10:45 AM

	void CustomGIStringSolenoidCB(int slot, bool b)
		{
		  if(slot == 18)
		  {
			 GameObject.Find("Bulb1").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb2").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb3").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb4").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb5").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb6").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb7").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb8").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb9").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb10").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb11").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb12").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb13").GetComponent<BxBasicLamp>().SetState(b); // normal
			 GameObject.Find("Bulb14").GetComponent<BxBasicLamp>().SetState(b); // normal
			 GameObject.Find("Bulb15").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb16").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb17").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb18").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb19").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb20").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb21").GetComponent<BxBasicLamp>().SetState(!b); // normal
			 GameObject.Find("Bulb22").GetComponent<BxBasicLamp>().SetState(!b); // normal			
		  }
		}

Ok thanks. Good enough this way.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000