If you have seen not if you see

Hi !
When my character have seen my doll_blueprint then my boolean doll is activate. But with this graph i think i say “When you see” and not " When you have seen", and the result is my boolean is activate only when my character see the doll.

I have imagined to create a list with a question like “Have you this object ?”, but i don’t know if it’s a good idea … and i don’t know how to do…

If someone has an idea or knows how to do that.

Thank you

What currently happens in your code is that if you’re seeing any Cube blueprint object, the flag is set to true. (To be more precise, you check whether the first/closest object seen is of type Cube blueprint.) If that’s what you want, you could also add a flag to track whether the character has ever seen any Cube blueprint object.

If you want to check whether they’ve seen any specific Cube, you might want to keep track of that (both currently and ever seen) in the Cube blueprint instead.

I don’t see any mention of doll_blueprint anywhere…

Oh yes sorry, I say Doll, because in my final version it will be a doll, for the moment it’s just a rough version with cube, sphere … The cube blueprint is the “doll”.

When you say “you might want to keep track of that (both currently and ever seen) in the Cube blueprint instead”, did you mean communicate the variable doll in cube blueprint for exemple ?

In fact i want to say "If you have seen the doll then the doll boulean is always activate and thereafter if the boulean doll is activate then you can see the door_blueprint (i don’t make this second part not yet).

(In my cube blueprint i have one reference of doll variable)

(sorry for my english)

I can think of a couple of angles to approach this.

First, if this is at all related to AI (for example, an NPC, or a AI Pet) you may want to use AI Senses. These have a 'memory effect that you seek. You can set a custom expiry and then you can implement “Have you seen X in the last Y seconds” type behavior.

The second way is even easier than that. Simply set a giant trigger around the doll_blueprint. When the player enters it, you can toggle your flag. You can then perform the same type of query “Have you seen”. Configure the trigger area carefully and you can consider it as good as they have seen it.

I’d probably do it that way.

Remove the “Set Doll? false” node and you will have a “When you have seen” boolean.
Just don’t do anything when the cast failed or the condition for the branch is False.
Be sure to set the variable “Doll?” to False by default.

I can use the trigger but i will need the AI senses later.

My character enters in a room by the first door, this first door locks.
Thereafter he attains the second door (locks too), he returns at the first door and when he looks at/detects this first door then the second door changes of material.

And for the moment the second door changes of material without my character look at the first door. (he cans be back to the first door, it works)

That’s why, i try to create a condition like “for the moment you can’t to detect the first door, but if the boolean “Doll?” is activate then you can see this first door”

I’m not sure to be clear …

it’s logical … but it doesn’t work … (x") I don’t think of however)

In fact, when my boolean “Doll?” is activate then my character can detect my Porte_Blueprint, and if my Porte_Blueprint is detect then the boolean Door? is activate.

In that case, if the cast fails for the Cube/Doll then Branch on Doll? (using a get variable). If true, cast to Porte_Blueprint (using the same Hit actor result)

It doesn’t work too… my second door changes his material without my character sees the cube_blueprint … And yet “Doll?” is disabled by default…

I try to explain my project ^^" (forgive me for my english)

First I create a Door_Blueprint (Porte_Blueprint) with a matinee (open/ close) and with a box trigger. My first door opens if my character touch the trigger and if my boulean “Opened?” is activate (and pressed F)

Second I create a sphere trigger just behind the first door, this trigger disable the boolean “Opened?”. The first door is locked and the sphere trigger is destroy.

I created a second door with trigger (triggerbox2). My character goes to this second door and when he touches triggerbox2 then:
-Boolean “changecolor” is activated
-Spawn my Cube_blueprint

For the moment all this part works but next:
My character flips and sees Cube_blueprint, he brings Cube_blueprint closer, and when the Cube_blueprint is detected by the character then his Simulate Physics is activated and the boolean “Doll?” is activated.

If “Dolls” is activated then my character can detect the first door (Porte_Blueprint)

The character goes towards to the first door:
If he detects the first door then the boolean “Door?” is activated
Finally if “Door?” is activated and if “Changecolor” is activated then my second door changes his material. ( I really want that my second door changes his material only if my character looks at the first door because for the moment, without my graph to detect, his material changes even if my character is back to the first door)

My levelBlueprint

My ThirsPersonBlueprint (to detect object)

My cube_blueprint

Well… i hope it’s clear… Sorry

The problem is with your level blueprint. Here is what I would change:

You have to check if he looks at the Porte_Blueprint if the cast to Cube_Blueprint failed, not if the return of LineTrace is false:

It doesn’t work too … It seems to associate the first door (Porte_Blueprint) and the Real cube Blueprint … Or not to detect the Porte_Blueprint … It’s strange … The two objects are differents …

When he looks at others objects (not the first door and the cube ), it’s ok

What happens in my graph when he looks at the door or the cube

My door , with trigger and matinee animation

My Cube_Blueprint

YES ! It works ! IT S ALIVE ! I’m so so so so happy ! Thank you Guronzor ! And for you patience !

Now i will try to understand (it’s work, it’s cool but i want to understand, i’m going to analyse your answers.)