rraoyxz Posted February 3, 2019 Share Posted February 3, 2019 I'm trying to have a couple NPCs start combat with the player once a quest stage is reached. It won't compile my "StartCombat" line. What am I doing wrong? scn QuestScript begin GameModeif(GetStage QuestScriptID == 20)enemyID1.StartCombat PlayerenemyID2.StartCombat PlayerenemyID3.StartCombat Playerend if end Link to comment Share on other sites More sharing options...
Mktavish Posted February 3, 2019 Share Posted February 3, 2019 You probably need ref ID's for the actors who will start combat ? The instructions on "StartCombat" are vague I know , but when it leaves it as an implicit reference , means it needs the ref ID instead of base ID . Also I don't think it would hurt to use "PlayerRef" instead of "Player"Which sometimes that difference need be used even though it doesn't say to. Off hand though , you should consider just putting this in the result script end of the stage tab ... but still may need the ref id's enemyID1.StartCombat PlayerenemyID2.StartCombat PlayerenemyID3.StartCombat Player Link to comment Share on other sites More sharing options...
rraoyxz Posted February 3, 2019 Author Share Posted February 3, 2019 I'll give that a shot. Otherwise, I was able to get it to work by going into "AI Packages," setting the Package Type to "Ambush," changing the "Ambush Location," checking "Ambush Target" and Specific Reference to Ref: Player, and setting a condition for GetStage ThisQuest == 20. Link to comment Share on other sites More sharing options...
rraoyxz Posted February 3, 2019 Author Share Posted February 3, 2019 Seems I need to do this with the AI Packages since I can't figure it out with scripts. I tried "enemyID.StartAttack Player Ref" in "Quest Stages" - "Result Script" AND in the result script under "Topics." Neither worked. (The editor automatically changed StartCombat to StartAttack.) Link to comment Share on other sites More sharing options...
Mktavish Posted February 3, 2019 Share Posted February 3, 2019 Okies a question about your "enemyID" is this an ID you made on the Reference window? Where are these references in relation to the PC upon the command ? Add edit: I'm not sure if this really matters ... but a naming convention of Ref's ... is to just take the base ID and and "Ref" to the end.If multiples are needed of the base-ID , then add the suffix of 01Ref , 02Ref ... example. Ending with Ref , seems to mABEEE matter ^shrug^ Just a mention because of quirkyness I have experienced. The fact the package is working , would be because it is attatched to the Base form , but still has reference needs all over the place.And yes that is a viable alternative route. The whole geck tool is very versatile , not just the dialogue tool , is just a small facet to the larger gem. So what matters in my opinion. Is does the mod writer understand the underlying processes they are implementing ... being more important than the most efficient way to get it done.Hence you are going to find routes that make more sense to you than others. And I suggest follow those routes of least resistance you find.There will be plenty of time to discover all the nooks and crannies of the geck if you so desire.But lets be frank ... you are not here to learn the intricacies of the geck.You are here to bring your game side render Idea into reality. So .... some advice I try and give for the bigger picture ... is to think about what you are doing with the geck. As trying to direct actors / effects on a stage. And never mind what they are doing back stage.You don't have to run the whole world ... just what the player will see . Link to comment Share on other sites More sharing options...
dubiousintent Posted February 4, 2019 Share Posted February 4, 2019 Back to the original post: "if(GetStage QuestScriptID == 20)" is a run-on statement. You need a space between the "if" and the open parens, as in: "if (GetStage QuestScriptID == 20)". Any parser can get fooled as to which line is causing a syntax error, so you need to always look at the immediately preceding lines as well. -Dubious- Link to comment Share on other sites More sharing options...
Mktavish Posted February 4, 2019 Share Posted February 4, 2019 Ahh ya ... that reminds me why I never use parenthesizes. And kinda ... if I need to include them , chances are I could get it done more simply. Fricken algebra foiled me , I hate it. All I can remember is the "FOIL" method . But geometry was easy ... I guess that is common ... people gravitate to one or the other ? Link to comment Share on other sites More sharing options...
Recommended Posts