Announcement

Collapse
No announcement yet.

Making the player invincible in Shadows (TriggerZones)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Making the player invincible in Shadows (TriggerZones)

    I've made an enemy chase the player using OnSeePawn and Casting on my player character. However, I'd like to make the PawnSensing to a minimum when the player enters a Shadow zone where a Trigger Volume has been placed.

    This is my PawnSensing code that the enemy uses to follow the player:

    Click image for larger version

Name:	Screen Shot 2015-02-20 at 12.28.11 AM.png
Views:	1
Size:	135.2 KB
ID:	1144471

    I added a Trigger Volume to the shadowed areas such that when the player enters them, the field of vision of the enemy can be reduced. However my blueprint doesnt work:

    Click image for larger version

Name:	Screen Shot 2015-02-20 at 12.29.41 AM.png
Views:	1
Size:	100.8 KB
ID:	1144472

    My blueprint is obviously wrong, which part is incorrect folks?

    #2
    Add a visible/editable integer "inShadow" variable to MyCharacter, when the player enters a shadow you increase the value by one, when he exits the volume you decrease the value by one.

    In the On see pawn, you get the inShadow Paramter from the character, after you cast it to MyCharacter.
    get the inShadow from the MyCharacter and do a comparison.
    inShadow == 0.
    Connect this output to a gate, connect the true output from the gate to the AI Move To node.

    if you havent entered a shadow or if you have entered and exit the same amount of shadows (safty if moving from shadow volumes that intersect) then the inShadow integer is zero.

    Comment


      #3
      Originally posted by TheSpaceMan View Post
      Add a visible/editable integer "inShadow" variable to MyCharacter, when the player enters a shadow you increase the value by one, when he exits the volume you decrease the value by one.

      In the On see pawn, you get the inShadow Paramter from the character, after you cast it to MyCharacter.
      get the inShadow from the MyCharacter and do a comparison.
      inShadow == 0.
      Connect this output to a gate, connect the true output from the gate to the AI Move To node.

      if you havent entered a shadow or if you have entered and exit the same amount of shadows (safty if moving from shadow volumes that intersect) then the inShadow integer is zero.
      That sounds great Could you guide me with the Blueprint, good sir? I'm new to it so I don't quite know which methods to call Thank you very much for the answer

      Comment


        #4
        I can't. But now atleast you have the theory and somewhere to begin your learning.

        Comment


          #5
          Okay I shall look in to it. Thank you very much for the answer, sir

          Comment

          Working...
          X