I want to make something simple.
like a 2d game were, a enemy coming at you from both side.
And your player is in the center of the screen fighting them off.
My problem is that, I cant get it were you hit a enemy or enemy hits you.
Some reason, I cant add a command in player blueprint of a character from a blueprint library.
Have you set “Enable input” from the player controller, (if the action button is creating an event on the player character).
Or use a “cast to” node to the character, (if the action button is creating an event on the player controller).
I cant seem to find Enable input in the player controller?
You said “cast to” what node? character?
I am so lost in this.
All I want to know is there a way to have the 2d enemy overlap My character, and send a command that if my character fight stance is on or off.
If on the I want my enemy to destroy it self and spawn again.
If off I want my character to destroy him self.
I hope this helps?
And thanks for the help you gave me.
Hope to heir more help from you.
The hit to my character and killed it, works.
But my character hit to kill it, did not work.
I be leave it is because I did not add that one command into the Branch that would have made it true or false.
If you can till me how to make that?
Then I can test what you gave me.
Hope to heir from you.
In your character blueprint. Create a bool (yes or no) variable called “Battlestance” or whatever you feel like calling it.
Set it true when entered in battle stance, and set false when left the battle stance.
Now that can be referenced as the one you have trouble making
On the enemyBP try dragging a blue pin out from the “As charnew” and choose “get battlestance”
You can also try to replace the “Get player character” with “Get player pawn” or “get player controller” and see if that helps.
The “get player…” depends on which type it is that contains the informations. It is quick to run through and test them all, so shouldnt be a problem to find the right one.
Don’t know what you are doing wrong. THis took me 30 secs to create.
But, to the left of your “Cast to node” is where you INPUT into object “Get player character” OR “Get player pawn” OR “Get player controller”. Only one of them should/can be input at a time.
In your output you left click and DRAG off the blue “As charnew” pin. Now the menu will pop up, and in this you can type “Get battlestance” and it should pop up.
This menu is different than the one you receive when you just right click somewhere in the screen, as this one picks up on relevant info from the item you dragged a pin off.
This should work. (I get a compilation error as it is not a player character in my game.) And ofc. remember to compile
I found out it was the SpawnActor that was doing it.
Now trying to figure ways to prevent that.
By taking it out.
When I get hit I spawn in the same area as the monster?
But when I hit the monster I still spawn in that area with the monster?
Tweaking it at the moment.
I will let you know how it go.
Thanks for all your help.
YOu spawn in the same area as the mosnter, because earlier when setting spawn transform the “get player location” was self which is the monster. Here you must insert where you wish to spawn instead. Make one for monster, and one for player to get them spawning different places
What I am trying to do here, if enemy is overlapping the character it will make the Firsttouch bool turn on.
But if the character weapon is out, called Battlestance bool turn on.
It would destroy monster g1 and spawn a new one at location.
Same thing with the Player Blueprint.
Only problem I am having, is the bool are not working with the branches.
What it looks, all the branch is not working with the bools?
What am I doing wrong?
I just want to send a bool from other blueprint to level blueprint.
If you can see what I am doing wrong, let me know.
I hope to here from some one soon.
Thanks