CyrusFyre Posted October 17, 2012 Share Posted October 17, 2012 Okay so I'm very new to scripting. Really very "eep scripting" *hides*. So now I'm brave enough to try it only I can't get it to work right. I want to make an effect that summons a horse named Prophecy to an NPC named Indrele. Here's what I wrote: It is a magic effect and ScriptName 000IndrelesHorseCallScript float spiritTimer Begin ScriptEffectStart set spiritTimer to 3 ProphecyRef.Disable ProphecyRef.moveto IndreleHoldMarker 0, 0, 0 End Begin ScriptEffectUpdate if (spiritTimer > 0) set spiritTimer to (spiritTimer - GetSecondsPassed) return else ProphecyRef.moveto IndreleRef 150, 0, 0 ProphecyRef.Enable endif When I try to save it so I can actually make the power using this script it says "Script '000IndrelesHorseCallScript', line 8: Syntax Error. Invalid reference 'ProphecyRef' (only object references and reference variables are allowed in this context). I've made the horse and the NPC and placed them both in the world already so they do exist. So I'm not sure what it means. Please help. Anyone? I've been looking at TESCS Wiki and it has helped but it is not helping with this. Like I said totally new to this. Thanks in advance. (And the scripting has the proper indentions the forum just won't let me post it that way. *sigh*) (And sorry if this isn't where I should have put this.) Link to comment Share on other sites More sharing options...
Lanceor Posted October 17, 2012 Share Posted October 17, 2012 Is ProphecyRef the name of a persistent reference? In other words, after placing your horse in the game world, you need to edit it and...1) give it the name "ProphecyRef" in the Reference Editor ID box at the top2) tick the "Persistent Reference" box Without either of these, the reference cannot be acted upon by a script. Link to comment Share on other sites More sharing options...
DocRob Posted October 17, 2012 Share Posted October 17, 2012 Okay so I'm very new to scripting. Really very "eep scripting" *hides*. So now I'm brave enough to try it only I can't get it to work right. I want to make an effect that summons a horse named Prophecy to an NPC named Indrele. Here's what I wrote: It is a magic effect and ScriptName 000IndrelesHorseCallScript float spiritTimer Begin ScriptEffectStart set spiritTimer to 3 ProphecyRef.Disable ProphecyRef.moveto IndreleHoldMarker 0, 0, 0 End Begin ScriptEffectUpdate if (spiritTimer > 0) set spiritTimer to (spiritTimer - GetSecondsPassed) return else ProphecyRef.moveto IndreleRef 150, 0, 0 ProphecyRef.Enable endif When I try to save it so I can actually make the power using this script it says "Script '000IndrelesHorseCallScript', line 8: Syntax Error. Invalid reference 'ProphecyRef' (only object references and reference variables are allowed in this context). I've made the horse and the NPC and placed them both in the world already so they do exist. So I'm not sure what it means. Please help. Anyone? I've been looking at TESCS Wiki and it has helped but it is not helping with this. Like I said totally new to this. Thanks in advance. (And the scripting has the proper indentions the forum just won't let me post it that way. *sigh*) (And sorry if this isn't where I should have put this.) Check to make sure you checked the "Persistent Reference" checkbox on the horse; that should fix the invalid reference issue and the resulting error. :thumbsup: Link to comment Share on other sites More sharing options...
CyrusFyre Posted October 17, 2012 Author Share Posted October 17, 2012 That's what I did wrong! Thank you guys. And that was quick too. :sweat: Link to comment Share on other sites More sharing options...
CyrusFyre Posted October 17, 2012 Author Share Posted October 17, 2012 Okay, new problem. I'm trying to edit a single cm partner to have a horse. Because I don't want to mess with every cm partner I'm just making a new script by copying all of the cm partner scripts over and then adding the horse riding scripts to that. Except that when I try to save it tells me that there is a problem with the part that is in the original cm partner script. if teleport == 1 && command == 0 && cmPartnersQuest.nLockNPC == 0 ; Teleport script for Mark and Return set teleport to 2 RemoveScriptPackage SetFactionRank NPCParty, 0 PlaySound AMBThunder if pfacing < 90 ; northeasterly MoveTo cmPartnersMark1, -50, -50, 10 elseif pfacing < 180 ; southeasterly MoveTo cmPartnersMark1, -50, 50, 10 elseif pfacing < 270 ; southwesterly MoveTo cmPartnersMark1, 50, 50, 10 else ; northwesterly MoveTo cmPartnersMark1, 50, -50, 10 endif It says, "Item 'cmPartnersMark1' not found for parameter ObjectReferenceID." I'm not sure what that means exactly. But it is like that for every cm partner using the Partner Script, even Valtiero. And I'm afraid to mess with it. Help. :( Thanks. Link to comment Share on other sites More sharing options...
DocRob Posted October 17, 2012 Share Posted October 17, 2012 Yep, it's easy to forget that checkbox--I do it all the time with doors myself. :wallbash: :laugh: CMPartnersMark1 is an object (mostly likely an "x-marker) that the script is referring to as a reference for the destination; you copied the scripts over, but not that. Which in this case, is...I kid you not, a mudcrab. (Using creatures as markers is a trick outlined in the CS Wiki; in fact I was just reading it earlier, kind of ironic.) It's posted in the Market District; easiest way to find it is to do a text search (Edit-Find Text) in the CS and click on the Objects tab (make sure both CM Partners.ESM and CM Partners.ESP are checked when you load it into the CS). Double click the result, and it will take you to ICMarketDistrict03 8, 16 if you click on it, and right to the marker (mudcrab) itself. You could use the info for it to re-create it in your own mod (I'd recommend placing it back in the same location in your mod, though it's probably not necessary if I read that Wiki article right.) Hope that helps! Link to comment Share on other sites More sharing options...
CyrusFyre Posted October 18, 2012 Author Share Posted October 18, 2012 Thanks! Kudos for you! Okay so now I got them to summon and mount up but then it seems to break their follow scripts. So now I've made a mess and I've no idea how to fix it. So if someone could maybe take a look at it and tell me what the heck I did wrong I'd be ever so grateful. :ohdear: Thanks in advance. You guys are awesome! :D Link to comment Share on other sites More sharing options...
Recommended Posts