Compare Two Object's Properties?

How can I do this?
E.g. two characters wrestle with each other
whichever has a higher value, wins!

Preferably non-python.

Thanks for your consideration.

you can change their mass in the physics tab, lower mass will be overcome by higher mass, so set the “bully/pusher” to a high value and the “pushed around” to a much lower value…unless you want to control one via input…then I would recomend scripting. You should see what others say as well though.

Thanks, JustinBarrett.
That would help for tackling aspects.
But I also wanna do a wrestling kind of thing. I’ll re-edit my question.

How are they wrestling with each other. Button Mashing ? or more technical ??

You can do this through properties. When a property reaches a certain value…they win.

An example is. When you press a button it adds to a property, when that property value is 100, send a
message indirectly “that means to nothing” saying something like “Winner”

Make two properties on that layer. A property value “less than 99”, Message “Winner”
Link them up to an and, add layer “send to another layer”. Now the winner won`t be effected, as his
value was higher. This is good for copying the same object :wink:
Now make another and, connect just the message “Winner” and do what you want with it.

This is just simple logic, but i hope you get my drift.

Now look. I`m going off button mashing a single letter, doing combos is quite easy if you use layers.
Experiment, but it might get a bit spaghetti… i love spaghetti :slight_smile: :slight_smile:

I hope i explained it decent enough to follow.

The balance/wrestle part, if player 1 value is higher than player 2, but player 2 is mashing harder
than player one all of a sudden… You can drop player ones value down a few notches ???
Now that`s going into some spaghetti Logic, i leave that too you.:slight_smile:

Hi ChaosEmergency,

What do you mean by… layer??? Do properties have layers?

What I’m looking for is,
something more like an RPG
e.g. there are many characters, each with different strengths,
whoever has higheer strength wins.

And yeah, there might be button mashing heheh.
But if their strenght is much higher than yours,
you can’t beat them (unless you have a turbo controller or something)

Logic bricks have layers, so if you have a prop or message, connect it to an and, the choose
layer, you can send to another layer. It`s very useful, and saves looking at spaghetti wires.

Yeah to detect if someone is a higher level than you is useful, but a work around is this.
Give player property “Health” and “LEVEL”.

Then learn to use python as you will need it, i`m crap at python :frowning:
When a player is attacking he shoots ray at you, when player receives the ray he will look into his python script.
If the ray sent was a bullet/bomb/punch, then it will deduct health depending on the type.
They can also shoot a ray with there level as well…so there level is take into consideration
with the health deduction.

I wish i could do this in python :frowning: i`m still learning how to…one day

Looking back at what i said, you could do all these with messages, but it would be tedious.
Python is way to go my friend for something like this… Good luck

Yeah, I might have to learn python.

Where do I find this layer option??? Sometimes I don’t like the spaghetti strands lol.

Under actuators it`s called “State” sorry i should of mentioned that.
Were your connectors are, underneath is a little plus +
Those are your layers/states.

Okay, I know what states are.

But I don’t understand your first reply.

It is an interaction between two or more objects.

You should have one object that is responsible to calculate the outcome = damage handler.

This can be one of the two or another separate object. It can even be Python code.

The damage handler needs the input from both objects. This includes the “When” (event) and the “What” (damage, health).

Due to the dynamic nature of such operations I strongly recommend to use Python. This makes it much easier to retrieve the involved objects, the necessary data and process the output.


When character A performs move “cool move” you can trigger the damage handler.

The handler determines what both characters are doing:

  • A: “cool move”
  • B: “standing”

So the damage handler can calculate
-> When A is heavier than B -> B will fall
-> When A has less weight than B and A has “cool move skill” > 5 -> B will fall otherwise B can counter with “cool move counter”

other situation:

  • A: “cool move”
  • B: “standard counter”

So the damage handler can calculate
-> When A is heavier than B -> B will block
-> When A has less weight than B -> A will fall

Sounds that plausible?