Hello There, Guest! Login Register

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spawning a npc in the world
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) )

    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.
The ParentID should be the cell number, not the structure number.
And how i retrieve that number?. /GetObjVars doesn't give me more info.
ctrl-shift-g I believe
I see. That helps a lot. Thank you.
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.

Forum Jump:

Browsing: 1 Guest(s)