Doom3world

The world is yours! Doom 3 - Quake 4 - ET:QW - Prey - Rage
It is currently Sat May 25, 2013 12:54 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Better objects way scripts...
PostPosted: Fri Feb 10, 2012 2:40 pm 
Offline
fired 300 rounds
User avatar

Joined: Thu Nov 30, 2006 6:40 pm
Posts: 328
Location: Salt (Girona) Spain
Antispam measure: What is larger? The Sun or the Galaxy?: sun
There is scripts that are just repeated, like in ROE ai_character_erebus3.script is just the same as ai_character_prone.script in D3 base and can be made faster, easy and more simple, saving space need by other scripts like more new weapons, by making inherited from the original prone script by inherit from the object, like this...:

Code:
/***********************************************************************

ai_character_erebus3.script   update to ai_character_prone.script updated by dfm

editor keys:
"die_after_speaking"      character dies after being talked to twice.

***********************************************************************/

object ai_character_erebus3 : ai_character_prone {
   float      talkMode;
   float      talk_secondary_index;

   void      init();

};

/***********************************************************************

   AI

***********************************************************************/

/*
=====================
ai_character_erebus3::init
=====================
*/
void ai_character_erebus3::init() {
   if ( getIntKey( "die_after_speaking" ) > 1 ) {
      talkMode = 0;
   } else {
      talkMode = getIntKey( "talk_mode" );
   }
   talk_secondary_index = 1;
   setBoneMod( true );
   animState( ANIMCHANNEL_TORSO, "Torso_Idle", 0 );
   setState( "state_Idle" );
}

_________________
http://doom3.filefront.com/developer/Dafama2K7;23734


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group