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. 

How to make different numbers of ammos for different levels ?

Example: I want to make a shooter game, which contains 50 or more level .so i want to make that my first person player is having 10 ammos in 1st level, 20 ammos in 2nd level .....and so on., and i am using line trace by channel in my game. please help me.

Product Version: UE 4.18
Tags:
more ▼

asked Feb 25 '19 at 10:13 AM in Blueprint Scripting

avatar image

VIROH
1 1 3

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

1 answer: sort voted first

I think you should have a look at the basic of unreal first, cause storing variable and changing the value is one of the most common thing.

Here a introduction to blueprint: https://api.unrealengine.com/INT/Videos/PLZlv_N0_O1gY35ezlSQn1sWOGfh4C7ewO/EFXMW_UEDco/index.html

So first theres no specific way of doing what you asking for, I can think about 3-4 way of doing this quickly. First way would be to simply increase by 10 the variable «ammos» store in your «Game Instance» object, which is a persistent object. That mean you can easily access this from any level OR blueprint.

Because I got the feeling you are really new to unreal, here a video that explain how to use «Game Instance».

https://www.youtube.com/watch?v=5w594D3qtLs

Hope it help!

more ▼

answered Feb 25 '19 at 10:50 AM

avatar image

Xosh project
356 3 6 15

avatar image Nebula Games Inc Feb 25 '19 at 12:54 PM

I have a very beginner friendly tutorial series that will walk you through things like creating variables, casting, save/load, persistence between levels etc that you may find useful in addition to the above resources. As the above answer suggests there are many ways to do what you are asking.

https://www.youtube.com/playlist?list=PLyu-W38DvZhqByAoeva1jewB5s78zQHIy

avatar image VIROH Feb 25 '19 at 02:10 PM

Thanks for help

(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