3Ducttapes(); Yvo von Berg | CG Toolsmith blog | C++, Python

Tycoon C++ UI update and animation tests

Slate UI

Recently did a very first user test. I’ve decided to rebuild most of the UI to make it more artist friendly. Here is the new prototype. With a focus on sliders. Was quite a bit of work, but learned a lot about the UE4 Slate framework.

Animation blueprints

Started to build an animation system for the trains.

I’ve learned that if you use ‘BlueprintCallable’ you can expose C++ methods directly to blueprint nodes. However I had to change the plugin type from ‘Editor’ to ‘Runtime’. Which makes sense because my animation system would run at runtime. :)

I currently have the following methods:

  • TycoonSwitchTrain: Sets the active train to use, to control the carts (child actors), I call GetAttachedActors() on the main train actor.
  • TycoonChangeSpeed
  • TycoonStartAnimation
  • TycoonChangeCartOffset: Each train has an offset on the track.
  UFUNCTION(BlueprintCallable, Category = TycoonConfig)
    void TycoonChangeCartOffset(int32 value);