Results 1 to 2 of 2
  1. #1
    Iron Guard
    Join Date
    Nov 2009
    Location
    CA
    Posts
    528

    Default event Touch and Actor Other

    In the 'event Touch (Actor Other....)' used for whenever two actors touch each other, how can I have it so only one class will 'trigger' the Touch event?

    As to prevent AI from touching triggers meant for only player pawns.

    Thanks
    My website: http://www.dotvawxgames.com
    How I made my game: HERE

    What I am doing now: www.warmgungame.com

  2. #2
    MSgt. Shooter Person
    Join Date
    Jul 2011
    Location
    Shanghai
    Posts
    309

    Default

    I don't know if you can prevent an AI-controlled pawn from having its Touch event called, but you can prevent them from doing anything when the event is called.

    Code:
    event Touch (Actor Other, PrimitiveComponent OtherComp, Object.Vector HitLocation, Object.Vector HitNormal)
    {
    	local AIController AIControlled;
    
    	AIControlled = AIController(Controller);
    
    	if (AIControlled == None)
    	{
    		// This pawn is not controlled by AI
    	}
    }


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.