Jump to content

Help with "AggroRange" Script


soaren

Recommended Posts

What I'm basically trying to do:

I have a need to be able to customize exactly how far away from a deathclaw I need to be before it charges me, the vanilla distance is too high.

 

Basic Pseudo Code:

 

{Find distance between player and current actor (the deathclaw)

if distance is equal to or less than x, startcombat}

 

This is what I have so far, but I'm having issues completing it.

 

;This script is used to tell an npc that if the player gets within a certain range to attack

;Partial Credit: redgoldblue0798/nexusforums

 

scn VaultXAggroRange

 

begin GameMode

 

GetDistance Player

 

if Player > x

StartCombat Player

endif

 

END

 

=========================

 

Your assistance helping me finish this script is highly appreciated. =)

Credit will be given assuming this mod makes it to the nexus... Not currently working, so it just might. xD

 

Devlin aka Soaren

Link to comment
Share on other sites

new version:

 

scn AggroRange ;names script

 

ref player ;does the player need to be referenced for this script to work?

 

begin GameMode ;script initialization

 

;!MISSING LINES THAT DETERMINE DISTANCE FROM ACTOR TO PLAYER NEED HELP WITH THIS

 

if Actor.GetDistance Player <=1 ;So if I put this script on a deathclaw, gecko, or a guard, the actor function would

;still function properly?

StartCombat Player ;get the current actor to engage the player in combat

endif

 

 

end

 

=======

Considering this isn't even done yet, is the syntax right thus far?

 

I still need to find a way to get the script to figure out the distance between the actor and the player.

 

I picked up a little C++ back in the day, but now that knowledge is barely existent. If someone could finish this script for me (it's basically done... missing maybe two lines), a kudo and credit for them.

 

It would make my day. So close but yet so far /cry.

 

Soaren

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...