Announcement

Collapse
No announcement yet.

Kismet Variable - Improvement suggestion (change 1 word in cpp block)

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

    Kismet Variable - Improvement suggestion (change 1 word in cpp block)

    Hello, I succesfully created my own kismet variable. Problem is that text inside bubble is always Undefined (and it gives sense because other variables have some native code that points to value). I'd like to have some string and ability to change Undefined text to this string (It does not need to be value - just static string - to make it looking better... but value will be cool too). I think this is 5 min of work for epic programmers Thank you

    #2
    GetValueStr() is that native function:

    Code:
    /**
     * Base class for all variables used by SequenceOps.
     * Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
     */
    class SequenceVariable extends SequenceObject
    	native(Sequence)
    	abstract;
    
    cpptext
    {
    	// UObject interface
    	virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
    
    	virtual UObject** GetObjectRef( INT Idx )
    	{
    		return NULL;
    	}
    
    	virtual FString GetValueStr()
    	{
    		return FString(TEXT("Undefined"));
    	}
    Epic please, give us chance to edit this string in our variables.

    I think this is really change that takes 5 seconds because everything what is need is create string variable (something like "VarHeader"), change "Undefined" to VarHeader and in default properties write "VarHeader=Undefined". Or simply change it to ObjName

    Comment


      #3
      Since it's a virtual function, you should be able to create your own version of it in your class to override that base version.

      I don't know the limitations of Unrealscript but in C++ that's definitely the case.

      Comment


        #4
        Thank you for reply...Yes, I tried it but It didn't work. I tried to change "Undefined" to "test" and it was still undefined in editor. I think that changing cpp block is somehow blocked.

        Comment


          #5
          I don't think your kismet sequence is doing what you think it does.

          To clarify: cpptext is native code that is already compiled into the binary; you cannot edit it.

          SequenceVariable is an abstract class - that function will be overridden in subclasses and it will return something meaningful, for example:
          Code:
          class SeqVar_String extends SequenceVariable
          	native(Sequence);
          
          cpptext
          {
          	virtual FString* GetRef()
          	{
          		return &StrValue;
          	}
          
          	FString GetValueStr()
          	{
          		return StrValue;
          	}
          A string variable returns the value of a string. A bool variable returns the value of a bool.

          If your string has no value, then it's because you haven't defined it.

          Comment


            #6
            No no no... As I said
            I succesfully created my own kismet variable.
            I don't have problem with default kismet variables. I have problem with my custom classes based on SequenceVariable (class MyVariable extends SequenceVariable; ) because I can't edit text in bubble it is really chaotic to know what type is my variable without clicking on it if every custom variable has "Undefined" in bubble.

            Comment

            Working...
            X