Jump to content

(Dialogue) Scripting o.o


TodaY

Recommended Posts

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 player

if doonce == 0

NPCref.moveto markerref

NPCref.startconversation player

set doonce to 1

endif

end

 

 

 

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 scripts

I 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

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 player

if doonce == 0

NPCref.moveto markerref

NPCref.startconversation player

set doonce to 1

endif

end

 

 

 

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 scripts

I 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

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

@ 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

 

@ Uberman

It'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

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

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...