# \#compare

**URL:** https://forums.unrealengine.com/tag/compare/3557.md

[Latest](https://forums.unrealengine.com/latest.md) · [Categories](https://forums.unrealengine.com/categories.md) · [Tags](https://forums.unrealengine.com/tags.md)

---

## [How to compare multiple players that are using the same type of actor?](https://forums.unrealengine.com/t/how-to-compare-multiple-players-that-are-using-the-same-type-of-actor/444086)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_78db8194](https://forums.unrealengine.com/u/anonymous_user_78db8194)\
**Replies:** 2\
**Last updated:** [March 31, 2025, 3:11pm UTC](https://forums.unrealengine.com/t/how-to-compare-multiple-players-that-are-using-the-same-type-of-actor/444086 "2025-03-31T15:11:18Z")

</div>

Lets say you wanted to make a online first person shooter game and used a integer variable to keep track of score. And after a certain amount of time you wanted to give the player with the highest score a weapon, how wou…

---

## [Compare two variables.](https://forums.unrealengine.com/t/compare-two-variables/1702893)

<div class="topic-metadata">

**Author:** [@The\_Sky\_Rider](https://forums.unrealengine.com/u/The_Sky_Rider)\
**Replies:** 4\
**Last updated:** [February 21, 2024, 6:58pm UTC](https://forums.unrealengine.com/t/compare-two-variables/1702893 "2024-02-21T18:58:53Z")

</div>

So I’m trying to compare two “identical” blueprint structures (One is a duplicate of the other) and don’t know how I would do so, There is no Matches node like for individual blueprints, and the == node, as you can see…

---

## [How do you compare actors?](https://forums.unrealengine.com/t/how-do-you-compare-actors/283419)

<div class="topic-metadata">

**Author:** [@ItzFriday](https://forums.unrealengine.com/u/ItzFriday)\
**Replies:** 7\
**Last updated:** [June 23, 2023, 4:54pm UTC](https://forums.unrealengine.com/t/how-do-you-compare-actors/283419 "2023-06-23T16:54:03Z")

</div>

Is there a way to check if an actor is a specific actor? Scenario : I wish to check to see if my target is myself, if it isn’t then do something, if it is, then do nothing.

---

## [How to compare actor types via line trace](https://forums.unrealengine.com/t/how-to-compare-actor-types-via-line-trace/1622155)

<div class="topic-metadata">

**Author:** [@TheoRat3](https://forums.unrealengine.com/u/TheoRat3)\
**Replies:** 1\
**Last updated:** [January 18, 2024, 4:29am UTC](https://forums.unrealengine.com/t/how-to-compare-actor-types-via-line-trace/1622155 "2024-01-18T04:29:14Z")

</div>

I have weak point actors in a shooter project of mine attached to sockets on enemy skeletal meshes. What I’m looking for is a means to validate if the actor type hit by a line trace is of type AWeakPoint. Is there a comp…

---

## [How to compare two rotations?](https://forums.unrealengine.com/t/how-to-compare-two-rotations/396519)

<div class="topic-metadata">

**Author:** [@JerichoBLT](https://forums.unrealengine.com/u/JerichoBLT)\
**Replies:** 5\
**Last updated:** [May 2, 2023, 6:07am UTC](https://forums.unrealengine.com/t/how-to-compare-two-rotations/396519 "2023-05-02T06:07:09Z")

</div>

I need to return a float value that tells me just how much alike two rotations are. In other words: How accurate they are to each other. For example: If both rotations are exactly the same, then the max float value wi…

---

## [(5-0EA) Compare Array of structs ](https://forums.unrealengine.com/t/5-0ea-compare-array-of-structs/498360)

<div class="topic-metadata">

**Author:** [@cluso22](https://forums.unrealengine.com/u/cluso22)\
**Replies:** 0\
**Last updated:** [February 15, 2022, 4:29pm UTC](https://forums.unrealengine.com/t/5-0ea-compare-array-of-structs/498360 "2022-02-15T16:29:41Z")

</div>

Hi, Please i want to have soma manager which after i overlap with triggerbox the trigger pass info on it into manager, That info is One data asset and three floats so the passed info is a struct of those things. In the …

---

## [Equal Component not working](https://forums.unrealengine.com/t/equal-component-not-working/489219)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_393115f6](https://forums.unrealengine.com/u/anonymous_user_393115f6)\
**Replies:** 2\
**Last updated:** [September 26, 2021, 2:06pm UTC](https://forums.unrealengine.com/t/equal-component-not-working/489219 "2021-09-26T14:06:09Z")

</div>

Try to compare UniqueID. And check which component is casting your hit function with an print (AddOnScreenDebugMessage if c++)

---

## [How i can to compare two TCHAR in C++?](https://forums.unrealengine.com/t/how-i-can-to-compare-two-tchar-in-c/486044)

<div class="topic-metadata">

**Author:** [@VladAnt\_1995](https://forums.unrealengine.com/u/VladAnt_1995)\
**Replies:** 0\
**Last updated:** [July 11, 2021, 10:05am UTC](https://forums.unrealengine.com/t/how-i-can-to-compare-two-tchar-in-c/486044 "2021-07-11T10:05:52Z")

</div>

Hallo! i’ve some FString, and i get from it TCHAR by index. How i can compare it with other TCHAR? FString str = "Hallo my little World"; bool getCh(int x, TCHAR ch) { return (FCString::Strcmp(&str\[x\], ch)!=0); } A…

---

## [Integer Comparison Giving Inconsistent True/False](https://forums.unrealengine.com/t/integer-comparison-giving-inconsistent-true-false/469146)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_9e8b2af2](https://forums.unrealengine.com/u/anonymous_user_9e8b2af2)\
**Replies:** 2\
**Last updated:** [August 10, 2020, 8:01pm UTC](https://forums.unrealengine.com/t/integer-comparison-giving-inconsistent-true-false/469146 "2020-08-10T20:01:24Z")

</div>

Hi, I am new to Unreal Engine and am running into an issue trying to compare some integers. I am generating a random number from an array from 0-3 and when I print out the number generated and then print the result of …

---

## [Comparing TWeakObjectPointer to AActor\*](https://forums.unrealengine.com/t/comparing-tweakobjectpointer-to-aactor/459120)

<div class="topic-metadata">

**Author:** [@VD\_D](https://forums.unrealengine.com/u/VD_D)\
**Replies:** 0\
**Last updated:** [December 4, 2019, 11:54am UTC](https://forums.unrealengine.com/t/comparing-tweakobjectpointer-to-aactor/459120 "2019-12-04T11:54:50Z")

</div>

I would like to test whether or not the actor which was the initial target for a LineTraceSingleForObjects was indeed the hit actor or whether something got in the way. TArray\<AActor\*\> TargetableEnemies; TArray\<…

---

## [Right-hand operator overloading](https://forums.unrealengine.com/t/right-hand-operator-overloading/452118)

<div class="topic-metadata">

**Author:** [@Atijaf](https://forums.unrealengine.com/u/Atijaf)\
**Replies:** 2\
**Last updated:** [July 13, 2019, 7:02pm UTC](https://forums.unrealengine.com/t/right-hand-operator-overloading/452118 "2019-07-13T19:02:37Z")

</div>

I am receiving the error "binary ‘==’: no operator found which takes a right-hand operand of type ‘ABasicCharacter’ (or there is no acceptable conversion) I’ve tried all possibly ways I can think of to overload this ope…

---

## [Boolean from axis value](https://forums.unrealengine.com/t/boolean-from-axis-value/379312)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_b36491831](https://forums.unrealengine.com/u/anonymous_user_b36491831)\
**Replies:** 2\
**Last updated:** [March 3, 2018, 6:48pm UTC](https://forums.unrealengine.com/t/boolean-from-axis-value/379312 "2018-03-03T18:48:56Z")

</div>

I am trying to achieve a simple task but somehow not getting the results I expected, starting to be clueless what I am missing. All what I try to do is get a boolean value, depending on comparison of the axis value. …

---

## [Compare location of child actor of same parent](https://forums.unrealengine.com/t/compare-location-of-child-actor-of-same-parent/404020)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_519ef7ae](https://forums.unrealengine.com/u/anonymous_user_519ef7ae)\
**Replies:** 2\
**Last updated:** [September 8, 2017, 7:16am UTC](https://forums.unrealengine.com/t/compare-location-of-child-actor-of-same-parent/404020 "2017-09-08T07:16:30Z")

</div>

Hi, I am having trouble comparing the location of two actors collision components that share the same parent. The output of the location shows as 0 because I am technically comparing it to itself. It will print out all t…

---

## [Calculating distance from actor/order of appearance](https://forums.unrealengine.com/t/calculating-distance-from-actor-order-of-appearance/403898)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_519ef7ae](https://forums.unrealengine.com/u/anonymous_user_519ef7ae)\
**Replies:** 1\
**Last updated:** [September 6, 2017, 6:38pm UTC](https://forums.unrealengine.com/t/calculating-distance-from-actor-order-of-appearance/403898 "2017-09-06T18:38:04Z")

</div>

I have three actors stood in a line inside a box trace of a static object. One of the actors is the player pawn and the other two actors are children of a master actor class. What I’m having trouble doing is detecting wh…

---

## [Single float compare](https://forums.unrealengine.com/t/single-float-compare/397795)

<div class="topic-metadata">

**Author:** [@U.Dev](https://forums.unrealengine.com/u/U.Dev)\
**Replies:** 1\
**Last updated:** [July 23, 2017, 6:30pm UTC](https://forums.unrealengine.com/t/single-float-compare/397795 "2017-07-23T18:30:05Z")

</div>

I need simple difference between 1 float if it’s possible, maybe it’s easy to do, but my math isn’t that great to figurate this out, i need help please ! Expl. if float is (250) and if it gets random by numbber - or +, …

---

## [(Noob) static mesh playing sound while moving](https://forums.unrealengine.com/t/noob-static-mesh-playing-sound-while-moving/387766)

<div class="topic-metadata">

**Author:** [@anon253543](https://forums.unrealengine.com/u/anon253543)\
**Replies:** 1\
**Last updated:** [March 13, 2017, 9:53am UTC](https://forums.unrealengine.com/t/noob-static-mesh-playing-sound-while-moving/387766 "2017-03-13T09:53:22Z")

</div>

I’m trying to get a sliding door to play a sound while its moving. In the screenshot “R” is the right panel of a door. It looks like the velocity of my static mesh is stuck to 0 (when the "add audio component is plugge…

---

## [Is there a way to get an object size and compare it?](https://forums.unrealengine.com/t/is-there-a-way-to-get-an-object-size-and-compare-it/383027)

<div class="topic-metadata">

**Author:** [@Deygus](https://forums.unrealengine.com/u/Deygus)\
**Replies:** 2\
**Last updated:** [January 26, 2017, 8:45pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-get-an-object-size-and-compare-it/383027 "2017-01-26T20:45:54Z")

</div>

Anyone know if there’s a way to set up a blueprint to get one cube’s size and compare it with another cube’s size? So that that function could then be recognized as true to somehow make a shape recognition library out o…

---

## [Return Max value and compare it](https://forums.unrealengine.com/t/return-max-value-and-compare-it/372334)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_94164b95](https://forums.unrealengine.com/u/anonymous_user_94164b95)\
**Replies:** 1\
**Last updated:** [October 3, 2016, 6:30pm UTC](https://forums.unrealengine.com/t/return-max-value-and-compare-it/372334 "2016-10-03T18:30:44Z")

</div>

Hi guys, I am a beginner in Programing and have a little knowledge on UE too. I am trying to program a simple board game and I managed to set up the template in the construction script. Now coming to the event grap…

---

## [How can I compare the shape of two seperate meshes?](https://forums.unrealengine.com/t/how-can-i-compare-the-shape-of-two-seperate-meshes/371531)

<div class="topic-metadata">

**Author:** [@Skuvnar](https://forums.unrealengine.com/u/Skuvnar)\
**Replies:** 0\
**Last updated:** [September 24, 2016, 11:34pm UTC](https://forums.unrealengine.com/t/how-can-i-compare-the-shape-of-two-seperate-meshes/371531 "2016-09-24T23:34:17Z")

</div>

So I have an idea for a side project where the player has to set up lasers to slice a box (or any shape) while it travels down conveyor belts and at the end of the path it is compared to a target shape. Obviously the goa…

---

## [Unity vs Unreal Market Share?](https://forums.unrealengine.com/t/unity-vs-unreal-market-share/333559)

<div class="topic-metadata">

**Author:** [@thestevex](https://forums.unrealengine.com/u/thestevex)\
**Replies:** 2\
**Last updated:** [June 5, 2016, 3:42am UTC](https://forums.unrealengine.com/t/unity-vs-unreal-market-share/333559 "2016-06-05T03:42:54Z")

</div>

Question… Unity mentions on their site that they have “45% of the Game Engine Market Share”, which to me seems like a very misleading number given that numbers that could be counted could simply be people who register f…

---

## [UMG vs HUD vs Slate (what is better for developing?)](https://forums.unrealengine.com/t/umg-vs-hud-vs-slate-what-is-better-for-developing/349732)

<div class="topic-metadata">

**Author:** [@broly](https://forums.unrealengine.com/u/broly)\
**Replies:** 1\
**Last updated:** [March 8, 2016, 11:32pm UTC](https://forums.unrealengine.com/t/umg-vs-hud-vs-slate-what-is-better-for-developing/349732 "2016-03-08T23:32:06Z")

</div>

Which of the following better for developing? As I see there are three ways UMG: BP ↔ C++ HUD: BP ↔ C++ (what is the difference with the first?) Slate: C++ ↔ C++ I’m right? Now I’m using first (UMG) wit…

---

## [How can this test be returning false negatives?](https://forums.unrealengine.com/t/how-can-this-test-be-returning-false-negatives/343905)

<div class="topic-metadata">

**Author:** [@Unisink2020](https://forums.unrealengine.com/u/Unisink2020)\
**Replies:** 3\
**Last updated:** [January 13, 2016, 4:55pm UTC](https://forums.unrealengine.com/t/how-can-this-test-be-returning-false-negatives/343905 "2016-01-13T16:55:56Z")

</div>

Pairs of compared vectors that are identical sometimes fail the test when they should be passing it. How can this be, and how do I fix this?

---

## [Why it's doesn't work?](https://forums.unrealengine.com/t/why-its-doesnt-work/330763)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_71c0b110](https://forums.unrealengine.com/u/anonymous_user_71c0b110)\
**Replies:** 7\
**Last updated:** [September 4, 2015, 3:18pm UTC](https://forums.unrealengine.com/t/why-its-doesnt-work/330763 "2015-09-04T15:18:23Z")

</div>

hi, i made color compare color macro and blueprint which is comparing colors of one actor and other ones which colors are diferrent. I’ve created dynamic material for one actor but it doesnt work. there arent any comapri…

---

## [Compare object types?](https://forums.unrealengine.com/t/compare-object-types/316992)

<div class="topic-metadata">

**Author:** [@Davision](https://forums.unrealengine.com/u/Davision)\
**Replies:** 0\
**Last updated:** [April 30, 2015, 5:18pm UTC](https://forums.unrealengine.com/t/compare-object-types/316992 "2015-04-30T17:18:42Z")

</div>

Why is there line trace for object types in Blueprint but no comparison for object types? Or am I missing something?

---

## [Compare Blackboard entries in Behavior Trees](https://forums.unrealengine.com/t/compare-blackboard-entries-in-behavior-trees/305841)

<div class="topic-metadata">

**Author:** [@Stormrage256](https://forums.unrealengine.com/u/Stormrage256)\
**Replies:** 11\
**Last updated:** [March 20, 2015, 5:54pm UTC](https://forums.unrealengine.com/t/compare-blackboard-entries-in-behavior-trees/305841 "2015-03-20T17:54:50Z")

</div>

Hi, I’m working on Behavior Trees for unit movement in my game. I used the ‘Compare Blackboard Entries’ with ‘Is Equal To’ operator for deciding whether a task should be run or not. Initially I tried with bool values. On…

---

## [String.Contains or String to Array possible?](https://forums.unrealengine.com/t/string-contains-or-string-to-array-possible/288218)

<div class="topic-metadata">

**Author:** [@edover\_1](https://forums.unrealengine.com/u/edover_1)\
**Replies:** 6\
**Last updated:** [July 15, 2014, 7:21pm UTC](https://forums.unrealengine.com/t/string-contains-or-string-to-array-possible/288218 "2014-07-15T19:21:14Z")

</div>

I’ve looked high and low and I don’t see anything that would suit my needs. I have two strings, A and B, and I want to check to see if string B is contained inside string A. For example A is Litterbox and B is Box. So in…

---

## [FString/FText doesn't compare correctly?](https://forums.unrealengine.com/t/fstring-ftext-doesnt-compare-correctly/287423)

<div class="topic-metadata">

**Author:** [@MJBrune](https://forums.unrealengine.com/u/MJBrune)\
**Replies:** 2\
**Last updated:** [July 4, 2014, 8:19pm UTC](https://forums.unrealengine.com/t/fstring-ftext-doesnt-compare-correctly/287423 "2014-07-04T20:19:51Z")

</div>

FText test = FText().FromString(“ls”); if (test.ToString().ToLower().Compare(FText().FromString(“ls”).ToString())) { OwnerHUD-\>PlayerOwner-\>ClientMessage(“true”); } else { OwnerHUD-\>PlayerOwner-\>ClientMessage(“fal…
