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"

Storing a variables current amount - 3rd person

So I have made a working 3rd person zoom similar to this one https://www.youtube.com/watch?v=-Uzzp6-QJpA

However I am trying to take it further and allow for a toggle 1st/3rd person view. It would simply switch between the 3rd and 1st person instantly on button click, no zooming. Thing is I also want to be able to save the current zoom amount before going 1st person so when I go back into 3rd person it is the same zoom as it was before I entered 1st person. Ideas?

Thanks

Product Version: Not Selected
Tags:
more ▼

asked Sep 05 '14 at 05:39 AM in Blueprint Scripting

avatar image

Wicked
106 13 22 23

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

1 answer: sort voted first

So I figured out how to store the data, I added a float variable setter node at the end of each of my InputAction zoom formulas, it would only get activated if that current InputAction formula was activated. This always kept my stored zoom data current. I then Created another InputAction for the toggle which checked to see if my current zoom was < my minimum allowed zoom. If it was, that meant I was in 3rd person and so the formula would toggle to 1st.

If it wasn't then it went through another branch to check if my stored zoom was <= to my minimum zoom. If true I made a default variable that would reset the 3rd person zoom to what ever the default was set to; Since the stored zoom would be equal to the first person zoom it was necessary to have a 3rd person fall back, otherwise you wouldn't be able to reenter 3rd person using the toggle action only the zoom (this can be set to what ever you/player wants of course). If false then I applied my stored zoom to my current zoom.

What a headache hope someone gets some use out of it. I also highly modified the above tutorial though and there was a lot of extra troubleshooting. So anyone who attempts this keep in mind of your float variable signs on your conditions. They make all the difference.

Goodnight!

more ▼

answered Sep 05 '14 at 10:04 AM

avatar image

Wicked
106 13 22 23

(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