pcg graph "if else"

Is there a “IF ELSE” inside a PCG Graph?
I have a float variable paased from a blueprint.
I wish to check it. If it’s < 1000 use first Static Mesh Spawner. If it’s >= 1000 use second Static Mesh Spawner.
And if that is possible can we go for 3 options?

If (variable < 1000)

else if (variable >= 1000 and variable < 2000)

else

Hi,

I didn’t get to play much with PCG yet but isn’t it something that can be achieve with select:

What I did was:

  1. Created 3 boolean variables at my blueprint class (lvl1, lvl2 and lvl3) - “false” by default
  2. Checked the discance between the player and the base.
  3. Based on that distance I set one of the to “true”.
  4. Used the “Set Bool Parameter” with “Graph Interface” comming from my PCG componend in the blueprint. (PCG → Target – Graph Instance)
  5. Finaly at my PCG I used the boolean variables with output to “Branch”-es and depending on the true/false wend to Output A or Output B. Had to do them in chain.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.