WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-18-2008, 10:43 AM
TrashcanPatrol TrashcanPatrol is offline
Member
 
Join Date: Aug 2008
Posts: 43
Two definitions?

Hello, I am wondering how one can get something like this to work... there's a dropdown list, and when the player selects an item from the dropdown and clicks on an avatar, he 'uses' it on that avatar. I've been having a bit of trouble with this, as I'm using a code similar to this:

Code:
def onList(e):
	if e.object == DropDown and e.newSel == 4 and button == viz.MOUSEBUTTON_LEFT:
	viz.message('You beat the game!')
(Also, should it be 'e.oldSel'?)

Or something like that.
My problem is that I can't get it so that once the player selects something from the list, that he/she can USE it on the enviroment/on avatars. I can get it to print anything if the player selects something from the dropdown, but in order to use in collaboration with the left click, I'd need a different definition for it (i.e. if something is selected and the player clicks with it, then x action happens). Is this the only way to accomplish this, or do you advise something else?
Reply With Quote
 


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


All times are GMT -7. The time now is 03:04 AM.


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