Qbiinz Posted October 25, 2010 Share Posted October 25, 2010 alright ive been trying to make a sentrybot companion and its proving to be super difficult. after experimenting with different companion scripts ive really had no luck so ive decided to try and make my own. the problem is there must be a bunch of errors so it wont save, im not a programmer so i basically just cut and pasted what i thought to be the appropriate lines if you guy see anything out of place PLEASE let me know. im at the end of my witts trying to get this guy to work heres what the code looks like i also linked a download to itany help would be greatly appreciated scn SpyBotSCRIPT short HasBeenHiredshort WeaponOutshort CombatStyleRangedshort CombatStyleMeleeshort IsFollowingDefaultshort IsFollowingShortshort IsFollowingLongshort FollowerSwitchAggressive ; 0 = Passive (wait for player), 1 = Aggressive (attack when see enemy)short Waitingshort DoOnceshort bLoadedOnce;short bTalking;short bIntercomConversationActive; BEGIN GameMode if ( DoOnce == 0 ) if ( GetDistance Player <= 1400 ) set DoOnce to 1 endif endif END BEGIN OnActivate player if (bTalking == 0) Activate; endifEND BEGIN OnCombatEND if ( GetPlayerTeammate == 1 ) resethealth restoreav perceptioncondition 100 restoreav endurancecondition 100 restoreav leftattackcondition 100 restoreav leftmobilitycondition 100 restoreav rightattackcondition 100 restoreav rightmobilitycondition 100 endif END BEGIN OnDeath if ( VNPCFollowers.SpyBotHired == 1 ) set VNPCFollowers.nCurrentFollowers to VNPCFollowers.nCurrentFollowers - 1; set VNPCFollowers.bCritterInParty to 0; if (VNPCFollowers.nCurrentFollowers == 0) set VNPCFollowers.bPlayerHasFollower to 0 endif set VNPCFollowers.SpyBotHired to 0 ShowMessage FollowerMessageDeadSpyBot player.RemovePerk ScribeAssistant ShowMessage FollowerMessagePerkSpyBotRemove endif set VNPCFollowers.SpyBotDead to 1 END ps this was a moddifed veronica script Link to comment Share on other sites More sharing options...
Bally9 Posted October 25, 2010 Share Posted October 25, 2010 I see a number of mismatched if/endif's on the OnDeath block. I would recommend running the same script through the FO3 geck if you have the game, it will tell you the errors. maybe try: BEGIN OnDeath if ( VNPCFollowers.SpyBotHired == 1 )set VNPCFollowers.nCurrentFollowers to VNPCFollowers.nCurrentFollowers - 1;set VNPCFollowers.bCritterInParty to 0;set VNPCFollowers.bPlayerHasFollower to 0set VNPCFollowers.SpyBotHired to 0tplayer.RemovePerk ScribeAssistantset VNPCFollowers.SpyBotDead to 1ShowMessage FollowerMessagePerkSpyBotRemoveShowMessage FollowerMessageDeadSpyBoendif END Link to comment Share on other sites More sharing options...
Qbiinz Posted October 25, 2010 Author Share Posted October 25, 2010 thanks for the reply i guess i missed that but the script still wont save and i erased fallout 3.esm a while ago but i guess im gonna have to re-install it just to run the old-geck the new script is below with a new file attachment, anybody else think they might have an idea? scn SpyBotSCRIPT short HasBeenHiredshort WeaponOutshort CombatStyleRangedshort CombatStyleMeleeshort IsFollowingDefaultshort IsFollowingShortshort IsFollowingLongshort FollowerSwitchAggressive ; 0 = Passive (wait for player), 1 = Aggressive (attack when see enemy)short Waitingshort DoOnce BEGIN GameMode if ( DoOnce == 0 ) if ( GetDistance Player <= 1400 ) set DoOnce to 1 endif endif END BEGIN OnActivate player if (bTalking == 0) Activate; endifEND BEGIN OnCombatEND if ( GetPlayerTeammate == 1 ) resethealth restoreav perceptioncondition 100 restoreav endurancecondition 100 restoreav leftattackcondition 100 restoreav leftmobilitycondition 100 restoreav rightattackcondition 100 restoreav rightmobilitycondition 100 endif END BEGIN OnDeath if ( VNPCFollowers.SpyBotHired == 1 ) set VNPCFollowers.nCurrentFollowers to VNPCFollowers.nCurrentFollowers - 1; set VNPCFollowers.bCritterInParty to 0; set VNPCFollowers.bPlayerHasFollower to 0 set VNPCFollowers.SpyBotHired to 0 set VNPCFollowers.SpyBotDead to 1 player.RemovePerk ScribeAssistant ShowMessage FollowerMessageDeadSpyBot ShowMessage FollowerMessagePerkSpyBotRemove endifEND Link to comment Share on other sites More sharing options...
BEArbiter Posted October 25, 2010 Share Posted October 25, 2010 Here is the Answer of Cipcis Validator(I Corrected the error that was a ';' after a '0' (which make it different than a number):ScriptName SpyBotSCRIPT short HasBeenHired short WeaponOut short CombatStyleRanged short CombatStyleMelee short IsFollowingDefault short IsFollowingShort short IsFollowingLong short FollowerSwitchAggressive ; 0 = Passive (wait for player), 1 = Aggressive (attack when see enemy) short Waiting short DoOnce Begin GameMode if ( DoOnce == 0 ) if ( GetDistance Player <= 1400 ) set DoOnce to 1 endif endif End Begin OnActivate player if (bTalking == 0) Activate; endif End Begin OnCombatEnd if ( GetPlayerTeammate == 1 ) resethealth restoreav perceptioncondition 100 restoreav endurancecondition 100 restoreav leftattackcondition 100 restoreav leftmobilitycondition 100 restoreav rightattackcondition 100 restoreav rightmobilitycondition 100 endif End Begin OnDeath if ( VNPCFollowers.SpyBotHired == 1 ) set VNPCFollowers.nCurrentFollowers to VNPCFollowers.nCurrentFollowers - 1 set VNPCFollowers.bCritterInParty to 0 set VNPCFollowers.bPlayerHasFollower to 0 set VNPCFollowers.SpyBotHired to 0 set VNPCFollowers.SpyBotDead to 1 player.RemovePerk ScribeAssistant ShowMessage FollowerMessageDeadSpyBot ShowMessage FollowerMessagePerkSpyBotRemove endif * The local variable "HasBeenHired" was never assigned a value in this script * The value of the local variable "HasBeenHired" was never used in this script * The local variable "WeaponOut" was never assigned a value in this script * The value of the local variable "WeaponOut" was never used in this script * The local variable "CombatStyleRanged" was never assigned a value in this script * The value of the local variable "CombatStyleRanged" was never used in this script * The local variable "CombatStyleMelee" was never assigned a value in this script * The value of the local variable "CombatStyleMelee" was never used in this script * The local variable "IsFollowingDefault" was never assigned a value in this script * The value of the local variable "IsFollowingDefault" was never used in this script * The local variable "IsFollowingShort" was never assigned a value in this script * The value of the local variable "IsFollowingShort" was never used in this script * The local variable "IsFollowingLong" was never assigned a value in this script * The value of the local variable "IsFollowingLong" was never used in this script * The local variable "FollowerSwitchAggressive" was never assigned a value in this script * The value of the local variable "FollowerSwitchAggressive" was never used in this script * The local variable "Waiting" was never assigned a value in this script * The value of the local variable "Waiting" was never used in this script End Link to comment Share on other sites More sharing options...
Recommended Posts