WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Trouble transitioning from one vizard (https://forum.worldviz.com/showthread.php?t=1985)

DBurks2818 04-26-2009 07:19 PM

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.

DBurks2818 04-26-2009 07:50 PM

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

DBurks2818 04-26-2009 08:28 PM

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!

Jeff 04-28-2009 02:46 PM

Why are you trying to open up different Vizard windows? Can't you do this with one Vizard window and multiple scenes?


All times are GMT -7. The time now is 11:00 PM.

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