x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Can't understand what is wrong with my blueprint movement script

I was working on simple rts game prototype for some time and I stuck at the movement step.

First I made a simple unit selection script and a unit blueprint, which worked nice! Secondly I tried to do right mouse movement a-a-a-nd..Im stuck.

When Im pressing right mouse button I can see (with the help of breakpoint) that my "cast to landscape" and "foreach loop" + "move" command is working. Also I get some location info from "Break hit result". But, after i pressing "step" it shoots again all of this blueprint chain with location vector = zero. What is wrong?? Why it startes again? alt text

Product Version: Not Selected
Tags:
rmbclick.jpg (159.5 kB)
more ▼

asked Nov 19 '14 at 04:59 PM in Blueprint Scripting

avatar image

Araxnid
25 6 5 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey Araxnid-

If you are trying to get movement to a location based on mouse click you may want to take a look at the MyController blueprint in the Top Down template. Setting the trace channel to visibility rather than camera and having a "Simple Move to Location" rather than "Move" are a couple of differences that may help to look into to get the behavior you're after.

Cheers

Doug Wilson

more ▼

answered Nov 19 '14 at 07:30 PM

avatar image Araxnid Nov 19 '14 at 08:31 PM

Nope! This did not help me at all =\ So, I'll try to rewrite my problem with the help of few screenshots. First screenshot show what happens when I click right mouse and everything is cool. I get some location coordinates that goes to my unit move blueprint function. But, after I click "Step" its doesnt go into "Move" function, it just bump me breakpoint at "Move" again with zero location coordinates. My "Move" function is a "Simple move to location" just in another blueprint of my unit. Its some sort of "cast" as I understand.. The other section with "selection decal" works perfect (with the help of left mouse)

break1.jpg (103.6 kB)
afterstep.jpg (111.7 kB)
avatar image Doug E ♦♦ STAFF Nov 20 '14 at 03:44 PM

When adding a breakpoint to the "Simple Move to Location node", pressing step will return me to just prior to when the input button is pressed (finished processing and awaiting further input). Could you post your "Move" function so I can see how it is setup

avatar image Araxnid Nov 26 '14 at 03:54 PM

Oh! I made it! After several days of crying and praying.. My mistake was in call to "Simple move to location". I was using "player controller" instead of "pawn controller". (This whole "controller" concept is little mind blowing) Now its working perfect!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question