Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO 2.0] NPC Speech Box with NPC Face.


Broojo02
 Share

Recommended Posts

  • Replies 121
  • Created
  • Last Reply

Top Posters In This Topic

@figo566:

> Can you show us the source for block the npc when speaking and when finished, the npc can move.
>
> Thanks

I will success blocking the npc but how can I send at the server the npc move when i close the speechbox ??
Link to comment
Share on other sites

  • 1 month later...
Good, short, simple and effective, here is a screenshot of mine :). Note: i chose not to have the face =)

[![](http://img811.imageshack.us/img811/1091/yayv.png)](http://imageshack.us/photo/my-images/811/yayv.png/)

Uploaded with [ImageShack.us](http://imageshack.us)

also for those who were wondering, i commented out the optional line, it only affects npc for whom this box will popup. IE, if you remove it, the hostile npcs will still talk in your chatbox.
Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...
Would it be possible to make this define the face by using the range the npc is set at, instead of its number?

Edit: Nevermind I figured it out. You simply change this bit:

```
If Not FileExist(App.Path & "\data files\graphics\faces\" & (NPC(npcNum).Sprite) & ".bmp", True) Then
        frmMain.picSpeechFace.Picture = LoadPicture(App.Path & "\data files\graphics\faces\" & "default.bmp")
    Else
        frmMain.picSpeechFace.Picture = LoadPicture(App.Path & "\data files\graphics\faces\" & (NPC(npcNum).Sprite) & ".bmp")
    End If
```
To this instead:

```
If Not FileExist(App.Path & "\data files\graphics\faces\" & (NPC(npcNum).Range) & ".bmp", True) Then
        frmMain.picSpeechFace.Picture = LoadPicture(App.Path & "\data files\graphics\faces\" & "default.bmp")
    Else
        frmMain.picSpeechFace.Picture = LoadPicture(App.Path & "\data files\graphics\faces\" & (NPC(npcNum).Range) & ".bmp")
    End If
```
Anyway, I personally find this more convenient than using the sprite number.
Link to comment
Share on other sites

  • 2 months later...
  • 3 weeks later...
Alright, well this had been bugging me, but I'm trying to use this alongside Captain Wabbit's Ranged Projectiles system and I get an error: Runtime error 9 Subscript of out range and with it highlighted a line. See my attachment.

EDIT!!!!

Also.. would a ranged attack on an NPC trigger speech?
Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...
I LOVE THIS!

HOWEVER. I have a few concerns.

1) The box will only display text that NPC is given upon attack.

2) The box will only display text when 'attacked'. (because you're not really hurting them, you're only triggering them to talk when you press the attack key.) However I'm running a projectile code on my client and an arrow will kill them and attacking close will still kill them

3) The box will only display what's given. It'd be nice to have options to lead to more conversation than just one box per NPC.

So, I'm thinking we can achieve clickable NPCs through changing code from:
```
Call SpeechWindow(attacker, Trim$(Npc(npcNum).AttackSay), npcNum)
```
to something like 'DoubleClickSay' instead of AttackSay. Where DoubleClickSay will be triggered from double clicking on picScreen when the NPC is targetted.

:O Just coming back from a 9 month break (school and what not) and I'd like to contribute xD
Link to comment
Share on other sites

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...