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

Arrow hit condition


Firon3
 Share

Recommended Posts

Hey there, I can't find the command to go along with the if. Here's the thing:

Sub OnArrowHit(Index, Damage)

> If Arrow = 3 then
> If Int(Damage) > 0 Then
> If Int(GetPlayerTarget(Index)) > 0 Then
> Target = GetPlayerTarget(Index)
> Call DamagePlayer(Index, Target, The Shooter's Magic + 4)
> Else
> Target = GetPlayerTargetNPC(Index)
> Call DamageNPC(Index, Target, The Shooter's Magic + 4)
> End If
> End If
> End if
> […]
> End Sub

The parts in red are problematic. I want this cuz I call an arrow in a spell to make a Magic projectile but the thing that's wrong is that it is considered as an arrow with no dammage addition, meaning I use the mage's raw strenght as damage modifier, wich is unwanted.
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...