Results 1 to 8 of 8

Thread: Disable SeePlayer doesn't disable SeePlayer...

  1. #1
    Ivan84
    Guest

    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
    ADayInForever
    Guest
    You could try

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

  3. #3
    Ivan84
    Guest
    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
    ADayInForever
    Guest
    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
    Ivan84
    Guest
    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
    jgg
    Guest
    What class did it work with and which one are you testing now?

  7. #7
    Ivan84
    Guest
    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
    Blade[UG]
    Guest
    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •