[I’m using our current naming conventions which may be available by the time you read this or will be soon.]
Given your example scenario, assuming that
IUTTeamInterface are already UE classes known to SkookumScript with
SkUE prefixes and let’s also assume that the script class
AUTBot is a subclass of
AAIController then you would create SkookumScript code similar to this:
// Calling AAIController@aicontroller_command()
// Calling custom AUTBot@team_interface() IUTTeamInterface
bot at the C++ level is a
SkInstance that stores a weak pointer to an
AUTBot we just need to make a new
SkInstance with the same pointer and the
IUTTeamInterface SkookumScript class.
This is similar to the entity/component component technique I mentioned earlier - which is an example of composition over inheritance - but it just reclasses the entire reference rather than returning a contained object.
The C++ code for
AUTBot@team_interface() IUTTeamInterface would look something like this:
static void mthd_team_interface(SkInvokedMethod * scope_p, SkInstance ** result_pp)
*result_pp = SkUEIUTTeamInterface::new_instance(scope_p->this_as<SkUEAUTBot>());
In the future we can also make a SkookumScript method that allows an arbitrary
Entity (or some other class) to copy the weak reference of an existing UE object and give it a new SkookumScript class. Then you wouldn’t need to write any C++ code. So it could look like this:
In the farther future we will add trait functionality to SkookumScript to do this more properly/elegantly.
This is fairly tricky so please let me know if this makes sense and if not I can try to give more examples and clarification.