Hia. I am super new to Blueprint scripting (in fact, this is my second Blueprint) and I just spent the last 4 hours trying to make an object rotate 90 degrees. That is all I want to do… and after 4 hours of struggling I am here to ask for help…
What I want to do is say “When the state is Deactivate, rotate the x till it is 100 then set the state to Inactive” and also “When the state is Activate, rotate till the x is 0 then set the state to Active”.
That is it!
I found that if I do a while loop to test the current rotation against the hard coded vector then I end up with 0 the one frame and the 100 the next. I only see the result after the while has completed it’s loop. Okay, so clearly doing a while inside a normal function is not the answer. So I added the enum switch to the tick event and now I can rotate the object but after I rotated it I can’t seem to take the rotation and ask: “Is this now 0,100,0 or not?”. It seems after the rotation I need to CALL something, not test for something so I have absolutely no idea how to tell my rotation that it is now done and can stop rotating…
How would I do that? Could someone please give me a simple Blueprint (using int is fine) that just does this:
If var == 0, rotate from 0,0,0 to 100,0,0 over 0.5 seconds.
If rotation is 100,0,0, set var to 1.
If var == 1, rotate from 100,0,0 to 0,0,0 over 0.5 seconds
if rotation is 0,0,0, set var to 0
That simple thing has taken me over 4 hours so far and it is driving me insane. I am trying to see if I can work in Blueprint or not but, honestly speaking, so far I can’'t understand why everybody doesn’t just code in C++. I’m sure this entire Blueprint would have taken me 10 minutes in C++
What am I missing? Why is this so darn hard?
Thanks in advance for any assistance