Jump to content

movenpc


Stolao

Recommended Posts


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

Ive been thinking this for a while, and have mentioned it in the forums in passing a few times.

 

I think a more advance movenpc would be very useful

 

Current movenpc

*movenpc "<NPC name>",<x>,<y>{,<dir>};

This command looks like the NPCWalkToxy function,but is a little different.

While NPCWalkToXY just makes the NPC 'walk' to the coordinates given (which 
sometimes gives problems if the path isn't a straight line without objects), 
this command just moves the NPC. It basically warps out and in on the current 
and given spot. Direction can be used to change the NPC's facing direction.

Example(s):

// This will move Bugga from it's current position to the coordinates 100,20 
// (if those coordinates are walkable (legit)).
	moveNPC "Bugga",100,20;

 

My Suggestion

*movenpc "<NPC name>",{ "mapname", }<x>,<y>{,<dir>};

 

This would eliminate having to duplicate npcs and use enablenpc/disablenpc to move one npc around more then one map.

 

Whats your thoughts?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

From what I remember, something gets buggy when you move NPCs onto different maps in runtime. It's already possible with 'unitwarp':

unitwarp getnpcid(0),"<map name>",<x>,<y>;
A core dev could probably explain this better, though.
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

Ty Euphy, ill see how this work and see if its buggy still.

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

I want to re-suggest this command. Mainly because, unitwarp + getnpcid is still very buggy.

 

Some of things i've discovered is:

1. If the NPC has an OnTouch label, it will not activate at the new location (provided that location is outside of it's original cells).

2. The NPC doesn't recogize the new location as it's NEW location. It still holds all data to the original location marked in the script structure.

3. If a player walks over the cells where an NPC used to be, that has an OnTouch label, it will try to activate that label and fail, by sending errors to the map server, stating that the corresponding NPC is no longer there.

 

I'm sure there are a few more problems out there, but these are the ones i've found in the past couple days.

So again, I would like to re-suggest an updated command to move an npc across maps without these bugs.

 

This should be 100% possible, as I've had a src mod for eA a few years back that allowed me to create NPC duplicates on the fly as well as move the NPC across maps if I so choose to.

  • Upvote 1
Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  545
  • Reputation:   220
  • Joined:  03/01/13
  • Last Seen:  

I want to re-suggest this command. Mainly because, unitwarp + getnpcid is still very buggy.

 

Some of things i've discovered is:

1. If the NPC has an OnTouch label, it will not activate at the new location (provided that location is outside of it's original cells).

2. The NPC doesn't recogize the new location as it's NEW location. It still holds all data to the original location marked in the script structure.

3. If a player walks over the cells where an NPC used to be, that has an OnTouch label, it will try to activate that label and fail, by sending errors to the map server, stating that the corresponding NPC is no longer there.

 

I'm sure there are a few more problems out there, but these are the ones i've found in the past couple days.

So again, I would like to re-suggest an updated command to move an npc across maps without these bugs.

 

This should be 100% possible, as I've had a src mod for eA a few years back that allowed me to create NPC duplicates on the fly as well as move the NPC across maps if I so choose to.

 

You shared some really good information here. I do hope they get an opportunity to look into an improved movenpc and incorporate your ideas if/when they do. It'd be fun to see what it could be used for in quests after a rework.

Regards,

~Azura Skyy

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   4
  • Joined:  11/27/11
  • Last Seen:  

+1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  70
  • Reputation:   22
  • Joined:  07/10/12
  • Last Seen:  

From what I remember, something gets buggy when you move NPCs onto different maps in runtime. It's already possible with 'unitwarp':

unitwarp getnpcid(0),"<map name>",<x>,<y>;
A core dev could probably explain this better, though.

 

 

But does not work in random coordinates =/

Boarded the warp of the code, you can arrive at a possible solution since it checks if the cells are valid.

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.

×
×
  • Create New...