need very basic logic-block example to toggle visibility on / off

I know other examples exist - but I am still struggling with my first attempt at structuring logic blocks to allow the spacebar to toggle visibility on / off for a cube in the game engine. Please be fairly specific in your advice as I am VERY new to this - thanks for your patience. We were all noobs at some point. :o

Wrong Forum. Shall this be moved.

Though concerning your Problem: Set Logic Bricks:
KEYBOARD > AND > VISIBILITY Actuator.

That is, at least, the most simple Setup for about what you need.

Thank you for a quick reply.
Apologize. Which forum should it be in?

I hooked a “keyboard” (key = i) sensor to “and” controller to “visibility” actuator.

Sorry to be so clueless but pressed “i” and nothing happened.

You put it in the work in progress section which is meant for showing off your games progress, what this should be in is Game Engine Support and Discussion which is for if you need help on anything bge related


Here you have some Logic. Don’t forget to set the Boolean Property that I called [vis].

Thank you very much C.A.ligári - worked the first time!
I would enjoy a short description of the logic at some point.

Thank you so very much!

How do I move the thread, or get it moved?

Cha gotta wait for a Moderator to stumble across and move it.

The Logic is simple: The Object has the Property »vis«, at start up True. When you press Space, as defined by the Keyboard Sensor, one of two Controllers, leading to either Visible-check or Visible-uncheck, gets linked. But there also are two Property Sensors. One looks for [vis] being True, one looks for [vis] being False. While the Keyboard Sensor is linked to both AND-Controllers, each Controller is linked to one of the two Property Sensors. This will result in the Controller understanding:

IF Spacebar AND Property [vis]=True

or

IF Spacebar AND Property [vis]=True
.

But the Controllers do not only lead to Visibility Actuators but also to Property Actuators.
So in Case the Cube is made invisible, it’s Property [vis] is set to False at the same Time, and the other Way 'round.

I also tried using the Actuator Sensor instead of setting up and changing that Property, but it did not work for me. Maybe it would not work at all, maybe I just did it wrong, but what you have works. ;}

… though, I gotta say: Looking at these Bricks is way easier than describing them! x}