![]() |
|
#1
|
|||
|
|||
You can modify a variable within a function by using the global keyword. Here pressing the spacebar modifies a variable and then prints it.
Code:
import viz import vizact viz.go() var = 1 def addTwo(): global var var += 2 print var vizact.onkeydown(' ',addTwo) |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple Textures for Diffuse and Specularity Shader Issue | shivanangel | Vizard | 1 | 05-11-2009 10:44 AM |