WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What does var do?

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie
View previous topic :: View next topic  
Author Message
randomguy9900



Joined: 27 Aug 2008
Posts: 3

Digg It
PostPosted: Thu Aug 28, 2008 1:00 pm    Post subject: What does var do?

How do you use the var. thing? I've always wondered what it does and how you use it. And also can you make it so if you press something, something stays on? instead of only if you hold it? And one more thing, is there a place with a bunch of tutorials about stuff like that and how to use it?
Back to top
View user's profile Send private message
jjcomet



Joined: 23 Apr 2007
Posts: 87

Digg It
PostPosted: Mon Oct 27, 2008 2:12 pm    Post subject: var thing?

don't know if you had a reply yet

var is a memory location where a user can store a value, which is dynamic and therefore 'variable'

var.foo=false
if wiimote.2=true then
var.foo=true else var.foo=false
debug=var.foo
endif


Q. when is var.foo true?

check out the documentation for tips and definitions; also run some of the bundled scripts, mess with them, break them, fix them....
it's the only way (besides this excellent forum)
Brendan
Back to top
View user's profile Send private message
MoreDread



Joined: 30 Oct 2008
Posts: 17

Digg It
PostPosted: Fri Oct 31, 2008 1:07 pm    Post subject:

if you wanna use it to make a key stay pressed you can do it like this


Code:

if wiimote.A
   if var.Apressed = false
        var.Apressed = true
    endif
endif

   if var.Apressed = true && wiimote.B
        var.Apressed = false
    endif

key.up = var.Apressed

debug = "var = " + var.Apressed


this code will toggle the up key on by pressing the A.Button and off with the B button
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group