Forum rules - please read before posting.

Writing Custom Action with Parameters

Hi there, I've written a custom action that supports parameters. The action has a transform field, but I notice that if I use a parameter (rather than dragging a transform in from the scene) the transform field is still displayed (I notice that on your ActionHotSpot action, selecting a parameter removes the Hotspot field).

I understand this is controlled by the ShowGui function. I've read the online tutorial and examined other actions and I can't see why it would display the transform field when I've selected a parameter?

Thanks

Comments

  • You have to code in the removal of the field as part of the Action - it's not automatic.  When a parameter integer is not used, it's value is negative.  Simply check whether this is the case or not before your Action shows the relevent field in ShowGUI - the ActionHotspotEnable.cs script demonstrates this.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.