Results 1 to 8 of 8
  1. #1
    Iron Guard
    Join Date
    Jan 2012
    Posts
    673

    Default Disable SeePlayer doesn't disable SeePlayer...

    I have this state inside the controller:

    Code:
    auto state SettingUp
    {
    Begin:
    	Disable('SeePlayer');
    	Disable('SeeMonster');
    	Disable('HearNoise');
    	Disable('EnemyNotVisible');
    	Disable('Tick');
    
    	SetTimer(0.5, true, 'WhatToDoNext');
    }
    and this is my test seeplayer:

    event SeePlayer(Pawn Seen)
    {
    `Log("----test log!");
    }

    and this is always called. I searched through the controller code and it seems that there aren't any Enable('seeplayer').
    Why this can happens?

  2. #2
    MSgt. Shooter Person
    Join Date
    Feb 2011
    Posts
    242

    Default

    You could try

    Code:
    auto state SettingUp
    {
          ignores SeePlayer, SeeMonster, HearNoise, EnemyNotVisible, Tick;
         Begin:
         SetTimer(0.5, true, 'WhatToDoNext');
    }

  3. #3
    Iron Guard
    Join Date
    Jan 2012
    Posts
    673

    Default

    I want those events disabled for all the game time.
    Maybe i can't set them from inside a state but i never read about this.

  4. #4
    MSgt. Shooter Person
    Join Date
    Feb 2011
    Posts
    242

    Default

    Then why not just override each of those events to do nothing?

    Code:
    event SeePlayer()
    {
    }
    
    auto state SettingUp
    {
        // Your code here.
    }
    You do not have to define these events within the states themselves. If you define them independently of any state, they'll get applied to every state unless ignored. In this case, overriding these events to do nothing will do exactly what you want.

  5. #5
    Iron Guard
    Join Date
    Jan 2012
    Posts
    673

    Default

    Yes i did that, but in another class i also disabled this events and it worked. I prefer to disable it if possible to be sure they doesn't stole any resources.

  6. #6
    MSgt. Shooter Person
    Join Date
    Feb 2012
    Location
    Barcelona
    Posts
    240
    Gamer IDs

    Gamertag: DulceangustiA

    Default

    What class did it work with and which one are you testing now?

  7. #7
    Iron Guard
    Join Date
    Jan 2012
    Posts
    673

    Default

    It worked on a controller that extends from UDKBot (but not very well, sometimes it was called at all the same), now i'm testing it on a controller extending from AIController.
    I searched inside those classes but i found no reference about an enable command.
    I also disable the tick functions in every Pawn class i have and it works fine.

  8. #8
    Veteran
    Join Date
    May 2007
    Location
    Above KillZ, Below StallZ
    Posts
    9,986

    Default

    If you don't want the see functions to run, then you may want to stub them out as above, and I'm going to tell you a super secret trick that I've used quite nicely.. In controller there's a variable for setting the time delay between visibility checks.. You can set that to some huge time, and it will hardly ever even run the code

    -- Sent from my TouchPad using Communities
    http://www.ericbla.de http://www.dungeondefenders.com http://en.wikipedia.org/wiki/Warm_Gun http://www.rekoil.com http://www.groundbranch.com

    - Please don't send me private messages asking programming questions, those would be better asked on the Programming forum here. Thanks


 

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.