Calling Console Commands From SDK: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
No edit summary
 
m (categorised)
 
Line 12: Line 12:
  }
  }


[[Category:SDK]]
{{sdk}}

Latest revision as of 08:07, 30 June 2008

Originally written by Ishtvan on http://forums.thedarkmod.com/topic/3719

This is an example of how you would call a console command within the SDK:

/*
================
idTarget_SessionCommand::Event_Activate
================
*/
void idTarget_SessionCommand::Event_Activate( idEntity *activator ) {
   gameLocal.sessionCommand = spawnArgs.GetString( "command" );
}