TnZ Scripting Tricks FAQ

+
m-alen said:
Hi, can anyone please tell me why the following script isn't working at all?
Code:
#include "inc_dialog"void main(){TeleportPCAndTalk(GetObjectByTag("nasz_zygfryd"), "rozmowa_zygfryd");}
Do you actually have an NPC with the tag "nasz_zygfryd"? Do you actually have a dialog/conversation named "rozmowa_zygfryd"?Beyond that, in my experience TeleportAndTalk does not work across region boundaries - the NPC has to already be in the same region as the player.
 
Hi, Thanks, I managed to get this script working!But now I have some new questions for people interested in scripts :) How can I make one NPC attack an other NPC? Namely, I want a bandit to talk to Geralt and then attack Dandelion just after the conversation.PS. And even more - I'd like Dandelion to fade out and lie on the floor after this single attack (to stand up some time later).I'll be grateful for any clues!
 
i don't have any actual answers, but if it's clues you want ... look at these functions, one of them must fit your scenarioAs for Dandelion getting back up later, i think you just need to make him "immortal" :)
 
I read djinni wiki in today morining:
void main()

{
SetStoryNPCStoryPhase("spawnset_name", "gone");
}
If you want to destroy an NPC you can do:

a,) teleport an object out of the location and then despawn/kill it. To teleport use ActionJumpToObject B,) or you can use DestroyObject – but it doesn’t always work on creatures

This script is doesn't work. I need further explantation of that things: ActionJumpToObject (This needs a character and a placeable tag?) and if create an empty phase with a name (gone) and use the upper script, the NPC disappear?
 
Top Bottom