x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Blueprint branching error

EDIT2: Question has changed to being about collisions rather than blueprint. I will post a new question about it.

ive been using the blueprint visual scripting guide from packt so i have an error where im using cast to first person projectile and then connecting to branch. if the condition is false it reduces the enemy health by one using an int-int node. if true it plays a sound emitts a particle and destroys the actor. problem is that the branch is always true even though the health is set so the condition must be false first.

EDIT: Not sure but i may have figured it out. some help still needed. So originally the setting on the enemy collision component was pawn. This meant the bullets were ignored so i changed it to BlockAllDynamic.This worked. the bullets were working BUT if i edit the blueprint a little the enemy sometimes strafes the bullets, meaning they are like all the other objects. i think it may be that the enemy is actually bumping into the bullet more than once. Can someone help me with fixing this. I am using the FPS blueprint template usign the standard projectile. Thanks alt text

Product Version: UE 4.10
Tags:
untitled.png (476.5 kB)
more ▼

asked Jan 09 '16 at 10:32 PM in Blueprint Scripting

avatar image

ahuss
84 7 10 13

avatar image SterlingY Jan 09 '16 at 10:59 PM

Before you run this for the first time, Enemy Health is set to 2 or more? Have you added a PRINT node to verify the value of Enemy Health prior and/or after the branch node?

avatar image ahuss Jan 10 '16 at 12:04 AM

Hi, Yes verified the enemy health is set higher than 2. set it at 10 yet on the first hit it would branch to true. didnt know about the print log but using it i found that regardless of the amount of times i fire a shot branch just counts down. i.e. if the health is at three the output from convert bool to text, print text prints out 2 false 1 true. if health is set at 10 it prints out 9 false and 1 true. all from just on shot

avatar image ahuss Jan 11 '16 at 12:10 AM

any body anything

avatar image jayice Jan 11 '16 at 12:21 AM

Ahuss,

From the graph you have posted, your only going to hear the sound, and the particle emitted. The other two conditions (i.e. The cast being false, and the If statement being false) do nothing that is "visible". The way the blueprint is set up.

if the cast is false, nothing occurs and the false cast is ignored if the enemy health is greater than 1, then the enemy's health is only decremented, till it gets down to the point that it is less than or equal to 1, then the sound and emitter fire,

I'm not sure what you are expecting to occur that is not happening.

Jay

IceWare

avatar image ahuss Jan 12 '16 at 04:32 AM

Hi thanks for your reply jayice, I believe the issue has changed. The problem is that what is happening now is the enemy actor will continuously touch the projectile and then be destroyed. the projectile is the standard projectile and it should be destroy once it applies its impulse as its blueprint defines

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question