Thread: warpto&putnpc2
View Single Post
  #1  
Old 12-14-2001, 03:19 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
Lightbulb for future reference...

i figured it out.. (with help from er1c)

here is what er1c contributed:

NPC's layed with putnpc2, are local to the level.

here is what i figured out..

an easy way to put an npc in any level, and keep the original db npc in the same level is this:
NPC Code:

setstring this.oldlevel,#L;
this.oldx=x;
this.oldy=y;
warpto layinglevel,layx,layy;
putnpc2 layx,layy,{script;}
warpto #s(this.oldlevel),this.oldx,this.oldy;



it warps the db npc to the level at the x,y to lay at, puts the npc, then warps it back right where it came from.

easy, simple, precise.

so please dont post about this anymore.