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"

Recurive function propegates through actors

Hello i have this system setup so that a platform actor has 4 macro variables in it which contain a pointer to an adgesent actor (if some side doesnt have an actor connected defult value is nullptr) it also has an Index value(if i player standing on it the index is 0 )

alt text

in each one of the actors seen above i want to have a value for How far is the actor with the Index 0 by saying how far i mean how many steps to adgesent platforms i havve to make in order to reach Index 0

To My Question : i had an idea to make a recursive function if one of the actors concted has the Index 1 the function will return 1 if the index is not 0 but actor is found(lets call him actor* a) i want for the function to call it self to run on the adgesent actor and then add 1 to the result

is it even possible ??

Product Version: Not Selected
Tags:
capture.png (576.2 kB)
more ▼

asked Mar 26 '18 at 12:20 PM in C++ Programming

avatar image

VitelAD
1

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

0 answers: sort voted first
Be the first one to answer this question
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