Results 1 to 2 of 2
  1. #1

    Default TouchingActors Problem

    Hello I am having another problem with unrealscript involving touching actors. I have two meshs in the level and I have them touching eachother and I am trying to find them in code. I first use the AllActors iterator and find the mesh with the tag "NewToucher" which is one of the touching meshs. Next I use TouchingActors on that to see what actor it is touching except it doesn't log that it found one. I'm just using two static meshs from UT3 to check this. Here is my code thanks.

    Code:
    
    var Actor NewToucher;
    
    exec function FindTouching()
    {
    	local Actor testActor;
    
    	foreach AllActors(class'Actor',testActor)
    	{
    		if(testActor.Tag == Name("NewToucher"))
    		{
    			NewToucher = testActor;
    			`log("Found NewToucher");
    		}
    	}
    	foreach testActor.TouchingActors(class'Actor', testActor)
    	{
    		`log("Found Touching Actor: "$testActor);
    	}
    }

  2. #2
    God King
    Join Date
    Nov 2007
    Location
    Lithuania
    Posts
    4,723

    Default

    testActor is not NewToucher, it's the last actor in the level.
    Also, the way you write "`log" shows that this is a UT3 mod, not a UT2004 one, so you might want to post it in the relevant forum.


 

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.