Jump to content

Scripting problems


Don88

Recommended Posts

Can anyone help me? I am attempting to make a message box pop up, at the bottom of the screen. It is the start of the game. I am making a TC. I have no knowledge of scripting. I have scripting for dummies 5 but it doesn't help me! <_<

I have completed the tutorial that comes with it, sucessfully. If i am stupid just tell me the right answer. :blush: I don't know why this is happening. I have tried about 4 or 5 different scripts but none of them worked.

 

Ok my problem is this: I want a very simple script to display a message(easy?) :blush: and then make an npc move from point to point and stop. This is my script so far :

 

Begin CharGenWalkNPC

Short guardstate

 

Set guardstate to 1

If (guardstate == 1)

Set guardstate to 2

MessageBox "Oh good, you're alive. I thought we'd killed another slave. Well, c'mon don't just stand there, follow me!"

Endif

 

If (guardstate == 2)

AITravel 3970, 4313, 12053

set state to 3

Endif

 

 

If (guardstate == 3)

AITravel 3960, 4745, 12257

set state to 4

Endif

 

If (guardstate == 4)

AITravel 3709, 4353, 12287

set state to 5

Endif

 

If (guardstate == 5)

AITravel 3954, 4289, 12335

set state to 6

Endif

 

If (guardstate == 6)

AITravel 4179, 3249, 12306

set state to 7

Endif

 

 

 

End

 

 

The problem is that it says it over and over.... and then he doesn't move. I have tried with numerous names for my short but none worked. Can you please tell me where i went wrong? Or post a script which is a lot easier and has the desired outcome? As soon as I have this mastered, the better.....

Link to comment
Share on other sites

Ok i've got as far as my message box comes up but my npc doesn't move. Player controls are enabled though :blink: With this script:

Begin CharGenWalkNPC

 

Short guardstate

 

If ( guardstate == 0 )

MessageBox "Wake up, wake up! Oh good, you're alive. I thought we'd killed another slave. Well, c'mon don't just stand there, follow me!"

set guardstate to 1

Endif

If ( guardstate == 1 )

EnablePlayerControls

AITravel 3970, 4313, 12053

set guardstate to 2

Endif

 

 

End

Link to comment
Share on other sites

mabey you should remove the if guard state:

If ( guardstate == 0 )

MessageBox "Wake up, wake up! Oh good, you're alive. I thought we'd killed another slave. Well, c'mon don't just stand there, follow me!"

set guardstate to 1

Endif

 

or try this:

If ( guardstate == 0 )

MessageBox "Wake up, wake up! Oh good, you're alive. I thought we'd killed another slave. Well, c'mon don't just stand there, follow me!"

set guardstate to 3

Endif

If ( guardstate == 1 )

EnablePlayerControls

AITravel 3970, 4313, 12053

set guardstate to 2

Endif

 

cos when the textbox appears the guardstate is set to 1 but if the guardstate = 1 then all the controls will be enabled : If ( guardstate == 1 )

EnablePlayerControls. So I think you should try the last one mabey that one will work :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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