In the behaviour tree of your AI you may most likely want to check if the boolean variable bDead of BP_PlayerCharacter is true for finding its target. However for destroying an actor you should use the DestroyActor node. But if you destroy it before your player controller possesses a new pawn you will always get a black screen (or at least unexpected transform) because there is no more camera your controller could use.
where woulth then be the best place to add destroy actor node
The OnRepIsDead function of BP_PlayerCharacter (or its parent classes) or the PlayerDied event in BP_GameMode would be a good choice. However if you don’t choose the game mode make sure you call it on the server so it gets replicated correctly.
can you maybe figure this out for me the enemy is not lockt to the old player anymore when destroy actor but the new player is not spawning right
i got it now the new player was spawned high in the world and drop dead i was having save on quit when destroy it moved high in the world that was his last transform and drop dead when spawned
How are the houses work? Can I modify any house object to be used or do I need your houses?
It’s actually only one house in the example content. That one is not modular. You can change the materials of each room quickly and you can of course change / reposition the doors / windows but you will most likely want to model more / your own houses sooner or later.
If you want to use your own doors / windows, these either need to be inherited from the master door /window blueprint or need to implement the blueprint interface for opening or closing. For a fadable roof the roof needs to be an extra mesh or at least it needs an extra material slot for the top side. In addition you want to take a look at the fading component and the house example blueprint to see how the fading works.
Hey was just wondering how do i get the main menu to load my level instead of the overview? ive been looking for a while and can’t find anything unless i have skipped over it
Hey, please open the Blueprint /Blueprints/Widgets/Menu/Subwidgets/WBP_GameSpecifics. There you can find the widget element BP_UI_SlidableEntries_Level that has an array variable Entries. You can edit that array so it contains the names of the level files you want the player to be able to select. This is illustrated in the following image:
Thanks man got that to work but only problem now is when i load my new level the main menu UI comes up and not sure why
You have to override the GameMode for that level. You can find that option in the Settings menu of the Main Editor Window.
Pepeeee, first off, this pack is awesome and has literally saved me so many hours of prototyping! Thank you!
But, if you have any spare time, I would really appreciate it if you could show the steps required to add a new functional weapon as a continuation of the “Add new object” section of the user guide.
Thanks for the kind words!
What kind of weapon do you have in mind? Guns should most likely pretty simple creating childs of the gun class coming with the template. Melee is a whole different story.
Essientaly, I’m just confused about how to get the gun class to tell the weapon class that there’s a different projectile and particle system attached to a weapon.
- Thanks for the quick reply
Hi there! this is a great template I did purchase it although it
s for top view twin stick shooter, I know it can be modified (everything is possible) to third / first person shooter, I did try different things but still got stuck, I think it
s a bit tricky and a lot of things need to be changed but im still trying, can you give me some ideas please? I suppose that i
m not the only one interested in this modification, Thank you !
There is a multicast event SpawnProjectiles within BP_Gun. Currently its locally spawning projectile actors just for visual purposes. This is just meant to be a placeholder. You will most likely want to change this event directly within BP_Gun (or override it in the child classes) and spawn your particle system there. You won’t need its input parameters any longer.
Thanks! So I would try the following few steps:
- Shorten / rotate the spring arm component the camera is attached to within BP_PlayerCharacter so it fits your needs.
- Change the rotation of the spring arm component from Absolute Rotation to Relative Rotation.
- Within EventTick of BP_PlayerCharacter remove the call to FindAndSetRotation (and remove that event) and replace this with your desired way of rotating the character. Most likely you want to use the controller rotation here? Copy & pasting the part from the respective template should do the trick here.
- Change the InputAxis events MoveUp & MoveRight to your needs. You may want to rename MoveUp to MoveForward. Copy & pasting the part of the respective template should work here aswell.
- Change the FindActorToInteract to your needs. Currently it traces a sphere from actor location into actor direction. In FirstPerson / ThirdPerson you’d rather want to trace from actor / camera location into camera direction.
Please note that the example map will most likely not really work / look ugly once you’re not using the TopDown view anymore.
I am currently in the process of making a top down shooter. The thing I can’t seem to figure out is how you created the see through the roof of buildings part.
I did not and will not be buying your pack because those things are already in my project. I don’t know if you would like to share only that small portion of code or if you would be willing to create a tutorial on how to create such an effect.
Hey Peepeeee, thanks for the help with the weapons. I have one more question now, I’ve set up different weapon types / projectiles / animations according to weapon types. But I’m wanting to add augmented weapons, aka add a ‘ice’ elemental effect to your weapon. And I was hoping to use the format string function to change the name. I’m wondering if dynamically changing names of specific instances of the item is something your inventory system can cater to?
I am using a combination of DitherTemporalAA, SphereMask and a VectorParameter for the player position as OpacityMask of the roof’s material. That’s basically it. Just a couple of nodes.
This isn’t directly possible due to multiplayer reasons. That would be problematic to replicate. You could implement a workaround just like stacking of items works. However I recommend to use a different item for each augmented version of your weapon and when one is adding an elemental effect you swap the items out. To avoid possible causes of trouble I would create the augmented version as child class of the original weapon, leaving everything as it is (and using the same DataTable row) and simply overriding the respective function(s). That way this is also done pretty quickly. The following image hopefully clarifies what I mean: