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. 

Delegates Where to "pick up" signature?

I have a qustion be may a "dumb" qustion but here goes, delegats are functions / events i can hook into.?

AActor you have the

 /** Called when the actor is damaged in any way. */ 
 UPROPERTY(BlueprintAssignable, Category="Game|Damage") FTakeAnyDamageSignature OnTakeAnyDamage;

Concept is somewhat new to me . Are they for hooking functions so i can "Pick up" a event on one actor from the second? The documentation is somewhat confusing regarding this and the wiki is a bit over simplefied.

You declare them as so.

 DECLARE_DYNAMIC_MULTICAST_DELEGATE_FourParams( FTakeAnyDamageSignature, float, Damage, const class UDamageType*, DamageType, class AController*, InstigatedBy, class AActor*, DamageCauser );

And add them as so OnActorBeginOverlap.AddDynamic(objectPtr, &Class::FuFunc); And now when ever the FuFunc is called the event will trigger? But I dont understand what happens where do i pick up the signature?

For refrence am using https://wiki.unrealengine.com/Event_handling https://www.unrealengine.com/blog/network-tips-and-tricks https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Delegates/index.html https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Reference/Functions/index.html

Am sure its not that hard once you manage to understand whats happening under the hood. Thanks in advanced.

Product Version: Not Selected
Tags:
more ▼

asked Apr 17 '14 at 05:04 PM in C++ Programming

avatar image

WCode
508 43 44 72

avatar image WCode Apr 18 '14 at 05:51 PM

Anyone have the time to answer this?

avatar image WCode Apr 19 '14 at 05:53 PM

So no one knows how to do this?

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

1 answer: sort voted first

Are they for hooking functions so i can "Pick up" a event on one actor from the second?

Yes, though they're not limited to actors.

And add them as so OnActorBeginOverlap.AddDynamic(objectPtr, &Class::FuFunc); And now when ever the FuFunc is called the event will trigger?

You've got that backwards, whenever OnActorBeginOverlap is executed objectPtr->FuFunc() will be called with the parameters you passed to OnActorBeginOverlap.Execute() or OnActorBeginOverlap.ExecuteIfBound(). If you call objectPtr->FuFunc() directly it will have no effect whatsoever on the delegate.

But I dont understand what happens where do i pick up the signature?

I don't understand what you mean, the signature of the delegate must match the signature of the function you hook up to the delegate.

more ▼

answered Apr 20 '14 at 10:33 AM

avatar image

enlight_2014
589 30 14 38

(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