Announcement

Collapse
No announcement yet.

CVAR & COMMAND list "ENTITY"! Is it possible?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CVAR & COMMAND list "ENTITY"! Is it possible?

    I was thinking... is it possible to create an entity in QC that can alter cvar's or commands on the fly, same as if the player type them into the console?

    For instance... a player walks into a fully loaded room of baddies but got the "rune"(entity and value entered at map design time) of "notarget" and thus could walk amongst them freely until he hits the "entity" again thus returning to normal play.

    Example: place a cvar_entity/cmd_entity in map,
    set name = "notarget"
    value "1"

    When a player encounters this "entity" monsters will not attack.

    I know there are things in game that already accomplish that example but would it possible to have all the cvar's and commands available like this?

    Gravity... water transparency... GOD mode... weather effects... etc etc

    Jus' curious...
    Name's damage_inc, and killing is my business. Don't worry though, it's nothing personal! Oh wait... maybe it is

  • #2
    yeah, it�s totally possible


    void() trigger_command_use =
    {
    if ( self.message )
    localcmd(self.message);

    };
    void() trigger_command =
    {
    self.use = trigger_command_use;
    self.think = SUB_Null;
    };
    the invasion has begun! hide your children, grab the guns, and pack sandwiches.

    syluxman2803

    Comment

    Working...
    X