hi, i am praticing scripting for quest and i have made this script. I want the npc to engage the player in convosation when he is in range.
scriptname greet
Short greet
ref mynpc2
Begin gamemode
if Greet == 0
if GetStage testquest == 0
if mynpc2.GetDistance Player < 3000
mynpc2.StartConversation player, greeting
set Greet to 1
endif
endif
endif
end
it does not work, do you have any ideas why?
thaks for any help
I am not an expert with scripts but are you sure that 'testquest' has been set?
I am also not sure of your syntax within the StartConversation line. The game may not complete the task if it cannot find the topic you specify.
I found the function @ the CS Wiki
here. But unless I am actually trying to use it is hard to say what is wrong, if anything.
Have a great day
Zurke
Code:
scriptname greet
Short greet
ref mynpc2
Begin gamemode
if Greet == 0
if GetStage testquest == 0
if mynpc2.GetDistance Player < 3000
mynpc2.StartConversation player, greeting
set Greet to 1
endif
endif
endif
end
I would change the distance to something like 512 (one cell = 4096) because 3000 isn't close enough.
I never tested it with the GREETING topic but in principle it should work.
As Zurke said make sure that the stage has been set.
I have thaught on it and I have got a barrel to set the stage to 0. I stole this script from the rufio script were ochieva greets you in the sactuary so the sintax should be okay. the only topic mynpc2 has is greeting.
I have changed the "if" for "quest stage to < 10"
i have another script that works with the same thing but instead of intiating a convosation with the player it sets stage to 10 so I think the script is okay. The dialogue screen does not make sense to me though so I may have done that wrong....
Could you attach the esp or send it via PM?
It's easier to check and answer your questions.
Sure.....
Okay, I have sent it by PM and thanks so much, I wasen't expecting you to be this enthusiastic about helping me.
Okay, im trying to make a new esp that should only bee a few kb..
Well, now i am having trouble with compatability with windows 7.... It keeps crashiong every time i try and edit ai or faction information.... gah, i really want a patch for my cs but i have the si version...