Announcement

Collapse
No announcement yet.

Get actor selected in editor

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

  • Get actor selected in editor

    Playing with the trick of the custom brush that Chosker told me:

    https://forums.unrealengine.com/lega...rved-in-editor

    there are some way to know the selected actor in editor, or to know if determined actor is selected?

    I have found a native function called "isselected()" in actor.uc, but I don't know how use it.

    I can use some variable in the actor so the brush can find it, but it will easiest getting the selected actor.

    Also, there are some way to know the camera position and rotation in the editor?
    Provisional blog: http://cobaltudk.blogspot.com.es/
    Videos: https://www.youtube.com/user/cobaltudk
    Facebook: https://www.facebook.com/babylonprojectgame/

  • #2
    For the camera,if you double click it, in the camera actor properties>movement tab you will have th location and rotation.

    Comment


    • #3
      Umm... I don't see any camera in the editor. I use Calccamera in the player class. Anyway, the camera must be found by the function in the brush.
      Provisional blog: http://cobaltudk.blogspot.com.es/
      Videos: https://www.youtube.com/user/cobaltudk
      Facebook: https://www.facebook.com/babylonprojectgame/

      Comment


      • #4
        O,i ment that you can see this in the properties window when you double click the camera in the level.But not sure on how to do it the way you want.

        Comment


        • #5
          Not exactly, using the Chosker trick, the custom brush, when click in their button on the editor, this function is executed:

          event bool Build()
          {
          local WorldInfo WI;
          local edificio E;

          WI = class'Engine'.static.GetCurrentWorldInfo();

          foreach WI.AllActors(class'Edificio', E)
          {
          if (E.location == vect(0,0,0))
          {

          etc.

          in that way the function finds an actor, "Edificio", but only if it is located at 0,0,0. I want to replace this with the selected actor in editor, so I can place "Edificio"s in any location in the map and the custom brush function works only in the selected one.
          Provisional blog: http://cobaltudk.blogspot.com.es/
          Videos: https://www.youtube.com/user/cobaltudk
          Facebook: https://www.facebook.com/babylonprojectgame/

          Comment

          Working...
          X