No announcement yet.

Help with drag building

  • Filter
  • Time
  • Show
Clear All
new posts

    Help with drag building

    hello, pls check the attached image to see what i want to do..

    Click image for larger version

Name:	help.png
Views:	1
Size:	12.9 KB
ID:	1196234

    i want to be able to do something like drag building..
    i need help how.

    currently i have thought out this, but getting confused..


    Left Click : Spawn Actor 1 : [var: Actor 1 Location]

    When Holding Left Click
    Current Mouse Location : [var: Current Mouse Location]

    > [Actor 1 X Location] distance to [Current Mouse X Location] (get Length) : [var: XX]
    > [Actor 1 Y Location] distance to [Current Mouse Y Location] (get Length) : [var: YY]

    If XX distance is greater than YY
    Then Lock Line to X axis
    Hold Y coordinate (Because player is dragging to Left or to Right )
    Then Lock Line to Y Axis
    Hold X coordinate (Because player is dragging to Up or to Down )


    now im stuck here, how do i let the blueprint to know how many to spawn cubes and what location...

    im using 32 pixel / 32uu for the gridsize
    Last edited by yanzco; 10-02-2016, 12:14 PM.