Mesh doesn't want to change

Hey guys, I’ve setup a multi-use action to switch a structures mesh but the problem I’m having is it’s just not working for some reason… The editor gives me this message after test game:
Warning Calling SetStaticMesh on ‘None’ but Mobility is Static

Here is the section of the event graph that should make the switch.

Event Graph.png

There are two seperate mesh set inside the set static mesh function, Stone_Battlement_1_SM is the top and Stone_Battlement_2_SM is the bottom.
I originally had added a second component and switched between visibility which worked fine but I was having issues with collision so I wanted to do it this way but like I said nothing is happening. :confused:


Where are you calling that event?


Hey WM thanks for the reply, Im racking my brain it hurts :open_mouth:
I’m calling that from the BPTry Multi Use Screenie below.


Try using an Auth Switch before calling the event - this is mainly because multicast events need to be called from the server. It may seem redundant, but it’s part of the process of debugging.

Also, get into the habit of plugging print strings into key points in your flow chains, and watching the execution paths while the blueprint is running is extremely helpful.


I did watch the path but it didn’t mean too much to me :stuck_out_tongue: The path glows and toggles each time as it should. It seems as though its running but just doesn’t change the mesh. :S
Put the Auth switch in BPTry Multi Use just before the switch battlement function? - I tried this but it didn’t seem to help anything.

What I dont understand is when I had it toggle visibility it worked fine across server and client but set mesh just doesnt work and its returning that error that I meantioned in OP. I can’t use the toggle visibility though because it messes with collision hence why i figured switching mesh would work but aparently not. WM, you think im missing something or do you have any idea what might be the issue or even what that error im getting after test play is? man i just want this to work :open_mouth:

Is the movability of the mesh movable or static?


Well under defaults in the structure it’s definitely sent to movable. I looked through to see if there was something else but I couldn’t find anything… It’s definitely movable though…

Only things I can find about it are people using the Level Blueprint and using that node.

Can’t really help there, the Level - as far as I know - is only read for the PrimalGameData/Cooking unless it’s a map.

Only other way I can suggest about doing it is attaching and destroying/removing a static mesh component on demand as you need to. That way you’re guaranteed to get the collision correctly for the new mesh.

One caveat with that is is will require experimenting with getting the locations correct, probably.


Yeah I was thinking about doing that but I’m not really sure how to do it… I tried to play around with it but no success. Do you have any ideas?

So after messing around a bit, Im finding that certain functions just wont work while others do. I’ve changed the setup to basically toggle visibility and added the second mesh as a component. Its all working other than the collision. So if I use toggle visibility function the mesh obviously toggle, if I replace it with set visibility it just does nothing, just as set mesh etc. Is there a reason for this? Also I tried using the set object collision type function instead and it seems great but for some reason it doesn’t work properly with the second mesh…

Edit: So weirdly enough I have everything working exactly how I intended. I mean, I’m not changing mesh, just collision & visibility but the outcome is the same.
Oddly enough it wasnt working I decided to take a break, saved and quit. Reloaded the editor and it was all working…? I don’t know why but the collisions, visibility everything is all going. I can successfully switch between components and Im a super happy lad now.

Thanks for the support WM.