(4.7.1) - PIE behaves different from Launch

I’m running ver 4.7.1

The problem I’m having comes down to this. when I run with PIE, my enemy blueprints functions correctly, but when I Launch or run Standalone, my one enemy is broken.

I have 3 enemy types, they all share a parent blueprint as a base with some variables to customize them to look different… etc. So all my enemies are child blueprints with just some variables tweaked. 2 of the enemies actually work just fine, but one of them don’t.

An example of what’s going wrong. The enemies are set up to simply follow the player and attack when in range. The one that is broken follows, but always looks in one direction, it doesn’t face the direction it walks in. During PIE, it does but with Launch, it does not.

Another example is with collisions. I switch off collisions with the player on certain moves so I can move freely through enemies. This doesn’t work on that one broken enemy, but works fine on the others, again, during PIE it all works, but with Launch, the one does not work.

I have tried to recreate this one enemy as a new blueprint, based on my base enemy blueprint, but it still does the same thing. I do find it weird that only the one is broken and the other two works because all three are basically the same, accept for some variables tweaked and models replaced, etc. They all share a parent blueprint.

Hello ,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this in a clean project?
  2. If so, can you provide a detailed set of steps to reproduce this issue on our end?
  3. Could you provide screen shots of the blueprint that is having the issue as well as the issue itself?
  4. Are you receiving any errors?
  5. If so, could you provide them?

Thanks for the reply!..

I will just reply first by saying that, I tested also with doing a build of the game, the build goes through without any problems, but when I play the game, all of my enemies are basically broken in some way.

I haven’t gotten any errors when I test in editor, but I’ll double check the log and see if there’s warnings or anything like that.

I thought there may be something “general” going on with the way blueprints work in editor vs at launch or with a packaged game. Because all my blueprints works 100% in editor, it’s just when I run Standalone, Launch or do a full build where things go wrong.

I will say that when I switched over from 4.6 to 4.7 I had some problems inside the editor with various variables not keeping their default settings and I think this is the current problem as well. I think some variables default to their own defaults maybe, in stead of what I set.

For example, I use a socket to spawn the weapon and give it a name. In the parent blueprint, I had the correct name. So on the child blueprint, I did not have to type anything, because the default was already correct. But when I play, it doesn’t find the socket. I think it defaults back to “None”.

What I had to do is change the default to “None” and then basically forced to type in the name on the child blueprint. This seemed to work when I play with Launch, or Standalone.

But yesterday when I tested a full build, in the full build the weapon does not spawn. I think it spawns at 0,0,0 in the world because it does not find the socket name, because that name somehow gets lost. I think other variables also defaults back and that’s why it basically breaks the enemies behavior.

The problem I had with switching collisions on and off for a specific channel, that is new though in 4.7. I never had that before.

Anyway, I’ll try grab some screens that makes sense, or maybe even make a video to show how I have it set up. I’ll see if I can reproduce as well.

Ok, I found something that I can maybe explore a bit, just to give an update here.

I am busy setting up a test project by migrating my enemy and all dependencies to a clean 3rdp project. It all works and the enemy does it’s thing where it works in the editor but it’s broken in Launch.

So, I just close it and restart it to make sure it all works ok and I get some errors from my custom GameMode blueprint because it’s now severed from the full project, and which is actually not even used in this test project, but the enemy is referenced in there. So, just to get rid of those errors, I cleaned out the GameMode blueprint, so there’s no nodes in there at all and now the enemy functions properly. It works in all play modes, even a full build.

So, I’m gonna investigate the GameMode influence a little bit in my full project.

Ok, cleaning out the GameMode blueprint in my full project does nothing, so I’ll make the test project have the problem again and take it from there.

Sorry for so many posts but just wanna update as I go.

I copied back the original GameMode blueprint to the test project, so it’s back to how it was when the enemy did not work correctly, but now the enemy still does work correctly.

So, by cleaning out the GameMode, for some reason made it work, and now it works. But this only in my small test project, not in my full project. It’s still broken in my full project, regardless of clearing the GameMode blueprint or not. So not sure what happened.

Even something as simple as this…

You see the Z location is 0, it’s supposed to be -80. If I set it to -80 save it and quit. When I run the editor again, it’s back to 0.

Currently I actually force this position to be -80 in the blueprint, so it doesn’t screw up when I play the game, but if I don’t do that, it just goes back to 0.

I think this is all linked to the same problem, where settings gets default back for some reason. Any setting that I don’t “force” in some way, defaults back. Most settings I actually do force, but some I don’t and shouldn’t need to, it’s just a check box or whatever in the default properties.

So, not sure the underlying problem causing this to happen.

I have a project that I can send you and maybe see first hand what’s going on. Better than screen shots.

Can I send a download link?.. if so, where can I send it?.

Hello ,

If you would like to send me your project, you can do so by sending me a Private message on the forums. You can zip down your project and send it via Dropbox or google drive.

Quick question:

Are any of the classes you are having issues with originally created in C++ and then altered in blueprints?

Thanks, I will send a link shortly.

To answer your question, no, I don’t use C++ at all, I’m not a programmer, just blueprints all the way. My base enemy blueprint is based on the Character class and then I base my actual final enemies on that blueprint.

Hello ,

After looking over your project, it would appear that some of the blueprints have been corrupted due to the upgrade. I have found that if I make a new pawn blueprint and match all of the settings in your Mummy blueprint that the enemy acts as it should in all versions of play (PIE, Launch, ect.). If you remake the blueprints in 4.7 that are giving you trouble, does this fix the issue?

(Remake NOT duplicate, I think that some code that was carried over from 4.6 is causing a conflict)

Thank you for your quick reply!.

I have actually tried remaking it a few times and it didn’t work.

I think in that test project, it behaves different. Because when I messed with that project, after clearing the GameMode blueprint, everything suddenly worked, but only in the test project, not in my full project.

I have tried recompiling every single blueprint I have, just to make sure as well. Which didn’t work.

With that said, do you think I would need to recreate my base enemy blueprint maybe?.

What I think I will try is to migrate my whole project and see if that helps in any way. If that allows me to then recreate the enemy and fix it.

In theory, that’s really the only difference between my full project and the test project, other than not having the same graphical content. It was migrated, not cloned. So not sure if there’s a difference, if it will make any difference.

Did a full migrate now into a clean project. It is possibly looking promising, I’ll just need to look into it more tomorrow, it’s just getting too late now.

I was able to create a new enemy that seemed to work in Standalone game, but I have other problems because of the migrate that I need to sort out first before I can properly test the enemy. I did a real quick test with no custom settings, so not a proper test, but they did face the player, so that’s a step in the right direction.

It does seem that migrating the project has a different effect on the blueprints compared to doing a clone, like cloning for a new version of the engine. So I’ll see how this goes and post back here.

Thanks again for taking a look at my test project. Really appreciate that.

After some more testing it seems that migrating and remaking the enemy blueprint does not actually fix the problem. All it really does is shift the problem to another area, so now the enemy does not even follow the player at all, basically just stand there. What happens is, if I just made it and test it, it’s fine but once I exit the editor and run it again, it’s all broken again.

So, I’m in the process of remaking the base enemy blueprint. At least, doing some simple tests. It’ll be a bit of an undertaking to remake that. With the simple test, it’s working so far. It all seems to propagate through, even if I make changes on the base blueprint and even if I exit the editor and restart. It also works on Standalone.

This seems like possibly what I need to do, which is… not fun… :slight_smile:

I just wonder if there’s a way to completely avoid this in the future?. How does the blueprint get corrupted?.

I’ll post back here again with more findings. My current blueprint is far too simple to call it solved, but it seems to be what needs to happen.

So, I’ve been creating a new enemy blueprint, but I did not make it from scratch, but rather copy nodes from the old one and just remake all the variables and stuff. So don’t know if by doing that it beats the purpose, but I don’t want to remake the whole thing node by node.

Either way, that didn’t work. When I make a new blueprint, using my enemy character as a base, some settings will always reset to their defaults. Which is what causes the thing to behave weirdly, or just seem broken all together.

So, what I’m doing is for every single setting that I want to modify on the “child”, I make my own variable, I don’t do it on the given properties. This seems to work.

For example, in stead of going to the mesh and swapping it out directly with another mesh, I set my own variable for that, and at BeginPlay, the mesh is swapped out. So doing this for every single variable that I want to tweak outside of the base enemy blueprint.

Basically the problem seems to be that settings that I set on my base blueprint, does not propagate through to it’s child, but rather it goes back to whatever the default is on the original character class. The settings do stay on my main blueprint though, it’s just when I create another blueprint from that base, then it becomes a problem.

The same actually happen with my animation blueprint. I’ve gone in and made a child blueprint from my main animation blueprint. Initially it all works, but as soon as I close the editor, restart, then play, animations don’t work anymore. I have to use my base anim blueprint to be able to use animations, creating a child from that, does not work, it does not keep it’s settings. I haven’t tried forcing it, but I’ll try that and see if that works like it does on the actual enemy blueprint.

So, I’m not sure what’s going wrong, and where, why these settings are not saved. I don’t think forcing every variable is really a solution, rather it’s a workaround. That or duplicate my base blueprint and make every enemy a unique blueprint.

I don’t know, don’t really know what to do and really don’t want to remake all this stuff or even revert back to where it used to work, which really, is basically ver 4.4 or 4.5. That’s months of work down the drain.

I mean, it all works fine, accept, it doesn’t get saved when I quit the editor. It’s not like it’s fundamentally broken.

Hello ,

After messing around with your project I thought it best to write up a report ( UE-11456) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.

Make it a great day

Thank you very much for your time and effort!. I really appreciate it.

Ok, so I think I have a bit of a lead of where things go wrong.

In my GameMode blueprint, I spawn the enemies based on certain criteria. They are not “placed” in the world. If I don’t set it up to spawn in GameMode, if I clear the Class of which to spawn from all my enemy spawning nodes, then go and create a brand new enemy from my EnemyBase blueprint, it seems to keep the settings. I can quit and restart the editor, and all settings are kept. I can even Launch the game, and the enemy works. I placed an enemy directly in the level to test this.

So, strangely, it seems as soon as I add that enemy as a Class to spawn within my GameMode, it screws it up. Settings gets reset, basically it breaks.

I’m currently doing more tests to see if I can find exactly why this is, but I wanted to post here because maybe it also gives you guys a clue as to what to look for, if there’s a possible problem with regards to spawning. The weird thing though is not that it simply spawns broken, it actually breaks the blueprint itself.

The way I spawn is, I have a Macro in my GameMode, this is set up to feed in some location information as to where to spawn an enemy and also has an input for the Class. I use a Spawn AI From Class node to spawn them. I think in my test project I sent, you should be able to see how this is set up.

With more testing I realize that, even if I just add a spawning node, and then reference the enemy class, even if it’s not hooked up to any events or anything, it will break the enemy blueprint.

So as long as I don’t try spawn an enemy, the blueprint will be ok, but as soon as I reference that blueprint for spawning, it’s broken. Even if I get rid of the spawning node, I still need to re-create that blueprint to fix it.

I tried this in 3 ways, in GameMode, in PlayerContoller, and a new Actor blueprint. There seems to be no way I can set up a spawn for the enemy. As soon as I do, the enemy blueprint is broken from then on.