Hi all, I know I've been posting a lot and I hope I'm not annoying, but I think I'm having a problem again. I have this code:
If KeyHit(35)=True And helm=1 Then
helm=0
EndIf
If KeyHit(35)=True And helm=0 Then
helm=1
EndIf
If helm=1 Then
ShowEntity helmet
Else
HideEntity helmet
EndIf
in my main "while" loop. But it only works once. The game starts with the helmet on, but then if you press "H", it goes off, like it should. But if you press "H" again to put it on, nothing happens.. I put this code before my Update world / Render world, and after it, but it doesn't seem like it's registering the variable change. Help? Thanks (:
EDIT: I just put some debug text on the screen to track the variable "helm" and once you press "H", and it switches to 0, then if you press it again, it doesnt go back to 1. So the show/hide entity isnt the problem. It's 'helm" updating (or lack thereof)
|