Jump to content

Recommended Posts

Posted

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

Posted

this is how you need to use the GetDistance function

so you need to have the ref of the DeathClaw

and you should check if the distance is smaller than the limit, then start combat

 

i'm not sure if the StartCombat function will work, but i't might, and it's worth a try

 

hope this helps :)

Posted

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

Posted

as far as i know, it's almost correct

but again, you need it to start a combat if the distance is LESS than a certain value, so it should be <=, not >=

and this should work, as far as i know

 

however, scripting creatures could cause problems, so check things carefully

  • Recently Browsing   0 members

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