TodaY Posted September 18, 2010 Share Posted September 18, 2010 Hi there :) I'm trying to make a script that disables a creature, in dialogue, and a script that moves an NPC somewhere not in dialogue - but both seem to be unable to find the reference. The full move NPC script: Scriptname blablabla short doonce being ontrigger playerif doonce == 0NPCref.moveto markerrefNPCref.startconversation playerset doonce to 1endifend The full dialogue script: (it's only one line, but still =.= creatureref.disable I have also experienced the script not being able to find my reference in other scriptsI have set both the player & creature & heading marker to persistant reference, and made 100% sure i entered exactly what their reference ID was.Any ideas on how to solve this? Thanks for reading Link to comment Share on other sites More sharing options...
Shadowfen Posted September 18, 2010 Share Posted September 18, 2010 I'm trying to make a script that disables a creature, in dialogue, and a script that moves an NPC somewhere not in dialogue - but both seem to be unable to find the reference. The full move NPC script: Scriptname blablabla short doonce being ontrigger playerif doonce == 0NPCref.moveto markerrefNPCref.startconversation playerset doonce to 1endifend The full dialogue script: (it's only one line, but still =.= creatureref.disable I have also experienced the script not being able to find my reference in other scriptsI have set both the player & creature & heading marker to persistant reference, and made 100% sure i entered exactly what their reference ID was.Any ideas on how to solve this? Thanks for reading It was not clear to me from reading so I'll ask - are the NPCref and creatureref that you used in your scripts reference names or reference ids or reference variables? I've done the kinds of things that you are trying, but I pretty much always use named references and reference names in the scripts. Always had problems with using refids and have wondered if maybe I could assign the refid to a reference variable and make it work that way - but I've never tried it. Link to comment Share on other sites More sharing options...
ub3rman123 Posted September 18, 2010 Share Posted September 18, 2010 OnTrigger only works if something runs into it, in that case, it'll only run if the player bumps into the thing's collision. What's the intended effect of it?Edit: That's a triggerbox, isn't it? Also, if you want, you could try NPCRef.activate player if they're close enough. If they're friendly and the player's not dead, it'll have the same effect. TO make sure it's a problem with the script not finding the reference and not just it failing to run, try including some spare code line that gives you some indication of it running, like player.message "I ran!". Link to comment Share on other sites More sharing options...
TodaY Posted September 18, 2010 Author Share Posted September 18, 2010 @ Shadowfen I didnt even know there were differences o.-It's the reference ID.. I think.... You enter it in the box you get if you doubleclick on an object twice in the render window @ UbermanIt's not failing to run, it gives me an error message when I save - so I couldn't possibly try it out Thanks for your replies Link to comment Share on other sites More sharing options...
Hickory Posted September 18, 2010 Share Posted September 18, 2010 You mean the script is not compiling because it can't find the reference? Have you made the references permanent? Link to comment Share on other sites More sharing options...
TodaY Posted September 18, 2010 Author Share Posted September 18, 2010 You mean the script is not compiling because it can't find the reference? Have you made the references permanent? .... How do I make the permanent? Link to comment Share on other sites More sharing options...
Hickory Posted September 18, 2010 Share Posted September 18, 2010 You mean the script is not compiling because it can't find the reference? Have you made the references permanent? .... How do I make the permanent? In the CS make sure they have unique names (Reference Editor ID) that tally with your script, and check the box 'Persistant Reference'. Link to comment Share on other sites More sharing options...
TodaY Posted September 18, 2010 Author Share Posted September 18, 2010 You mean the script is not compiling because it can't find the reference? Have you made the references permanent? .... How do I make the permanent? In the CS make sure they have unique names (Reference Editor ID) that tally with your script, and check the box 'Persistant Reference'. I did that, it's in my first post Link to comment Share on other sites More sharing options...
ub3rman123 Posted September 18, 2010 Share Posted September 18, 2010 Hmm.. The only thing I can think of is: Did you close the reference pane after you'd set the reference name? Link to comment Share on other sites More sharing options...
Hickory Posted September 18, 2010 Share Posted September 18, 2010 You mean the script is not compiling because it can't find the reference? Have you made the references permanent? .... How do I make the permanent? In the CS make sure they have unique names (Reference Editor ID) that tally with your script, and check the box 'Persistant Reference'. I did that, it's in my first post So you did. My bad. Link to comment Share on other sites More sharing options...
Recommended Posts