Announcement

Collapse
No announcement yet.

How to pass params to Actionscript fucntion from UnrealScript?

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

    How to pass params to Actionscript fucntion from UnrealScript?

    I only ever see examples calling actionscript functions without any params:

    Code:
    ActionScriptVoid("SomeAsFunction");
    Can anyone help explain how I can do this?

    Thanks in advance

    #2
    You need a Unreal function wrapper:

    Code:
    function SomeAsFunction(bool mybool,int someint,int otherint,String whatever)
    {
         ActionScriptVoid("SomeAsFunction"); // mybool someint otherint whatever are invisible-passed here
    }
    all parameters that are in the unreal functions are automatically passed to the actionscript function:

    Code:
    public function SomeAsFunction(mybool:Boolean,someint:int,otherint:int,whatever:String)
    {
         trace(mybool,someint,otherint,whatever);
    }

    Comment


      #3
      Ah great. I didn't realize the params passed without explicitly declaring them in the AS all.

      Thanks

      Comment

      Working...
      X