Announcement

Collapse
No announcement yet.

Referencing Instances; Help needed Please

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

    Referencing Instances; Help needed Please

    Hey there!!!

    So i have my character who has a linetrace; when it hits my door, it sends a custom event to it.

    Now, the DoorBP receives the event and starts doing its things (play sound and open/close the door).
    Ok till now.

    Now, i need tons of doors and i want them to be instanced... for optimizing.


    So i instanced a lot of the doors: Now in a BP i want to receive the same custom event... but instead of opening just one door (the one inside the bp), i want it to make references of the instance beng hit.. so i can tell him wich instance of the door it should open or close.

    is there a wy to do this?¿ Someone said to me that i just needed to create a Int Variable in a Bp, so it knows wich instance should move.
    But.. i dont know how to do this.
    I cant reference the Hisma object, or the instances... or anything..

    Anyone can help me, please?


    Thank you in advance

    #2
    Well if you have an array of actors (doors) my first thought would be to use the "get all actors of class" node (Which would supply an array of all doors), then you can just use an array get/find node, wouldn't that be easiest for a reference?
    My Patreon page (UE4 goodies!)

    Comment


      #3
      Well, the thing is when i use "get all actors of class" i cant get the doors actor wich holds all the instances.

      I must say this: im using the "instancetool" from the market place. With it i can place the instances where i want in the editor.

      So i get my door mesh in the editor, and the instance tool makes it a "Hisma" actor. Now i can create new instances of it, just dragging in the editor. Selecting this Hisma actor, im selecting all the instances; but if i use the edit mode of Instance Tools, i can edit each one in the way i want (rotate, place etc..)

      But as i said, i cant reference (or i dont know how to) to this Hisma actor...

      Comment


        #4
        I don't know that Instancetool. But if i understood it correctly you only have one hisma actor you need to use - so just create a reference for that?

        here is a little reference tutorial, maybe that helps you...

        https://docs.unrealengine.com/latest...ts/Blueprints/
        My Patreon page (UE4 goodies!)

        Comment


          #5
          Thank you a lot! I finally got it working, i have a set of instanced doors and they open/close ... when i enter a triigger bp each one has.

          Now i would like to change that, so it happens when i use left click (wich makes a linetrace).

          How do you send an event to a instance? Maybe... on break hit result (after linetrace) - hit item instead of Hitactor? But i dont know how to setup that

          Comment

          Working...
          X