Been a good while… Refresh my memory? :)

Well I have come back to Eclipse, and am astounded at MrMiguu’s Project Vertigo.  A million kudos to him.  But Can someone help me touch up on the best way to do the following?  Just a few words per answer to brush up my memory will work

I have gangs, and I plan to make each gang a class.  While avoiding sadscript/source edits [although I am capable and willing if necessary], how can I eliminate the friendly fire?  The game is mostly full of guns, so I would want arrows to go through the same element the bowman it was fired from.  Does that make sense?

I will edit this post as opposed to flooding the questions board if I am stuck.  I just have a lot of questions come to mind, as I am not capable of using Eclipse just yet, and am still using paper to design the layouts of the game.

I’m not sure about scripting with Project Vertigo, if you are using that, but EE 2.7 onward has a new OnAttack sub that allows you to make a check for this. All you’d have to do is add a line like this to your OnAttack sub:

If GetPlayerClass(index) = GetPlayerClass(target) Then
    Call BattleMsg(index, "You can't attack your own gang member!", BRIGHTRED, 0)
    Exit Sub
End If

This would go under the line that says something like:

Target = GetPlayerTarget(index)

How incredibly convenient!
Thanks so much.  And sorry for the specifics, but would an arrow stop at a same-class victim, or go through them?  If you don’t know, don’t go through the trouble of checking; I am not completely lazy 😉

It would stop.

Also, make sure you add that code bit to OnArrowHit, as well, since 2.7 splits arrows and melee into separate attack subs.

Log in to reply