Announcement

Collapse
No announcement yet.

Interactions in an area

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

    Interactions in an area

    I have set up some interaction to use in my level to have several events to be triggered by a keypress.

    Got all that to work fine, but was wondering if there was a way to make the keybinding press trigger the event only in a certain area of the map?

    I can post the mutator code i used to add the interaction if you want me too.

    Here is the code for the interaction


    Code:
    class UIUCKey extends Interaction;
    
    Function Initialize()
    {
    Log("UserKeyEnvoked Interaction Initialized");
    }
    
    defaultproperties
    {
    bActive=true;
    }
    
    function bool KeyEvent(EInputKey Key, EInputAction Action, FLOAT Delta )
     {
       if (Action == IST_Press)
         {
           if (Key == 71 ) //listen to G Key
            {
              ConsoleCommand("CauseEvent FireTest");
    
            }
    
    
         }
    
       return false;
      }
    Let me know if anyone has any ideas, thanks for the help

    #2
    You could build a volume around the area in UEd, and give it a special tag. Then write a ForEach to look for touching actors of the desired volume-type that matches the tag. If it hits, execute the stuff you want.

    Comment


      #3
      Does the test really need to be bound to a specific key? If not then why not use a 'UseTrigger' instead to activate the event.

      Comment

      Working...
      X