Results 1 to 5 of 5
  1. #1

    Default Referencing Object Calling Function

    In the game, we call the weapon DoAttack() function like this:

    ROAWeapon.FireMode.DoAttack()

    This function is called from within ROAPawn.

    Within the DoAttack() function, is there anyway at all to reference the specific ROAPawn archetype calling this attack function?

    I can't figure this out.

  2. #2
    Palace Guard

    Join Date
    Jun 2007
    Location
    Christchurch
    Posts
    3,781

    Default

    You could just pass it along the function chain.

  3. #3

    Default

    Wow... why am I so silly?

    Thanks man.

  4. #4

    Default

    One last question. What's the best way to scan for all actors of a specific archetype and deal with them individually?

    Thanks again.

  5. #5

    Default

    Doing it like this:

    Code:
    function MakeAlive()
    {
    	local ROADevastation A;
    	
    	foreach AllActors(class 'ROADevastation', A)
    	{
    		if (A.SequenceIndex == SequenceIndex)
    			A.Rejuvination();
    	}
    }
    Getting an error saying that an iterator is required though...

    Seems I need to call this function from a class which is a descendant of the original class. Don't worry.
    Last edited by InfinityBeyond; 04-26-2012 at 10:01 AM.


 

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.