Announcement

Collapse
No announcement yet.

Adding targets to the array and remove then?!?! (help+images)

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

    Adding targets to the array and remove then?!?! (help+images)

    Hello Guys, I m never play with ARRAY before and right now in the middle of a roadblock.
    I got a NPC that shots another NPC. For this I have attached ChildActorBP with Turrets inside SHIP A and trying to make then shooting at SHIP B; I have try this calling ALL ACTORS OF CLASS and make a VARIABLE for this and make the actor "target";

    I TRY THIS
    Click image for larger version  Name:	DWWDEDW.jpg Views:	3 Size:	90.2 KB ID:	1617247And read from this ARRAY...

    .. and update range for shooting with the TICK with this...

    Click image for larger version  Name:	DWDAW.jpg Views:	1 Size:	104.3 KB ID:	1617249


    This works for ths first TARGET; When this target is "destroyed" I got a lot of errors with this..
    Click image for larger version  Name:	err.jpg Views:	1 Size:	216.9 KB ID:	1617252Click image for larger version  Name:	23213.jpg Views:	1 Size:	450.4 KB ID:	1617250

    Then I try this:
    Click image for larger version  Name:	asdasdasd.jpg Views:	1 Size:	120.8 KB ID:	1617253



    I try to SHUFFLE or REMOVE to ADD again with no success... I super noob sorry and when I try to do thie with no ARRAY, when the first target is destroyed the guns stop looking for another target...
    What Shoud I do?! 36hours on that.. :P

    Thank u
    Mauro
    Attached Files

    #2
    You don't seem to be adding anything to the array apart from the last element, I think. Start with this and see if things improve:

    Click image for larger version  Name:	Capture.PNG Views:	1 Size:	22.8 KB ID:	1617263

    Comment


      #3
      Originally posted by Everynone View Post
      You don't seem to be adding anything to the array apart from the last element, I think. Start with this and see if things improve:

      Click image for larger version Name:	Capture.PNG Views:	1 Size:	22.8 KB ID:	1617263
      Wheel, this could help me! Thanku . But I still in the middle of roadblock... I can add to array the target using get all actors from a class. But when he gets destroyed the array seens do get lost and I need to clear de array and try to get new target to array again.. doing this I got that errors... like this:

      PIE: Error: Blueprint Runtime Error: "Accessed None trying to read property CallFunc_Array_Get_Item3". Blueprint: RailGunAttackCycleTarget Function: Execute Ubergraph Rail Gun Attack Cycle Target Graph: EventGraph Node: Ramificação


      Best regards!
      Mauro
      Last edited by mgondim; 05-09-2019, 03:40 PM.

      Comment

      Working...
      X