Forum rules - please read before posting.

How would I add a 3rd interaction type which can be triggered in a c# script?

edited June 2018 in Technical Q&A
Hello,

I'm making quite a different interaction system in my game which is more about physics and collisions, rather than ray casting. The game is therefore using c# scripts in order to detect collisions and the like.

The game calls for three main actions; 'use', 'look at', and 'talk to'. Each of these are different projectiles.

I've managed to get the 'use' and 'look at' actions covered by using RunUseInteraction() &
RunExamineInteraction() respectively in the scripts. Awesome.

How would I go about adding the 'talk to' interaction, and more importantly, being able to trigger it in a c# script?



In my most ideal world I'd have a 'Talk To interaction' listed in the inspector to make the holy trinity of interactions. Is that possible?

Thanks,
Tem




Comments

  • edited June 2018
    So far as the Hotspot Inspector goes, the Examine type is a special case that allows a simple way to have an "alternative" use interaction by right-clicking.

    To have multiple interaction types, you want to instead create multiple Use Interactions - each with a different "Cursor / icon" value.

    The "Use" Interaction type is not the same as the "Use" cursor - it can be associated with any icon you define in the Cursor Manager.

    To run the "Use" Interaction associated with a given cursor icon, use that icon's ID number when calling the Hotspot's RunUseInteraction method.
  • edited June 2018
    Thanks @ChrisIceBox, got it working! So starting at 0, each of those interactions has a id (based on the cursor manager).



    Slowly learning :)


    Thanks,
    Tem
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.