WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-13-2011, 03:33 AM
IOEPsych IOEPsych is offline
Member
 
Join Date: Apr 2011
Posts: 2
how do I put two exits in a maze?

I have designed a Vizard maze with an 'exit' that when you move into this area of the maze you hear a 'yipee' sound and the programme closes. I now need to be able to have the option to have two separate exits (so that the maze can be solved in two ways) but I cannot seem to do this as when I put another 'E' into my text file ('E' = END) then the programme opens but doesn't run properly. Any thoughts!???

This bit of my script looks like this:

def allTimers(event):

if (event == LOG_POSITION):
logPosition()
if (event == JOYSTICK_MOVE):
doMove()
if (event == CHECK_KEYBOARD):
checkKeyboard()
if (event == CHECK_END):
checkIfAtEnd()
if (event == STOP):
viz.quit()

def checkIfAtEnd():
''' Checks if the current position is in the end square of the maze.
'''
global endPos
pos = viz.MainView.getPosition()
euler = viz.MainView.getEuler()
lowEndX = endPos[0]*mazeExptParams.XSCALE
highEndX = (endPos[0]+1)*mazeExptParams.XSCALE
lowEndY = endPos[1]*mazeExptParams.YSCALE
highEndY = (endPos[1]+1)*mazeExptParams.YSCALE
x = pos[0]
y = pos[2]

if (x >= lowEndX and x <= highEndX) and (y >= lowEndY and y <= highEndY):
viz.playsound('yipee.wav')
viz.killtimer(CHECK_END)
viz.starttimer(STOP, 2)
Reply With Quote
 

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
building a maze GoldenSun Vizard 3 06-04-2008 10:27 AM


All times are GMT -7. The time now is 01:37 PM.


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