WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-26-2009, 07:19 PM
DBurks2818 DBurks2818 is offline
Member
 
Join Date: Feb 2009
Posts: 8
Trouble transitioning from one vizard

...file to another.

Hey all,

I'm having a lot of trouble getting one vizard file to transition to another by way of a button. I was able to get it to work once, but now it will no longer work upon creating a new button and giving it the same functionality. I'm also putting all of this within a different scene from the main one, if that helps.

Code:
import viz
viz.go()
viz.clearcolor(0,0,1)

Next = viz.addButton()

def onButton(obj,state):
    if obj == Prev:
        if state == viz.DOWN:
         vizact.onbuttondown(Next, execfile('Vizard1.py'))
        else:
         Prev.remove()
         MainMenu.remove()
         Nxt.remove()
         Tutorial.remove()
         Previous.remove()
         MainBtn.remove()
         Next.remove()
viz.callback(viz.BUTTON_EVENT,onButton)
And 'Vizard1.py'...

Code:
import viz

viz.go()
viz.clearcolor(0,0,1)

building = viz.add('level1.3ds')
building.setPosition( 0, 0, 10)
building.setScale( 7.5, 7.5, 7.5 )
Why won't this work with the button I've created? Is there another/more efficient way to do this without just putting all of the code in one file and putting the entire destination file into the source file and using scenes?

It would be nice if someone could help me figure this out by Friday, as it's urgent.

Thanks for any help provided.

Last edited by DBurks2818; 04-26-2009 at 07:19 PM. Reason: Needed to fix title.
Reply With Quote
  #2  
Old 04-26-2009, 07:50 PM
DBurks2818 DBurks2818 is offline
Member
 
Join Date: Feb 2009
Posts: 8
Here's my code if it helps (Main file is "GUINewTitle"):

http://rapidshare.de/files/46918311/Linking.rar.html

The button is on the new game screen, "Next."
Reply With Quote
  #3  
Old 04-26-2009, 08:28 PM
DBurks2818 DBurks2818 is offline
Member
 
Join Date: Feb 2009
Posts: 8
Ok, it seems that the problem is that Vizard isn't able to handle the amount of buttons/data in my main file while still being able to load the .3ds file. Is there anyway around this?

Thanks!
Reply With Quote
  #4  
Old 04-28-2009, 02:46 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Why are you trying to open up different Vizard windows? Can't you do this with one Vizard window and multiple scenes?
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 11:13 AM
Vizard tech tip: Text to Speech Jeff Vizard 1 01-15-2009 09:39 PM
McAfee Privacy Service 8.1 causes Vizard not to run mspusch Vizard 2 09-24-2008 05:17 PM
Vizard won't run wouters Vizard 5 02-05-2008 11:12 AM
new vizard user having trouble bhs125 Vizard 1 09-10-2004 02:01 PM


All times are GMT -7. The time now is 05:49 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC