change actor when colliding with another actor (resolved)

Excellent explanation but I’m having a problem. the created event is not taking me

The conversion event should be created inside of your caja lafrillo (the CoinContainer),

yes, that place inside caja ladrillo

this inside the switch

here is a video that doesn’t take me

cap6

I did a test and I took the event on the nodes, but it doesn’t work

cap9

cap10

Well,you could cut off the for each loop and do a print string right behind the cast-to node ,to see if the box collision works. In my opinion it maybe that the character didn’t touch the box collision.

The box collision should larger then the mesh, otherwise the character won’t reach it.

1 Like

yes, the collision is bigger

there it worked for me!!! thank you so much

cap12

1 Like

Hello, it’s me again. just one last question? How do you make it return to its previous state in a certain x seconds, that is, for example, the coin returns to the box?

Yes. It’s easy to do.
Remember the coin has nothing to do previously.
and now you want it to do something.
you can add functionality to it. So it can do the thing you want.

And the switch should also change a little.

2 Likes

yes, it works for me, thanks

There is only one small detail missing, when passing through the activated switch the conversion is activated again

cap4

The step 2 below is preventing in case you want the box to change again.
If the box will never change again you could cancel this step.
Move those two node back to Beginplay .

1 Like

brilliant! it worked

1 Like

Hello, just to finish I would also like the box to transform into a coin (that is, the upside-down effect). but it is seen that the currency with the delay automatically generates the change for me

cap1

add a new event in the coin

here at the switch

and here on the coin is the delay, which I think is what makes it return only to the initial state

Yes,I’m happy to help.
Just to make sure if I understand.
Witch one do you want it to change?and at which step will it change?
When you step on the “P” object, the whole switch changes to coin?
Because my English is suck, :see_no_evil: I’m actually practicing.
I have to read multiple times.

Thank you, you really help me a lot. You have a great knowledge of the unreal. I hope to reach your level :smile:

only if there is a way to do it in reverse. Did you see that in Mario when the switch is activated there are two changes, one is the boxes that transform into coins and the coins also transform into boxes. It is a simultaneous change

Thanks,you will reach very soon.it’s a beginner level.

And you mean the coin to the right did a unwanted conversion?
Yes, the coin will automatically change to box after seconds since the coin is born. it’s designed to be spawned to the level. Not you drag it out from the content browser.

If you wan to have some coins that originally exists in the level.
You should duplicate the coin blueprint, rename the new one original coin,delete all added functionality in it.
That way you’ll have 2 coin blueprint.
one is a changeable coin,another will be original coin.
and then you can place the new coin in the scene(the original coin blueprint,without functionality in it).

2 Likes