change actor when colliding with another actor (resolved)

Hello, I want to convert when colliding with a switch, and that one actor (box) to another actor (coin)

cap1

I have both actors

cap4

in the brick box

on the switch

Hello,

If you plug your “Caja Ladrillo’s” WORLD TRANSLATION into the “Spawn Transform”, the “Moneda” should replace it.

(Assuming you destroyed the correct “Caja”.)

1 Like

no, it doesn’t work

Can you be more descriptive?

“No it doesn’t work” doesn’t tell me anything.

Also, what are you trying to possess?
And you never destroyed the actor like I told you to.

What I want is that when I activate the switch, the brick box transforms into a coin

at the end it is

I understand what you want, but you haven’t told me what happens.

Does the box disappear?
Does the box remain?

And what are you trying to possess?

the box remains, it does not change to the coin

Again, what you you trying to possess? I need to understand what you are doing.

Also, I want to see if the coin exists. So, instead of destroying the actor, set its visibility to “Hidden”.

Then, connect the “Return Value” of the SPAWN_ACTOR output pin to a PRINT_STRING node and see if the Moneda exists.

I added hidden but nothing, the print has no effect either, maybe I should take another alternative because this doesn’t work

Graphically, how could I use this change?

So, I did this in a couple minutes, and it works.

Get rid of the POSSESS node.

Also, not sure why you disabled collision. You need collision to register the hit.

no, nothing

basically I want to achieve this

69d119a20bbd13ec003483814â– â– â– 3e6a00dbab52

I understand what you want (I’ve clearly shown you with my own video), but you’re doing something wrong. You’re probably missing a collision.

Let’s start over:

  1. For now, just make two new blueprints. One should have a BOX (BP_BOX) and the other should have a SPHERE (BP_SPHERE).

  2. You’re going to practice converting the BOX and the SPHERE.

  3. Add a BOX COLLISION to the box. Make sure that the collision is BIGGER than the BOX.

  4. Place this code. BE CAREFUL!

  5. If the print string says “Hello” that means that you’re not using the correct character.

  6. In the SPAWN_ACTOR Node, the CLASS should be your BP_SPHERE.

  7. Connect the transform from the CUBE.

  8. DESTROY the actor.

1 Like

Do the destroy before the spawn, or change the spawn collision behavior. Your spawned actor is probably colliding with what’s there so it fails to spawn.

1 Like

yes, that came out

cap1_1

but I would put that code inside the switch, since it has the collision where it has to be activated

and through that collider, another actor (box) has to be changed to another actor (coin). It would be like a “remote” collision.
without the character having close contact

and transform it to this

cap3

1 Like

I understand. You keep repeating yourself.

I just showed you what to do and how to do it. There’s nothing more for me to say:

Replace the WHITE BOX with the CAJA MESH (NOT THE BLUEPRINT), and replace the SPHERE with the COIN MESH (AGAIN, NOT THE BLUEPRINT).

As you learn more, you’ll understand why you had trouble with this. But again, there’s something wrong with your CAJA and MONEDA blueprints.

2 Likes

I guess the thing with a P on it is the switch that you’re going to touch ,and the yellow boxes are what you want to change into coins when you touches the switch.

2 Likes

In that case, all this person needs is a BOOLEAN that will allow/disallow conversion.

3 Likes

exactly, that’s what I need

Maybe, but I’m still going to keep trying this, thanks

image



1 Like