Jump to content

Creature Script - BasicNPC Question


Dahak
 Share

Recommended Posts

"target" is definitely used. It's in the START_STATE and is used to check whether or not the creature has a target. You'll want to leave this in.

 

"i", on the other hand doesn't seem to be used, you're right. Leaving it in won't hurt the script though. I'd just add new variables on top of the existing ones, leaving those two alone.

Link to comment
Share on other sites

Dahak is correct: neither of these variables is ever used. Both should be deleted, but there's no performance hit associated with having them, so you can just ignore them.

 

Nico, you're being confused by the fact that each creature, internally to the game engine does have a 'target' variable, which is accessed via get_target(), set_target(), and target_ok(). These functions have nothing whatsoever to do with any variables in the script itself, even in spite of one of them being named 'target'.

Link to comment
Share on other sites

Originally Posted By: Niemand
Nico, you're being confused by the fact that each creature, internally to the game engine does have a 'target' variable, which is accessed via get_target(), set_target(), and target_ok(). These functions have nothing whatsoever to do with any variables in the script itself, even in spite of one of them being named 'target'.


Niemand, you're being confused by my PDN's, though I shall tell the real Nicothodes that you got me confused for her. wink

And yeah, I posted that this morning, after just getting up, and briefly checking basicnpc. Going back, I can see the variable isn't used.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

 Share

×
×
  • Create New...