Spawning a npc in the world

Aeryna

Moderator
Staff member
Moderator
Joined
Oct 10, 2017
Messages
362
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.
 

Aeryna

Moderator
Staff member
Moderator
Joined
Oct 10, 2017
Messages
362
And how i retrieve that number?. /GetObjVars doesn't give me more info.
 

Aeryna

Moderator
Staff member
Moderator
Joined
Oct 10, 2017
Messages
362
I see. That helps a lot. Thank you.
 

shudo

New Member
Joined
Jun 27, 2017
Messages
3
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.
 
Top Bottom