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

*NPC* couldn't hurt you!


Dethtou
 Share

Recommended Posts

I don't think there is a way to turn it off. Only thing I can think of is to  make you NPC's have more STR. I think the fighting system is a little wired my self. I don't think that just because you have a higher DEF then the NPC has STR it shouldn't beable to hurt you. It should do less damage then normal.
Link to comment
Share on other sites

This is the only thing I could find that looks like it may effect an NPC attacking.

```
Sub PlayerHit(Index, NPCNum, Damage)
If Damage > 0 then
Call NPCAttack(NPCNum, Index, Damage)
End If
End Sub
```
If this is it then I would just have to alter it to this

```
Sub PlayerHit(Index, NPCNum, Damage)
If Damage = 0 then Damage = 1
Call NPCAttack(NPCNum, Index, Damage)
End If
End Sub
```
If this is right is there a call to get the NPC's STR so I could make the NPC do half its normal Damage if they players has a higher DEF then the NPCs STR?
Link to comment
Share on other sites

That's not right, but you can do what you mentioned. This is the correct way:

```
Sub PlayerHit(Index, NPCNum, Damage)
  If Damage = 0 then Damage = 1
  Call NPCAttack(NPCNum, Index, Damage)
End Sub
```
Just compare the hitting NPC's strength with the player's defense. You'll have to make your own math within the sub, but it's a lot easier than altering player's damage.
Link to comment
Share on other sites

Something like

```
If Damage < GetNpcStrength(GetMapNPCnumber(GetPlayerMap(index), NPCNum)) \ 2 Then Damage = GetNpcStrength(GetMapNPCnumber(GetPlayerMap(index), NPCNum)) \ 2
```

The scripting part of it in really simple. It's just coming up with the damage pattern that you want to use. This, for example, makes all NPCs do at least half damage. It doesn't have to be this simple. You can make it whatever you want. Someone can script it for you.
Link to comment
Share on other sites

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