Questions tagged [logic-bricks]

Logic bricks are the sensors, controllers, and actuators in the Logic Editor. They are used in the BGE.

Filter by
Sorted by
Tagged with
19
votes
1answer
1k views

How can I make my gear simulation in the BGE work?

I have the movement and rotation restrained properly, but the simulation is not behaving like it should. both objects are rigid body objects. How can I make my gear simulation work?
15
votes
1answer
2k views

How could I place objects (buildings) on a flat surface in the BGE?

I'm working on an RTS in BGE, and I am not sure how I could make it so you can place buildings on flat surfaces (or unless there is an easier way). I would love to know how to place buildings when you ...
13
votes
2answers
11k views

Controlling BGE properties with python script

I would like to know how to change the values of properties added using the "AddGameProperty" option in the game logic UI using python code? I want to write code that changes the 'Property' value in ...
12
votes
2answers
1k views

Making weather effects in the BGE

This type of snowfall looks nice: If that example was made in Blender Internal or Cycles, I'd say particles were used - but particles clearly don't work in the BGE. How can a weather effect such as ...
9
votes
1answer
1k views

Is it possible to snap objects to faces in the Blender Game Engine?

I recently have been experimenting with X-27's excellent answer on how to place objects dynamically in the BGE. I have been trying to figure out how to do the same thing, only make it possible to snap ...
8
votes
1answer
749 views

Making an Interface in blender game engine

I am learning how to make interfaces in the game engine, and I have set up 2 buttons: an exit button and a play button. When one of the buttons receives a left click, it either closes Blender or goes ...
7
votes
3answers
7k views

How to change material's color in blender game engine?

I am making a new racing game in BGE. I want my game to have a feature to change car color in-game (car consists of multiple materials, but currently I want to change body material). How do I make ...
7
votes
1answer
430 views

Why does blender crash when my missile disapears in the BGE?

In the following scene, I have a camera parented to a missile. When the missile collides with any collision mesh, it disappears. The logic setup is pictured below. However, when the missile ...
7
votes
2answers
2k views

Blender game character not responding to game logic

I created a basic male figure and rigged it using the rigify add on. I also created a simple walk animation action. I attempted to turn the rigged model into a game character inside the blender game ...
6
votes
4answers
3k views

How do I make a weapon shoot at the center of the screen?

I've been researching this for weeks and only found bad results. I think its time for a good answer. I have a rocket launcher, so I can't "fake" the bullet. There is no way to fake a rocket. I need it ...
6
votes
5answers
1k views

How to achieve more physically accurate motion in the game engine?

I have a character with a very simple motion control: when I press W the character moves forward, with S they it goes backwards and so on. The problem is that unlike what is possible in the real world,...
6
votes
1answer
5k views

How to play action actuator logic brick via python

I want to know how to play(send true pulse) to an action actuator via script (logic brick with all the settings) since playAction doesn't have animation property which I need.
6
votes
1answer
387 views

Clamp velocity along local axis

In the attached Blend File, I have a representation of a airplane/jet fighter (cube scaled at one end to indicate direction of flight). I am using torque to steer, and adding Linear Velocity along a ...
6
votes
3answers
958 views

Record Animation In BGE

I am having trouble getting the Record Animation setting to work in the BGE. Is it possible to record animated characters that are controlled using BGE's logic bricks with some script? In my script I ...
5
votes
3answers
2k views

How can I spawn a moving object in BGE?

I know how to use the Add Object actuator to add an object while the game is running, but the angular velocity is not affecting the mesh. Is there something else I should have done as well? ...
5
votes
3answers
501 views

How can I activate an actuator if A is false and B is true?

I have two Random sensors on an object. One is triggering the spawning of an object, and the second I would like to use to spawn a second object from the same spawner. The issue is sometimes the spawn ...
5
votes
1answer
1k views

How can I create a realistic space ship click based controls like EVE Online using BGE?

How do I create a realistic space ship controls like EVE Online has using the Blender Game Engine? I'm trying to create a really small space RPG that's like a super-mini-version of (excluding the fact ...
5
votes
2answers
3k views

Manipulate BGE logic bricks through python

Is it (if at all) possible in Blender 2.6+? If not, will future versions of Blender support it? I see some old posts (this and this) saying that it is not possible. However, I found a recent post ...
5
votes
1answer
847 views

How do I toggle an objects visibility in blender game engine?

Its a pretty straight forward question. I have tried using the visibility actuator but has no option for toggle. I have also tried using an animation but it doesn't seem to be working.
5
votes
1answer
696 views

Rotate an object along face normal in the bge

I have an empty that is at the center of the screen, it move to whatever you point at. An explanation on how to do so can be found here. I am looking to have a plane or empty always face outwards ...
5
votes
1answer
120 views

Texture that doesn't get affected by scaling?

I have a simple plane that acts as a health bar in my HUD. I am putting a texture on it, but when the plane scales down the texture also does. How can I have the texture not affected by scaling? ...
5
votes
1answer
860 views

Character Motion in BGE: Hold Two keys at the same time

I am making an FPS in BGE and I am confused on something. Before I upgraded to Blender 2.74 it make it so if you would hold the W and A key at the same time then the character would move both along ...
5
votes
1answer
117 views

Or controller problem in GE

This is a very small question, and there is not much to explain; let me jump into it: I have my character with WSAD controls. When triggering any part of WSAD (using or controller), my animation plays....
5
votes
1answer
963 views

How to make a game autosave and autoload

I need my game to always save all settings and scores, also always load them when running game. And... I want to also save theese objects, which has disappeared from scenes(collected points, boost ups,...
5
votes
1answer
1k views

BGE: How to create a countdown timer without using debug or python?

Is it possible to create a timer in the Blender game engine without using DeBug or python? I can create point systems using dynamic text, but just can't figure out how to create a timer.
5
votes
1answer
538 views

Button over another in the game engine

I have a little red plane above a big green plane: I have set the red plane for one action, and the green plane for another when i click them. But when i click one the red (in the game) that click ...
5
votes
1answer
2k views

Blender game: How can I make a ball roll while moving?

I'm making a game where a robotic ball moves, collects objects and passes obstacles, and my question is : how can I make the ball roll while it is moving ? l'm familiar with how to make collectible ...
5
votes
1answer
204 views

How to make the chacter detect stairs and react to it

I don't know much of python, and I would like to make my character detect the stairs and look down (2 degrees in x axis) when upon it. I've tried using a Near sensor in the stairs (like a beacon) ...
5
votes
0answers
405 views

Animation showing last frame when played?

To make this simple I have a .blend that you can look at. I have simple logic: 1) When the prop "Active" is true, our object is visible. When false, invisible. 2) When Spacebar is hit, "Active" ...
4
votes
4answers
525 views

Animation not responding in time?

Under certain conditions, I need my animation to be played. The rig gets a message every 5 tics and it seems that the animation is being played every 15-20 tics. My animation frame rate is 60, and ...
4
votes
3answers
179 views

How do I hide irelevant game logic?

Unfortunately, I'm a pretty sloppy organizer when it comes to blender. This leaves me with a bunch of "spaghetti" logic all over the place. Is there a way to hide the logic that I'm not using? I tried ...
4
votes
3answers
3k views

Using game property to control actuator values (BGE Logic Bricks)

For example, Is it possible to control a value on a motion actuator by linking it to the value of a set property? For example movement speed that can be changed on the fly by changing the property ...
4
votes
2answers
1k views

How to make a button that changes lamp energy in BGE?

I am creating an options menu for a simple game. I want to make a button that will adjust my lamps energy up or down. I would like both ways, a button that adjust the lamp energy up and a way to ...
4
votes
2answers
702 views

BGE Move Toggle Switch Sensor

How can I create a "Toggle Switch Sensor", so when I press W to move a cube continuously on the Y axis, and S to stop the movement? Can I do it from logic bricks?
4
votes
1answer
591 views

Apply the explode modifier for usage in the game engine

Is it possible to use the animation data generated by the explode modifier for an animation in the game engine? If you start with the object you want to blow up, subdivide it, add a particle system, ...
4
votes
1answer
184 views

Recording number of checkpoints passed

This is my game. My game ends when the character collides with a wall. I need to be able to count how many times the character passes by a wall (under or over). I do not want to count how many times ...
4
votes
4answers
1k views

BGE: Send single pulse at start of game?

I want to run a python script, once at the start of a game in the BGE. I tried various sensors, but they all sent more then one pulse/contentious stream. I only wan't to run my script once, right at ...
4
votes
2answers
745 views

Blender collision sensor is triggered twice

I have this script with the module collision which is called when the player collides with any of two cylinders in the scene, the module increments the counter in a ...
4
votes
1answer
901 views

Button Cooldown Timer

I am making a game and I want to have the player travel forward and high speeds (turbo) when the player presses E but I want there to be a cooldown timer so you can't rapidly press E and go way too ...
4
votes
2answers
400 views

“Start” and “exit” buttons are not working properly in blender game

Screen 1 When I hover over and click the exit button it works, but when I am doing the same thing with the start button it shows an error: ...
4
votes
2answers
288 views

Absolute Value in BGE

I have an Game Property called Speed (it is an Integer). I want to use that property to display the speed that my vehicle is going on a speedometer. When the vehicle is going in reverse, the speed ...
4
votes
1answer
1k views

Dynamically assign a value to game property

I am trying to make a weapon sight Dynamically scale depending on how far away the target is.                                    Desired effect However right now it does not scale. the sight stays ...
4
votes
1answer
453 views

How do I invert this timer in BGE to make it count-down?

This is from an answer I received here: timer I suggest to avoid this method to measure time. The BGE will try to keep the given frame rate as much as possible, but there is no guaranty. I ...
4
votes
1answer
309 views

how to damage copies of 1 enemy with

I have trouble with damaging system. I have made a damage system using property(animation property to damage at specific frame) and ray detecting "dmg" property connected to enemy object hp removal ...
4
votes
1answer
465 views

Is it possible to have a property sensor detect a value higher or lower than a specific number?

Right now I have a simple logic setup (image below) to make the armor points of my tank go down and disappear when it gets hit by 25 objects with the bullet property. When it gets hit by 7 objects ...
4
votes
1answer
2k views

How to pause the BGE and then resume

With the logic setup below I'm trying to pause the game, then on any key stroke resume where it was paused. Trouble is when the BGE is Paused it seemingly can't listen for any input. click image for ...
4
votes
1answer
2k views

Where is the Touch Sensor in 2.7x?

In the Logic editor in Blender 2.7x I can't find the Touch sensor. Where is it? Or how duplicate it's function to detect anything.
4
votes
1answer
497 views

Get day and time in python and assign that value to BGE property

I am trying to make a realistic day/night/season simulator for a BGE project. the lighting and sky will be animated based on the time of day, and the ground will have 365 frames - animated between ...
4
votes
1answer
247 views

Allow ray to see through properties?

Here is my code: ...
4
votes
1answer
647 views

BGE: How can I make a hostile animal artificial intelligence?

In the blender game engine, how do I make an animal change it's condition from walking to attacking when it sees the player?

1
2 3 4 5
8