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. 

Give unique index to instance of Blueprint

Hello everyone !

So, my question is, I think, quite simple. I've done a checkpoint blueprint for my racing game, and I need to give to each copy i make in the world a unique index, wich is X+1 each time i duplicate my blueprint. I thought about a LastIndex + 1 in the construction script, but thi does not seems to work.

Also, I'm trying to change only the appearance of the last one, to symbolize it's the finish line, and tried with a Last Index, again on the construction script so I can see where it places it, but it does not seems to work well. If I add this part of code after placing a bunch of my checkpoint, the last one is indeed changed, but if i then duplicate this last one, every other one duplicta from this one will have a changed appearance too.

Thanks for anyone who will be willing to help a stupid guy like me, because i know it's a stupid issue ^^'

Thanks again.

Product Version: UE 4.21
more ▼

asked Mar 05 '19 at 10:18 AM in Blueprint Scripting

avatar image

62 2 4 5

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

1 answer: sort voted first

You need something to do the counting, how about this:

alt text

Image from Gyazo

capture.png (59.7 kB)
more ▼

answered Mar 05 '19 at 11:52 AM

avatar image

14.7k 76 25 61

avatar image tbeaugelin Mar 05 '19 at 12:04 PM

Okay, I'll try that? Weird, because it's what I tried and it did not gave me the results I wanted, but i'll re-try that :)

avatar image tbeaugelin Mar 05 '19 at 12:15 PM

Okay, so, I tried it, and it, in fact, work, but it's not as flexible as I'd like to. I would like to able to remove one object from this list, and all the index re-order themself correctly (If I have 10 items, and remove the 4th one, the index will not reorder themselves to finish at 9.). How would you go about it ?

(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