Announcement

Collapse
No announcement yet.

(39) Rama's Extra Blueprint Nodes for You as a Plugin, No C++ Required!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to Unload Level Instances

    Originally posted by Dakraid View Post
    I see now, watching the video suggested for me you were asking for the whole effect rather than a specific utility used to create that. Now that you formulated it it does make sense asking for it here, sorry for my confusion ^^
    Thanks for helping out Dakraid!

    Welcome to the forums tundra_cooo!

    So you mean the ability to paint on triangles of a mesh, for the blood effect, not the ability to warp them real-time, right?

    Originally posted by ScottBrown View Post
    How do you correctly unload? I am trying to do "Unload Stream Level". If I do <LEVELNAME>_VictoryInstance_<INSTANCENUMBER> Unreal crashes. If I do UED_PIE_0_<LEVELNAME>_VictoryInstance_<INSTANCENUMBER> it does not unload. Not sure if there is an equivalent Victory Unload I should be using instead.

    I have an actor that I use to create my map instance and I store the string there so I can retrieve it later on "Event Destroyed"
    Welcome to the forums Scott Brown!

    You dont have to store a string

    You should store a reference to the Level instance that is created, which I pass out of my Load Level Instance node.

    Then when you are ready to unload that level, simply set the variable ShouldBeLoaded to false by dragging off of your saved reference to that level instance.

    Code:
    LevelStreaming.h
    
    /** Whether the level should be loaded																						*/
    	UPROPERTY(Category=LevelStreaming, BlueprintReadWrite)
    	uint32 bShouldBeLoaded:1;
    
    	/** Whether the level should be visible if it is loaded																		*/
    	UPROPERTY(Category=LevelStreaming, BlueprintReadWrite)
    	uint32 bShouldBeVisible:1;

    It's an uncommon design structure in UE4 to have it work this way but it works great!


    And it wont ever crash, and will find the exact level instance that you want



    Rama
    Last edited by Rama; 01-31-2016, 03:37 AM.
    100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

    Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

    Comment


      If returning and storing 'FName(*UniqueLevelPackageName)' from the streaming code,
      he can as well use the 'Get Streaming Level' node with that map name attached to Package Name input and set Should be Loaded to false from there.
      | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

      Comment


        Hi Rama! First of all: MANY MANY MANY THANKS FOR YOUR AWESOME WORK!

        Now... to my problem: When i try to pack my project using File -> Package Project -> Windows -> Windows (64-bit) i got the following message:

        Click image for larger version

Name:	Clipboard01.jpg
Views:	1
Size:	27.5 KB
ID:	1099676

        1) My "Build Configuration" is set to "Development".

        2) I Downloaded "VictoryPlugin.zip" dated October 14th, 2015 from here https://wiki.unrealengine.com/Rama%2...lugin_Download and i've started using your AWESOME plugin with ZERO PROBLEMS in the editor version of my project (even if a run the project as "Standalone Game" trough the Editor Play Button).

        3) I've tried to pack my project and i got the above message, so... i've found that i need the "VictoryPluginPackaged.zip" and i downloaded it (dated October 14th, 2015) from the same link as above.

        4) I've copied the "VictoryPluginPackaged\Binaries\" folder of the zip to merge with the "MyProject\Plugins\VictoryPlugin\Binaries\" folder.

        5) When i try to pack my project i got always the same problem as above.

        i'm working only with Blueprints and i don't know how to write in C++, compile, recompile, etc.
        I've seen you say "Because this is a plugin, you dont have to do any code compiling and can use my BP nodes in a content-only project!" in the opening post... so... i guess i'm doing something wrong...

        Any help?

        Comment


          You just need to have VS installed, you don't need to use any C++ in your project. So just install it and then it will work

          Rama, any advice on how you would suggest us (users of this plugin) to test our project in previews like 4.11 to find bugs in 4.11 before the stable version is released, since your plugin does not yet work with 4.11? And if I remove your plugin from my project, it crashes in startup, so that also won#t work... So at the moment I would have to manually remove all nodes I use from your plugin first and then remove your plugin, then create a copy of project in 4.11 preview and then test it, but that would take ages since I use so many different nodes from your plugin everywhere and its probably impossible for me to find them all..

          Or do you know an easy way to find nodes from your plugin? I wish they would be all named VictoryXYZ, but only some are.
          Easy to use UMG Mini Map on the UE4 Marketplace.
          Forum thread: https://forums.unrealengine.com/show...-Plug-and-Play

          Comment


            So... i have to install VS in any case.... ok, thanks... i'll try

            Comment


              Hello Rama!

              I am having some troubles with victory plugin and the consoles. I get some serious crashes with VP enabled.
              Is there a "special" way for me to compile it in order to work? Have you ever heard something like this before? My other plugin works just fine.

              Because of the NDA's i cant post here any more details. For any specific questions please pm me

              Thank you!!
              Last edited by Roccinio; 02-03-2016, 03:44 PM.

              Comment


                Hi Rama,

                I have been using your plugin with BPs successfully. However, I cannot create a C++ class that extends your BP Library. When I tried to do this, I got this error:

                "CompilerResultsLog:Error: Error D:\program files\Epic Games\4.10\Engine\Plugins\VictoryPlugin\Source\VictoryBPLibrary\Public\VictoryISM.h(9) : fatal error C1083: Cannot open include file: 'VictoryISM.generated.h': No such file or directory"

                I am using Unreal 4.10.2 at the moment. I cannot progress with my project unless I can access your plugin's functions using C++.

                I hope we can solve this issue.

                Thanks,

                Jamie
                Lead programmer of Kittens in Timespace, an independant game development studio based in south west UK.

                Morkanik - Top-down action adventure shooter

                Kittens in Timespace

                Comment


                  Originally posted by John Alcatraz View Post
                  You just need to have VS installed, you don't need to use any C++ in your project. So just install it and then it will work

                  Rama, any advice on how you would suggest us (users of this plugin) to test our project in previews like 4.11 to find bugs in 4.11 before the stable version is released, since your plugin does not yet work with 4.11? And if I remove your plugin from my project, it crashes in startup, so that also won#t work... So at the moment I would have to manually remove all nodes I use from your plugin first and then remove your plugin, then create a copy of project in 4.11 preview and then test it, but that would take ages since I use so many different nodes from your plugin everywhere and its probably impossible for me to find them all..

                  Or do you know an easy way to find nodes from your plugin? I wish they would be all named VictoryXYZ, but only some are.
                  Dear John,

                  Sounds like I need to provide a 4.11 build, though that makes my process of adding new nodes take even longer because then I have to upload an extra version on top of 1. editor 2. packaged and 3. media fire But Then I'd have to provide all 3 of those for 4.11 as well!

                  Supporting 2 engine versions by myself for free is so much work for me, I then have to do 6 updates every time I add any new nodes, as described above.

                  Unless I adopted 4.11 early... then anyone wanting to test my new nodes would also have to adopt 4.11 early...

                  Thinking about it...

                  Also I think 4.11 is coming out soon



                  Originally posted by Roccinio View Post
                  Hello Rama!

                  I am having some troubles with victory plugin and the consoles. I get some serious crashes with VP enabled.
                  Is there a "special" way for me to compile it in order to work? Have you ever heard something like this before? My other plugin works just fine.

                  Because of the NDA's i cant post here any more details. For any specific questions please pm me

                  Thank you!!
                  Yes do send me a PM with your issue with consoles



                  Rama
                  Last edited by Rama; 02-06-2016, 03:16 AM.
                  100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                  UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                  Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                  Comment


                    Rama's Victory Subtitle System, BP Access for Subtitles of SoundWaves in SoundCues

                    Click image for larger version

Name:	VictorySubtitles.jpg
Views:	1
Size:	233.5 KB
ID:	1099956

                    Dear Community,

                    It has come to my attention that there is no way to easily access the subtitles that are inside of SoundWaves which are played in SoundCues via WavePlayer.

                    For any AAA or indie project that wants to use UE4's Subtitle system this is actually a rather essential missing element of UE4 Blueprints!

                    I have developed a simple system to intercept the C++ delegate for subtitles played by UE4's C++ sound system.

                    I have exposed this for you in Blueprints!

                    Now you can use the subtitle data stored in Dialogue or SoundWaves easily in BP, at the time the sound is being played!

                    Click image for larger version

Name:	VictorySubtitles2.jpg
Views:	1
Size:	285.2 KB
ID:	1099957

                    I had to use my VictoryPC class to do this, because the C++ Delegate must be binded to a UObject, which prevents me from using just a static BP node.

                    ~~~

                    Usage

                    So to use my Victory Subtitle System:

                    1. In a C++ project you are best suited to extract my code form VictoryPC and add to your appropriate UObject or Actor class

                    2. In a BP project you should have your Player Controller extend my VictoryPC class which comes with my Victory Plugin.

                    3. See pictures for the rest!

                    ~~~

                    FAQ

                    When is Speech Finished?

                    Please note there is an easy way to know when the sound is finished by binding an event to the return value of my BP ndoe!

                    Sound Duration?

                    The total sound duration is called Cue Duration off of my Subtitle Event node.

                    Multiple Subtitles With Time Stamps for 1 Sound?

                    My system supports as many subtitles as you entered, and via my BP setup you can display the time stamp of each subtitle, accessing that info in order to visually display the subtitle at the right time.

                    You also get the total length of the speech sound being played.

                    Any Kind of sound?

                    You can play any sound you want with my node and if it has UE4 subtitles set via the appropriate asset (SoundWave or Dialogue) my OnVictorySubtitlesQueued Event will be called!

                    ~~~

                    C++ Code

                    Here is the C++ code if you wish to extract it easily into your own project.

                    This is all my own code for you, at no cost!

                    Code:
                    //Exposing the UE4 Subtitle system for Solus
                    // <3 Rama
                    USTRUCT(BlueprintType)
                    struct FVictorySubtitleCue
                    {
                    	GENERATED_USTRUCT_BODY()
                    
                    	/** The text to appear in the subtitle. */
                    	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=SubtitleCue)
                    	FText SubtitleText;
                    
                    	/** The time at which the subtitle is to be displayed, in seconds relative to the beginning of the line. */
                    	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=SubtitleCue)
                    	float Time;
                    
                    	FVictorySubtitleCue()
                    		: Time(0)
                    	{ } 
                    	FVictorySubtitleCue(const FText& InText, float InTime)
                    	: SubtitleText(InText)
                    	, Time(InTime)
                    	{}
                    };
                    
                    
                    UCLASS()
                    class VICTORYBPLIBRARY_API AVictoryPC : public APlayerController
                    {
                    	GENERATED_BODY()
                    
                    public:
                    	AVictoryPC(const FObjectInitializer& ObjectInitializer);
                    	
                    	/** 
                    	* When the sound is played OnVictorySubtitlesQueued will be called with the subtitles!
                    	* You can bind an event off of the audio component for OnAudioFinished to know hwen the sound is done! 
                    	*/ 
                    	UFUNCTION(Category="Victory Subtitles", BlueprintCallable, BlueprintCosmetic, meta=( UnsafeDuringActorConstruction = "true", Keywords = "play" ))
                    	UAudioComponent* VictoryPlaySpeechSound(class USoundBase* Sound, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f);
                    	
                    	UFUNCTION(Category="Victory Subtitles", BlueprintImplementableEvent)
                    	void OnVictorySubtitlesQueued(const TArray<struct FVictorySubtitleCue>& VictorySubtitles, float CueDuration);
                    	
                    	UFUNCTION()
                    	void Subtitles_CPPDelegate(const TArray<struct FSubtitleCue>& VictorySubtitles, float CueDuration);
                    };
                    Code:
                    /*
                    
                    	By Rama
                    
                    */
                    
                    #include "VictoryBPLibraryPrivatePCH.h"
                    #include "VictoryPC.h"
                     
                    #include "Runtime/Engine/Classes/Kismet/GameplayStatics.h"
                    
                    UAudioComponent* AVictoryPC::VictoryPlaySpeechSound(
                    	USoundBase* Sound
                    	,float VolumeMultiplier
                    	,float PitchMultiplier
                    	, float StartTime)
                    {
                    
                    	UAudioComponent* Audio = UGameplayStatics::SpawnSound2D(this,Sound,VolumeMultiplier,PitchMultiplier,StartTime);
                    	if(Audio)
                    	{
                    		//Subtitle Delegate for You!
                    		//		<3 Rama
                    		Audio->OnQueueSubtitles.BindDynamic(this, &AVictoryPC::Subtitles_CPPDelegate);
                    	}      
                    	
                    	/*
                    		Note that the OnAudioFinished is BP assignable off of return of this node!
                    		
                    		//called when we finish playing audio, either because it played to completion or because a Stop() call turned it off early
                    		UPROPERTY(BlueprintAssignable)
                    		FOnAudioFinished OnAudioFinished;
                    	*/
                    	
                    	return Audio;
                    }
                     
                    void AVictoryPC::Subtitles_CPPDelegate(const TArray<struct FSubtitleCue>& Subtitles, float CueDuration)
                    {
                    	TArray<FVictorySubtitleCue> VictorySubtitles; 
                    	for(const FSubtitleCue& Each : Subtitles)
                    	{
                    		VictorySubtitles.Add(FVictorySubtitleCue(Each.Text,Each.Time));
                    	} 
                    	  
                    	OnVictorySubtitlesQueued(VictorySubtitles,CueDuration);
                    }
                    ~~~

                    Latest plugin download on the UE4 Wiki: (7.16 mb)
                    https://wiki.unrealengine.com/File:VictoryPlugin.zip

                    Plugin Release Dates and UE4 Engine Versions
                    https://wiki.unrealengine.com/Rama%2...ngine_Versions

                    ~~~

                    Donations

                    Donations can be sent to me via:
                    http://lightningfitness.org/donate/

                    Enjoy!



                    Rama
                    Last edited by Rama; 02-06-2016, 03:46 AM.
                    100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                    Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                    Comment


                      Originally posted by Rama View Post
                      Dear John,

                      Sounds like I need to provide a 4.11 build, though that makes my process of adding new nodes take even longer because then I have to upload an extra version on top of 1. editor 2. packaged and 3. media fire But Then I'd have to provide all 3 of those for 4.11 as well!

                      Supporting 2 engine versions by myself for free is so much work for me, I then have to do 6 updates every time I add any new nodes, as described above.

                      Unless I adopted 4.11 early... then anyone wanting to test my new nodes would also have to adopt 4.11 early...

                      Thinking about it...

                      Also I think 4.11 is coming out soon

                      Hi Rama, thanks for your answer!

                      I know 4.11 is coming soon, but since I was never able to test the previews I fear there might be bugs I could have reported to Epic earlier...

                      I would be absolutely fine with compiling your plugin myself (I do that anyway since I use a custom build of the engine), so if you could provide only source for preview versions that would already be very helpful, if it saves you time because you don't have to compile them.

                      I have tried to manually compile your plugin for 4.11, but there were a few errors and I don't know how to fix them
                      Easy to use UMG Mini Map on the UE4 Marketplace.
                      Forum thread: https://forums.unrealengine.com/show...-Plug-and-Play

                      Comment


                        Hi Rama, i'm such a dummy with C++!

                        I've hijacked your blueprint function library tutorial code to try to get my machine's local IP address with this:

                        Code:
                        //Happy Message
                        virtual UMyBlueprintFunctionLibrary::GetHappyMessage()
                        {
                        
                        	return GetLocalHostAddr(FOutputDevice & Out, bool & bCanBindAll);
                        }
                        But it just winds up not compiling and throwing up problems with the SocketSubsystem.h include.

                        The sample code from the docs is

                        Code:
                        virtual TSharedRef< FInternetAddr > GetLocalHostAddr
                        (
                            FOutputDevice & Out,
                            bool & bCanBindAll
                        )
                        Any chance of a nudge in the right direction? This is the kind of bodgy assemblies I can return in python - I just don't get it with C++ (But i'd love to!)

                        Comment


                          Hi Rama...

                          Curious... I went to your github and it says that its not been updated since September. Are you still allowing access to the source? Honestly, I learn by reading other people's code and if I do use it anyplace, you will get credit. Thanks for all your work!

                          teak
                          "A little bit of nonsense now and then is cherished by the wisest men..."
                          -- Willy Wonka

                          Smooth Zoom Camera Plugin for 4.22 here.

                          Comment


                            Originally posted by Rama View Post
                            Dear John,

                            Sounds like I need to provide a 4.11 build, though that makes my process of adding new nodes take even longer because then I have to upload an extra version on top of 1. editor 2. packaged and 3. media fire But Then I'd have to provide all 3 of those for 4.11 as well!

                            Supporting 2 engine versions by myself for free is so much work for me, I then have to do 6 updates every time I add any new nodes, as described above.

                            Unless I adopted 4.11 early... then anyone wanting to test my new nodes would also have to adopt 4.11 early...

                            Thinking about it...

                            Also I think 4.11 is coming out soon





                            Yes do send me a PM with your issue with consoles



                            Rama
                            I love the Victory library, but I must confess that I really do miss not being able to work with preview builds anymore. I understand the reason why, of course...

                            Rama, is there usually a high labor cost associated with updating nodes to work with the newest engine versions? Obviously just the time spent maintaining two branches isn't ideal.... But maybe when a new version preview release drops (just Preview 1, not updated), it would be beneficial to just quickly toss out a single compatible version of the plugin as-is? Keep updates to the main version (not the preview version) until it becomes official... But with the multi-month cycle on preview releases, even if it would mean that not EVERY new Victory node could be tested, people who are legacy-bound to Victory because they use existing nodes would be able to start testing in preview releases, even if it meant having to wait a little while for Victory to catch up.

                            I know for my own part 99% of what I want and need Victory for, at the moment anyway, isn't the stuff you're rolling out now, and I confess—sorry to say—I'd rather wait until "4.11 drops proper and Victory gets updated for it" for access to subtitles in sound cues than I would for access to the newest engine features. I (typically) only update Victory when it's needed due to an engine update, and all the extra nodes you've added are like a bonus at that time.

                            And it would only literally be a single upload (the editor version) since I think the common-sense case could be made that nobody is attempting to package a game made in a preview release (certainly Epic cautions strongly against doing so). It would be a one-time deal when the first version of a new preview release dropped to provide a degree of compatibility for testing projects, which is what the previews are FOR.

                            Just a thought.
                            Last edited by RhythmScript; 02-08-2016, 05:01 AM.

                            Comment


                              I'm on the latest version of the editor and I can't see the VictoryPlugin even if I pasted the folder in the Plugins folder... Any idea?

                              Comment


                                Excellent work as always. I too would like a 4.11 version on Git. But i can wait, surely it wont be long now.

                                Good luck with Solus Rama :-)
                                Outer Planet Studios
                                http://outerplanet.webflow.io/

                                Comment

                                Working...
                                X