Blender v2.71

So working on a game in BGE, I can switch from main menu scene to game scene but how do I get the character to get near an object and that object switches to a new scene?

I tried using the near sensor and adding property: player > and controller > scene actuator/ mode: set scene/ scene: scene

But every time my character (property player: float) gets near the object nothing happens

  • $\begingroup$ use the "near" brick $\endgroup$ – Scalia Jun 11 '15 at 16:08

The "property" actuator on it's own only senses the value of a property. This is useful if you want to make sure something is at a certain value (i.e. Money = $250--> AND--> buy laptop) but it really has no direct sense of the physical world. The sensors that do are called the physics sensors.

  • Near: senses when a object is within a certain range.

  • Collision: senses if an object is being touched.

  • Radar: works like "Near" but not Omni-directional.

  • Ray: sends an invisible "beam", sense if something touches or obstructs the beam.

As you can probably see, the sensor you want to use is "Near", since it will sense if your player is near a certain object in the game.

Put the sensor on the object that you want to sense the player and set its property value to "player". play with the distance values till you get a result you like, make sure "reset" stay a tad higher than the "distance".

enter image description here

| improve this answer | |
  • $\begingroup$ That's exactly what I did and nothing happened...also didn't use property actuator, I meant the "add game property" : player: float $\endgroup$ – theartinwar Jun 11 '15 at 17:11
  • $\begingroup$ turn on physics visualization to see if everything is working right, also, upload a .blend file, it could help us immensely in finding out your problem. use a service like blend-exchange. $\endgroup$ – Scalia Jun 11 '15 at 17:42
  • $\begingroup$ Can't upload the actual blend file for confidential reasons but the logic is setup the same. <img src="http://blend-exchange.giantcowfilms.com/embedImage.png?bid=264" /> Also I know the distance and reset are probably messed up here, I was playing around with it. pw: blender man $\endgroup$ – theartinwar Jun 11 '15 at 18:06
  • $\begingroup$ okay, very good... see the answer @Chebhou put on this question. $\endgroup$ – Scalia Jun 11 '15 at 19:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.