Old 05-29-2009, 05:44 PM   #1 (permalink)
Jr. Member
 
xCyberFang's Avatar
 
Join Date: Apr 2008
Posts: 449
xCyberFang will become famous soon enough
Send a message via AIM to xCyberFang Send a message via MSN to xCyberFang Send a message via Yahoo to xCyberFang
Default How can i detect if the held switch is locked?

i know that it involves IsActive, but when i try to use it it gives me this error.

Quote:
The name 'isActive' does not exist in the current context

is there any other way of retrieving if the held is on or not?
__________________






xCyberFang is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old 05-29-2009, 10:47 PM   #2 (permalink)
Zuner
 
badmoodguy88's Avatar
 
Join Date: Jun 2008
Posts: 72
badmoodguy88 is on a distinguished road
Default

Game.IsActive is the hold switch
http://www.zuneboards.com/forums/dev...e-mapping.html
http://www.zuneboards.com/forums/dev...e-buttons.html

I say this but I could not actually get it to work. IsActive is a bool that is false when the game is not active. Game.IsActive Property is a public property of Game.

Last edited by badmoodguy88; 05-29-2009 at 11:04 PM.



badmoodguy88 is offline   Reply With Quote
Old 05-30-2009, 01:30 PM   #3 (permalink)
Jr. Member
 
xCyberFang's Avatar
 
Join Date: Apr 2008
Posts: 449
xCyberFang will become famous soon enough
Send a message via AIM to xCyberFang Send a message via MSN to xCyberFang Send a message via Yahoo to xCyberFang
Default

thank you badmoodguy, but that is not what im looking for, im not looking for a description on how it works, i do know how it works, i just need to know how to MAKE it work.
__________________






xCyberFang is offline   Reply With Quote
Old 06-01-2009, 01:05 PM   #4 (permalink)
zB Programmer
Member
 
DiNoGames's Avatar
 
Join Date: May 2008
Location: Bremen, germany
Posts: 579
DiNoGames is a name known to allDiNoGames is a name known to allDiNoGames is a name known to allDiNoGames is a name known to all
Send a message via Skype™ to DiNoGames
Default

Why does it not work?
If you have problems with your code then please paste the part of code here.

It should work that if you put the following e.g. in your game.update method.

if (IsActive)
{
// do what you want to do when the holdswitch is not set
}
else
{
// do what you want to do when the holdswitch is set
}
__________________

Valgard's Fate Blog







DiNoGames is offline   Reply With Quote
Old 06-02-2009, 10:01 AM   #5 (permalink)
Jr. Member
 
xCyberFang's Avatar
 
Join Date: Apr 2008
Posts: 449
xCyberFang will become famous soon enough
Send a message via AIM to xCyberFang Send a message via MSN to xCyberFang Send a message via Yahoo to xCyberFang
Default

oh thats probably why, i put it in the game update, and it worked fine. thanks dino games, you rock!
__________________






xCyberFang is offline   Reply With Quote
Reply

Bookmarks

Thread Tools