Here are two samples of scripts used to summon a creature, taken from one of Calishan's mods, that may give you some ideas. Both are annotated with useful comments by the author:
begin sm_spidersummonG_00 ;;Make Startscriptif ( player->getspelleffects, "SM_SpiderGreater_sp" == 1 ) player->removeSpellEffects, "SM_SpiderGreater_sp"; playsound "conjuration area" Placeatpc "cali_SM_Spider_med" 1 128 1endifend
begin sm_spiderG_01 ;;Put on Creaturefloat timershort countshort doOnceif ( doOnce == 0 )aifollow, player, 0, 0, 0, 0set doOnce to 1endifIf ( OnActivate )returnendifif ( GetDisabled == 1 );the creature has been disabledset count to ( count + 1 )if ( count == 5 )DontSaveObject;make sure it isn't saved (duh!)SetDelete, 1;delete it from current gameendifendifif ( MenuMode == 1 );make sure it doesn't count during inventory and dialogueReturnendifset timer to ( timer + GetSecondsPassed )if ( timer < 30 );don't do anything until 30 seconds have passedreturnendifDisableend
Hope this is helpful
DARoot