Jump to content



Photo
* * * * * 1 votes

question regarding toggling ramp visible/collidable in vp 10


  • Please log in to reply
10 replies to this topic

#1 lodger

lodger

    Board Certified Funk Master

  • Members
  • PipPipPipPip
  • 993 posts
  • Location:Altoona Pennsylvania

  • Flag: United States of America

  • Favorite Pinball: Whirlwind, TAF

Contributor

Posted 14 May 2015 - 11:45 AM

Hi all,

 

I'm trying to figure out how to do a raising/lowering ramp a la Whirlwind or The Walking Dead in VP 10. I am trying to do this with a total of 4 ramps, toggling visibility and collidability as a counter increases and decreases. I have not been able to get .visible=true and .collidable=true to toggle for the ramps you can't see. See Below for my code, a picture of the ramp im trying to get to work

 

http://vpforums.org/.../71/5-12-15.png

 

sub rrampdown()
rampcounter=4
rightramp4.visible=true
ramptimerdown.enabled=true
playsound "fx_solenoid"
end sub

Sub ramptimerdown_Timer()
rightrampnull
select case rampcounter
case 1
rightramp1.visible=true
rightramp1.collidable=true
ramptimerdown.enabled=false
case 2
rightramp2.visible=true
rightramp2.collidable=true
rampcounter=1
case 3
rightramp3.visible=true
rightramp3.collidable=true
rampcounter=2
case 4
rightramp4.visible=true
rightramp4.collidable=true
rampcounter=3
end select    
End Sub

sub rightrampnull()
rightramp1.visible=false
rightramp2.visible=false
rightramp3.visible=false
rightramp4.visible=false
rightramp1.Collidable=false
rightramp2.Collidable=false
rightramp3.Collidable=false
rightramp4.Collidable=false
end sub


berzerk2_0logo.png

http://www.vpforums....&showfile=11819

Version 2.0- Released 2/27/16


#2 hmueck

hmueck

    MaX

  • VIP
  • 2,190 posts
  • Location:Hamburg

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

  • Favorite Pinball: IPDB Top 300



Contributor

Posted 14 May 2015 - 01:01 PM

I tried it too and it looks like a bug. ramp.visible does nothing.
VPX0beta tables: 29cff786951ed9c1a70fc1fa47f5e3c1.png 0cecd68ffa2537a7262337834a05bbbe.png Finish them if you like!

#3 kiwi

kiwi

    Pinball Fan

  • VIP
  • 2,683 posts

  • Flag: Italy

  • Favorite Pinball: Star Trek 25th Anniversary



Posted 15 May 2015 - 05:05 AM

I have not tried your code, but I know that the "Visible" box must be unchecked (Panel property), the same thing probably for Collidable box, unchecked.

So it should work.

 

Max



#4 freneticamnesic

freneticamnesic

    A Faint Ghost Through the Raindrops

  • VIP
  • 3,370 posts
  • Location:Portland, OR

  • Flag: United States of America

  • Favorite Pinball: Star Trek, Black Hole, AFM, Fast Draw, Tron, AMH

  • 360 Gamer Tag: sixgunsounddd

Posted 15 May 2015 - 05:13 AM

Kiwi, not true - I have ramps set to visible in the editor that I can toggle. I ran into this issue on a few of my tables. You need to assign a material with the checkbox for "active" checked under opacity in the materials manager



#5 kiwi

kiwi

    Pinball Fan

  • VIP
  • 2,683 posts

  • Flag: Italy

  • Favorite Pinball: Star Trek 25th Anniversary



Posted 15 May 2015 - 05:38 AM

Kiwi, not true - I have ramps set to visible in the editor that I can toggle. I ran into this issue on a few of my tables. You need to assign a material with the checkbox for "active" checked under opacity in the materials manager

Right, I forgot the opacity.

 

 
However, I have the Tri Zone rails with Visible box unchecked, if selected the rails are always visible (Dt-Fs rotation).

 

Max



#6 freneticamnesic

freneticamnesic

    A Faint Ghost Through the Raindrops

  • VIP
  • 3,370 posts
  • Location:Portland, OR

  • Flag: United States of America

  • Favorite Pinball: Star Trek, Black Hole, AFM, Fast Draw, Tron, AMH

  • 360 Gamer Tag: sixgunsounddd

Posted 15 May 2015 - 06:20 AM

bodydump said there was a bug between fs and dt rotation for ramp visibility - it would toggle on/off for desktop mode but was always on for fullscreen mode. After I started using the opacity active checkbox I haven't seen any issues



#7 lodger

lodger

    Board Certified Funk Master

  • Members
  • PipPipPipPip
  • 993 posts
  • Location:Altoona Pennsylvania

  • Flag: United States of America

  • Favorite Pinball: Whirlwind, TAF

Contributor

Posted 15 May 2015 - 10:54 PM

I just tried this with both desktop and fs, the collide option is working as it should, but i'm not able to toggle .visible. Let me know if you have any thoughts, etc on how i might work around this. I'll post the current build- any feedback would be appreciated (pardon the junk on the sides, its a wip if ever there was one)


berzerk2_0logo.png

http://www.vpforums....&showfile=11819

Version 2.0- Released 2/27/16


#8 freneticamnesic

freneticamnesic

    A Faint Ghost Through the Raindrops

  • VIP
  • 3,370 posts
  • Location:Portland, OR

  • Flag: United States of America

  • Favorite Pinball: Star Trek, Black Hole, AFM, Fast Draw, Tron, AMH

  • 360 Gamer Tag: sixgunsounddd

Posted 15 May 2015 - 11:50 PM

Did you adjust the material?



#9 lodger

lodger

    Board Certified Funk Master

  • Members
  • PipPipPipPip
  • 993 posts
  • Location:Altoona Pennsylvania

  • Flag: United States of America

  • Favorite Pinball: Whirlwind, TAF

Contributor

Posted 16 May 2015 - 03:19 AM

I just checked- materials were intact, visible turned on. I'll post my file a bit later (requires ultra DMD )


berzerk2_0logo.png

http://www.vpforums....&showfile=11819

Version 2.0- Released 2/27/16


#10 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,153 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 16 May 2015 - 03:31 AM

Fren to the rescue.  It works.  If your ramp is using the Metal material.  Modify the Metal material so Active is checked and Opacity is set to 1.

 

Then in the script 

ramp1.visible = True or False works



#11 lodger

lodger

    Board Certified Funk Master

  • Members
  • PipPipPipPip
  • 993 posts
  • Location:Altoona Pennsylvania

  • Flag: United States of America

  • Favorite Pinball: Whirlwind, TAF

Contributor

Posted 16 May 2015 - 11:55 AM

I misunderstood what you meant with the materials- thanks fren for explaining and joe for clarifying. my ramp is now toggling! :D


berzerk2_0logo.png

http://www.vpforums....&showfile=11819

Version 2.0- Released 2/27/16