Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with scripting
05-28-2010, 09:38 PM,
#1
help with scripting
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 Smile
Reply
05-29-2010, 01:27 AM,
#2
 
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
Reply
05-29-2010, 08:42 AM,
#3
 
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.
Dum loquor, hora fugitĀ  - While I speak the time flies



Ovid 43 BC - 17 AD
Reply
05-29-2010, 02:13 PM,
#4
 
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....
Reply
05-31-2010, 12:27 PM,
#5
 
Could you attach the esp or send it via PM?

It's easier to check and answer your questions.
Dum loquor, hora fugitĀ  - While I speak the time flies



Ovid 43 BC - 17 AD
Reply
05-31-2010, 12:36 PM,
#6
 
Sure.....
Okay, I have sent it by PM and thanks so much, I wasen't expecting you to be this enthusiastic about helping me. Tongue

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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)