Jump to content

Scripts


Recommended Posts

Are there any guides for writing scripts?

I notice that BG EE has more scripts than I remember, but I want to try and improve on one I used to use.

There is still the script where the characters use missiles, and withdraw to maintain distance from their targets, and then change to melee when they are attacked in melee.

But I want them to stand their ground and use missiles and then change to melee when their target is within melee range.

Is this possible?

 

Cheers!  😄

 

Link to comment
27 minutes ago, CamDawg said:

Even though it's fairly dated at this point, I think the Ding0's Complete Scripting Guide is an excellent starting point.

Excellent, thanks for that.

I want the party to switch to melee when strategically suitable, not wait until they get hit with a melee weapon.

EG swapping from long bow to sword and shield should get the shield AC before they get hit and so on. And maybe they will get the first strike on the approaching gnoll or whatever.

Cheers!

Link to comment
Guest morpheus562

Sorry if I am late, but these should do it for you:
 

IF
  Range([EVILCUTOFF],3)
  IsWeaponRanged(Myself)
THEN
  RESPONSE #100
    EquipMostDamagingMelee()
END

IF
  !Range([EVILCUTOFF],3)
  !IsWeaponRanged(Myself)
  CanEquipRanged()
THEN
  RESPONSE #100
    EquipRanged()
END

Feel free to adjust the distance of "3" to whatever distance you want to set it at. This should get you from ranged to melee and then back to ranged depending on how far away enemies are from the character.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...