Jump to content

Photo

NPC/Companion hired script issue


  • Please log in to reply
2 replies to this topic

#1
bjornl

bjornl

    Fan

  • Premium Member
  • 381 posts

Under the HIRED topic the Results Script End has the following

ShowMessage BLElvisHIRED
Set BLElvis1REF.Waiting to 0
Set BLElvis1REF.HasBeenHired to 1
Set BLElvis1REF.L38 to 0
Set BLElvis1REF.CombatStyleRanged to 1
Set BLElvis1REF.CombatStyleMelee to 0
Set BLElvis1REF.IsFollowingDefault to 0
Set BLElvis1REF.IsFollowingLong to 0
BLElvis1REF.AddToFaction FollowerFaction 1
BLElvis1REF.AddToFaction PlayerFaction 1
BLElvis1REF.SetPlayerTeammate 1
BLElvis1REF.SetIgnoreFriendlyHits 1
These two lines do not work:
Set BLElvis1REF.CombatStyleRanged to 1
Set BLElvis1REF.CombatStyleMelee to 0
 
They are all declared in this script 
scn  BLElvisScript


short HasBeenHired
short L38
short DoOnce


int CombatStyleRanged
int CombatStyleMelee
int IsFollowingDefault
int IsFOllowingLong
int FollowingSwitchAggressive
int Waiting


Begin GameMode
   If (DoOnce !=1)
      Set HasBeenHired to 0
      Set L38 to 0
      Set DoOnce to 1
      Set CombatStyleRanged to 1
      Set CombatStyleMelee to 0
      Set IsFollowingDefault to 0
      Set IsFOllowingLong to 0
      Set FollowingSwitchAggressive to 0
      Set Waiting to 0
   EndIf
End
 

I can't see the difference between those that work and those that don't.

The symptom is that if I include the CombatStyleXXX lines then I can not close the editor.  If I paste it in to the lower window instead I get an error that the script can not compile.  It does not seem to be a variable length issue since IsFollowingDefault is longer by 1 character.

 

Also I have not gotten any feed back on my previous question which I posted a week ago (probably in the wrong sub-forum).  If anyone has any ideas on how I could resolve those two issues I'd appreciate any guidance.

http://forums.nexusm...dding-guidance/

 



#2
pkleiss

pkleiss

    Pseudo Supreme Being

  • Members
  • PipPipPipPip
  • 1,491 posts

Perhaps those are reserved words already in use by another script or global. Have you tried using a different name for those variables, like CSRanged or CSMelee?



#3
bjornl

bjornl

    Fan

  • Premium Member
  • 381 posts

Thanks a lot!  Changing the spelling solved it. 

 

Hopefully my other two outstanding questions prove equally easy to solve.






Page loaded in: 1.117 seconds