And how do you that? Sorry I don’t know.
The expose on spawn option is right there.
After you click it, you go to the level, select the spawner blueprint, and in the options to the right you find and set the variable.
It will have an eyedropper next to it which you can conveniently use to select the item right from the level blueprint.
Okay now this is what I’ve done.
Spawn Enemy Event:
Tick Event:
BeginPlay Event:
BP_Spawner in Gameplay Level:
BP_Spawner2 in Gameplay Level:
V_Spawn_Loc:
F Spawn Counter:
F Spawn Interval:
Enemy is not spawning now : (
Why shouldn’t I?
If you haven’t already, I highly recommend you follow the excellent tutorial series created by Wes Bunn and posted by MostHost_LA above. Then, do this Twin Stick Shooter course next. It covers a lot of detailed topics and will probably make things easier for you. First log in to your Epic Games account and then click on this link: Epic Games
However, I recommend the following:
Instead of using C++ to complete the “Base Character Class” video, just do it using only Blueprint. For some people, that might be necessary if you don’t want to install bloated Visual Studio software just for some simple items. NOTE: if you do NOT plan to install Visual Studio, do not follow the early steps in this video where Zak creates the C++ class, otherwise you will render all your work up to this point un-openable! So to help you do this video using only Blueprint, I have re-written David’s instructions (from YouTube) the best I can and included his original 2 images from the YouTube comments section in this link: Twin Stick Shooter BP Version - Google Drive
Ok guys can you help me what should be the Object Wildcard for the BP_Spawner in my BP_Enemy (Using Cast To BP_Spawner)
Probably a “get object of class” or something similar.
Maybe add a gameplay tag to the spawner and use that like the spawner code did for the spawn spots…
So I’ll try get object of class. One min
You really have to learn how to Google.
I have a gameplay tag for BP_Spawner and BP_Spawner2 in world as Spawn.
What I just want to do is that call the Spawn Enemy event from the BP_Spawner in BP_Enemy. Cause when I spawn the enemy in the BP_Spawner, it doesn’t spawn where I want it to (outside the map)
References:
This is where the Aa Spawn Spots is filled.
This is the condition so that Spawn Enemy gets activated.
This is the Spawn Enemy event.
BP_Spawner and BP_Spawner2 in the level has a tag called Spawn.
This should work according to me, but I don’t know what problem happens. The Enemies still spawn outside the map and not the Location I’ve instructed them to.
Okay so I figured out what is the problem but do not know how to solve it.
So basically there is nothing wrong with the Spawn Enemy event. But the problem is that when in the Tick event it tries to Cast To BP_Enemy and check whether the health is 0 the Cast Fails so the Spawn Enemy event doesn’t get activated. I saw a lot of tutorials on YouTube also saw the UE4 documentation, all of them tell that I should be using Get Player Character as the Object Wildcard for Cast To BP_Enemy. But it doesn’t seem to work.
@Limanima @AJ_Graphix @SunbeamOut Hey can you guys tell me why the Cast To BP_Enemy is always failing? ^^^
That’s because the enemy is not the player character.
So what should it be replaced by in the Object Wildcard?
I’m sorry to say this, but there are things that you must figure out by yourself, you cannot wait for people around here do the development for you. We sure like to help, but help is not the same as doing everything.
There’s nothing on YouTube and in the Documentation of Spawning Enemies. I have seen a lot of tutorials on YouTube and in the Documentation - they are all related to spawning the Player or restarting the game. Please tell me how the Object Wildcard works. Couldn’t find anything helpful in the Documentation.
Look up the definition of wildcard.
Then extrapolate an answer.