Jump to content



Photo
- - - - -

Setting Wall Visibility in VBS


  • Please log in to reply
7 replies to this topic

#1 Two

Two

    Hobbyist

  • Members
  • PipPip
  • 11 posts

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

  • Favorite Pinball: Star Trek

Posted 23 May 2025 - 12:57 AM

Hi,

 

Can you change a wall's visibility dynamically in the game's VB script?

 

For example:

 

sub setWallVisible(wall,vis)

  wall.Visible=vis

  wall,SideVisible=vis

end sub

 

Here's what I've found.  If I call this function for my walls from at the "script level" (that is, when the game parses the script) then walls can be made to appear or disappear depending on vis=1 or vis=0.  However, if I call this function during game play, the walls don't change their visibility.

 

Is this expected?  I'd understand not being able to change visibility dynamically, but that one case where I can is weird.

 

Thanks!



#2 jpsalas

jpsalas

    Grand Schtroumpf

  • VIP
  • 7,171 posts
  • Location:I'm Spanish, but I live in Oslo (Norway)

  • Flag: Norway

  • Favorite Pinball: I like both new and old, but I guess I prefer modern tables with some rules and goals to achieve.



Posted 23 May 2025 - 04:36 AM

Yes, the walls can be set visible or not. And there two ways to do that:

 

1.- Using the commands: Wall001.Visible = 0: Wall001.SideVisible = 0, and to make it visible again: Wall001.Visible = 1: Wall001.SideVisible = 1

Now, this requires that the material of the wall has its transparency checked, like in the picture:

 

dynamicmaterial_t.png

 

The wall will still be collidable. If you want it to do not be collidable you need to add this command: Wall001.Collideable = 0

 

Now there is another way with walls to make them visible or not and collidable or not all in one command:

 

2.- Using the command Wall001.IsDropped = 1 and Wall001.IsDropped = 0

This is what we used to make drop targets a looong time ago :)

The only thing you need to do is to set the Can Drop property.

 

candropproperty_t.png

 

Now the wall will go up and down, being invisible and non collidable. The only problem is that the top of wall will still be visible, because that's how a drop target worked. So, if you want the top be invisible when the wall is dropped then you need to select another property in the Visual tab of of the wall: Flipbook 

 

flipbookproperty_t.png

 

To me the Wall001.IsDropped = 1 and Wall001.IsDropped = 0 are the easiest to use.


Edited by jpsalas, 23 May 2025 - 04:37 AM.

If you want to check my latest uploads then click on the image below:

 

vp.jpg

 

WIP? Cobra, Nuova Bell and Playbar tables, thanks to akiles50000 redrawings


#3 kiwi

kiwi

    Pinball Fan

  • VIP
  • 2,627 posts

  • Flag: Italy

  • Favorite Pinball: Star Trek 25th Anniversary



Posted 23 May 2025 - 06:58 AM

With the drop method you can use a negative value for the bottom height, like -1,

so when it drops the wall goes under the playfield.



#4 Itchigo

Itchigo

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,706 posts
  • Location:Chicago, Illinois

  • Flag: United States of America

  • Favorite Pinball: All




  • Trophies:

Posted 23 May 2025 - 12:52 PM

Since this is a wall related question, I'll add it here.

 

Is there a master list of materials, or is everyone just adding as they go? I noticed JP's material list was much more than a stock table.


Founder of Rogue Pinball! https://roguepinball.com/index.php                 Making Pinball great again!!

 

partylikeits1776-.jpg


#5 Two

Two

    Hobbyist

  • Members
  • PipPip
  • 11 posts

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

  • Favorite Pinball: Star Trek

Posted 23 May 2025 - 02:58 PM

Thank you for the responses!  Both tricks are very useful to know.  Much appreciation to all!



#6 jpsalas

jpsalas

    Grand Schtroumpf

  • VIP
  • 7,171 posts
  • Location:I'm Spanish, but I live in Oslo (Norway)

  • Flag: Norway

  • Favorite Pinball: I like both new and old, but I guess I prefer modern tables with some rules and goals to achieve.



Posted 23 May 2025 - 07:43 PM

Since this is a wall related question, I'll add it here.

 

Is there a master list of materials, or is everyone just adding as they go? I noticed JP's material list was much more than a stock table.

 

I made myself the materials list I use in my tables. I add more material as I need them, and I usually save them so I always have the latest list of materials for newer tables. I do not use all the materials in a table, usually just a few, but they are good to have is I should need any of them. Mostly they are different colors of plastics and rubbers, and the metal ones are mostly different kind of hard semi transparent plastics, and of course chrome metals for the wire ramps and similar objects. The top of my list consist of the physical materials, which I assign to all the objects that the ball may hit, plastic, rubbers, metals, wood. For example, I have a material called "Invisible", and I use that to make a target invisible in case that I need a custom target which do not exist in VPX. I make the target invisible using this material, then I can sync the movement of the target with the primitive with the new shape. And you may ask, why don't you make the target invisible in the properties window? Well, because the target will become automatically non collidable and I want the ball to hit the target :)


Edited by jpsalas, 23 May 2025 - 07:48 PM.

If you want to check my latest uploads then click on the image below:

 

vp.jpg

 

WIP? Cobra, Nuova Bell and Playbar tables, thanks to akiles50000 redrawings


#7 Itchigo

Itchigo

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,706 posts
  • Location:Chicago, Illinois

  • Flag: United States of America

  • Favorite Pinball: All




  • Trophies:

Posted 24 May 2025 - 05:11 AM

 

Since this is a wall related question, I'll add it here.

 

Is there a master list of materials, or is everyone just adding as they go? I noticed JP's material list was much more than a stock table.

 

I made myself the materials list I use in my tables. I add more material as I need them, and I usually save them so I always have the latest list of materials for newer tables. I do not use all the materials in a table, usually just a few, but they are good to have is I should need any of them. Mostly they are different colors of plastics and rubbers, and the metal ones are mostly different kind of hard semi transparent plastics, and of course chrome metals for the wire ramps and similar objects. The top of my list consist of the physical materials, which I assign to all the objects that the ball may hit, plastic, rubbers, metals, wood. For example, I have a material called "Invisible", and I use that to make a target invisible in case that I need a custom target which do not exist in VPX. I make the target invisible using this material, then I can sync the movement of the target with the primitive with the new shape. And you may ask, why don't you make the target invisible in the properties window? Well, because the target will become automatically non collidable and I want the ball to hit the target :)

 

Ahh, so after playing with this a little, the material is just settings from what I saw on your image. You're not using an image to make the material, right?


Founder of Rogue Pinball! https://roguepinball.com/index.php                 Making Pinball great again!!

 

partylikeits1776-.jpg


#8 jpsalas

jpsalas

    Grand Schtroumpf

  • VIP
  • 7,171 posts
  • Location:I'm Spanish, but I live in Oslo (Norway)

  • Flag: Norway

  • Favorite Pinball: I like both new and old, but I guess I prefer modern tables with some rules and goals to achieve.



Posted 24 May 2025 - 08:03 AM



 



 



Since this is a wall related question, I'll add it here.

 

Is there a master list of materials, or is everyone just adding as they go? I noticed JP's material list was much more than a stock table.

 

I made myself the materials list I use in my tables. I add more material as I need them, and I usually save them so I always have the latest list of materials for newer tables. I do not use all the materials in a table, usually just a few, but they are good to have is I should need any of them. Mostly they are different colors of plastics and rubbers, and the metal ones are mostly different kind of hard semi transparent plastics, and of course chrome metals for the wire ramps and similar objects. The top of my list consist of the physical materials, which I assign to all the objects that the ball may hit, plastic, rubbers, metals, wood. For example, I have a material called "Invisible", and I use that to make a target invisible in case that I need a custom target which do not exist in VPX. I make the target invisible using this material, then I can sync the movement of the target with the primitive with the new shape. And you may ask, why don't you make the target invisible in the properties window? Well, because the target will become automatically non collidable and I want the ball to hit the target :)

 

Ahh, so after playing with this a little, the material is just settings from what I saw on your image. You're not using an image to make the material, right?

 

 

Yes, that's right. There a just a few materials that are meant to be used with an image:

 

Plastic, Plastic Dynamic, and their dark versions: I use that for all the plastics and targets that use an image. The Dynamic version has its transparency set to 0.9999 which makes the object not really transparent, but I use it is the lights needs to shine through, or the object is movable.

 

And other material that I use with an image is Toys and Toys Dynamic: It is the same as Plastic but it has a little more reflections, used mostly on primitives which are not flat, like a Smurf toy or an UFO.

 

All the other materials don't need an image.

 

Sometimes if I need to give a special color to an object, like the side walls on some cabinets, then I use the Plastic material and I cut a 32x32 image with the color I need. This is because the Plastic material doesn't change the images, and does not add any color or shade to them. I do this because sometimes it is not easy to get the right color using only a material.

 

The Metal materials work together with the environment image. In my tables I use an environment image called JPS_EnvBalanced, which I made by combining different environment images, to give the metals a really shiny metal look and get a balance in the shadows. Only one of tables uses an image with more shadows, this is the Serious Sam table, since the totem images don't look good with the normal one I use, and they need a little more shadows. To these idols I use a metal material to get some shadows on them, but with a lower Shinnies, and a simply stone wall image to give those idols a stone color. The Shinnies in the metal materials is used to blend more or less the environment image.

 

Here it is an image for comparison between the two environment images:

idols_t.png

 

that was a little info about materials :)


Edited by jpsalas, 24 May 2025 - 08:24 AM.

If you want to check my latest uploads then click on the image below:

 

vp.jpg

 

WIP? Cobra, Nuova Bell and Playbar tables, thanks to akiles50000 redrawings