UPBGE 0.3 - Feature request: allow collision logic bricks to detect if a property is True or False #1451
Replies: 3 comments
-
I move this thread to discussions as it is a feature requerst and not a bug report. |
Beta Was this translation helpful? Give feedback.
-
This is very similar to the features than you can achieve with collision groups and collision masks. |
Beta Was this translation helpful? Give feedback.
-
Thanks guys, and sorry about posting on the wrong place. Collision groups/masks would work well if you want to control the collision detections by using different objects and managing their collision "layers". But in this case what we would want is the ability to use a single colliding object to achieve different results upon collision, depending on which of its properties is active. An example Im working on: the player has a sword. He has two attacks, A and B. When he swings with attack A, the "A" property on the sword object is turned True ("B" is false). The enemy has a collision box, with two collision sensors, one triggered by "A" and another triggered by "B". When the sword collides with the enemy collision box, the collision sensor "A" is activated. The same process if in the next turn he attacks with B. This mecanichs would be possible if the collision sensor was able to ignore properties that are False, while currently it wont, so when the sword hits the collision box, I believe the first collision sensor on the stack is activated every time. Im sure there are other ways to achieve the same result, with code or other brick solutions, but I thought it would be nice to be able to do this using only the collision sensor and properties. |
Beta Was this translation helpful? Give feedback.
-
First, I would like to thank you guys for all the work, upbge is amazing and you guys are awesome.
As the title says, I would like to ask you to consider adding a way for collision logic bricks to differentiate between a True or False boolean property, so it will only activate if the property is True, and not if its False. Currently, the collision sensor will be activated if the property is detected, regardless of its value.
This would allow for a colliding object to hold several properties at the same time, and have each activate different collision sensors depending on which of the properties is currently set to True.
Beta Was this translation helpful? Give feedback.
All reactions