Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spawning a npc in the world
#1
Using this code in screenplays will spawn a npc "chiss_male" being "happy" on "tatooine" at the chosen position, with the PARENTID "6016504" which manages he will be inside the building "6016504". Am i right?

spawnMobile ("name_planet", "npc", TimeToRespawn_when_dead, positionX, positionZ, positionY, Watch_Direction, PARENTID(structure CELL number) )


Code:
    pNpc = spawnMobile("tatooine", "chiss_male",60,8.0,-3.4,7.4,169,6016504)
    self:setMoodString(pNpc, "happy")


So, why when i use to spawn iniside a building my npc is running ,and doesn't stop, and he cannot be attacked?

What's wrong?. I just spawned at my current position and copied to lua.
 
Reply
#2
The ParentID should be the cell number, not the structure number.
 
Reply
#3
And how i retrieve that number?. /GetObjVars doesn't give me more info.
 
Reply
#4
ctrl-shift-g I believe
 
Reply
#5
I see. That helps a lot. Thank you.
 
Reply
#6
Like Phoenix said. But you got to use the wp details from that window, not your standard char wp from the ui. that's why they are running.
 
Reply
  



Forum Jump:


Browsing: 1 Guest(s)