PDA

View Full Version : help! mutate w/ custom exec functions


fallenstarr
16th Sep 2008, 09:03 PM
I'm trying to make a mutator that would allow admin's to enter custom commands in the console and have them executed through mutate. I have the following working now:

- Mutate checks for admin and allows execution of mutator functions
- Write to custom config file

Ok, i know that isn't much but i'm just starting :)

I have my mutator class MutMine and within that file I have the mutate function calls the custom function in the same class depending on the command string.

As a simple test for the execs to work without having to type mutate, i have a function called ShowName that just prints the sender's player name. Then the exec command is CallMyCommand which then calls Mutate with the command string ( in this case: ShowName ). The CallMyCommand exec is in MineInteraction which extends Interaction.

When I type "Mutate CallMyCommand ShowName". I get the proper result, my player name is printed on the screen.
When I try just using "CallMyCommand ShowName" without mutate, nothing happens and I get the dreaded "Unrecognized Command" message.

I'm adding my own interaction for the exec commands (AddInteraction), I tried extending PlayerController, and using my own CheatManager. I just can't get the exec commands to work.

I thought this might have to do with replication, and I've tried a few things that I found in forums/tutorials with no luck :(

I've used AddMutator and I'm using PreBeginPlay and Tick

Can anyone help me out here? Any info or pointing in the right direction would be appreciated