Forums
Games
Cyberpunk 2077 Thronebreaker: The Witcher Tales GWENT®: The Witcher Card Game The Witcher 3: Wild Hunt The Witcher 2: Assassins of Kings The Witcher The Witcher Adventure Game
Jobs Store Support Log in Register
Forums - CD PROJEKT RED
Menu
Forums - CD PROJEKT RED
  • Hot Topics
  • NEWS
  • GENERAL
    THE WITCHER ADVENTURE GAME
  • STORY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 THE WITCHER TALES
  • GAMEPLAY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 MODS (THE WITCHER) MODS (THE WITCHER 2) MODS (THE WITCHER 3)
  • TECHNICAL
    THE WITCHER THE WITCHER 2 (PC) THE WITCHER 2 (XBOX) THE WITCHER 3 (PC) THE WITCHER 3 (PLAYSTATION) THE WITCHER 3 (XBOX) THE WITCHER 3 (SWITCH)
  • COMMUNITY
    FAN ART (THE WITCHER UNIVERSE) FAN ART (CYBERPUNK UNIVERSE) OTHER GAMES
  • RED Tracker
    The Witcher Series Cyberpunk GWENT
THE WITCHER
THE WITCHER 2
THE WITCHER 3
MODS (THE WITCHER)
MODS (THE WITCHER 2)
MODS (THE WITCHER 3)
Menu

Register

Turning Enemies Hostile and Making NPC's Vanish

+
2

234ab

Rookie
#1
Dec 4, 2011
Turning Enemies Hostile and Making NPC's Vanish

Somebody fix this for me?

#include "inc_ai"

void main()

{
object oPC = GetFirstPC();
object oVetala = GetObjectByTag("Yaevin");
AI_ClearPersonalAttitude(oVetala, oPC);
AI_SetPersonalAttitude(CN_ATTITUDE_HOSTILE, oVetala, oPC);
SetProfile(oVetala, PROFILE_TYPE_ENEMY_WITCHER, TRUE);
}

(Yaevin a script of Yaevinn) It's don't modified. And an another talk: How can I create this? (When a conversation ends, a character disappear with a special effect) (example: azar javed with that lighting bolts)

Yours sincerely
234ab
 
C

Corylea.723

Ex-moderator
#2
Dec 7, 2011
234ab said:
Somebody fix this for me?

#include "inc_ai"

void main()

{
object oPC = GetFirstPC();
object oVetala = GetObjectByTag("Yaevin");
AI_ClearPersonalAttitude(oVetala, oPC);
AI_SetPersonalAttitude(CN_ATTITUDE_HOSTILE, oVetala, oPC);
SetProfile(oVetala, PROFILE_TYPE_ENEMY_WITCHER, TRUE);
}
Click to expand...
The script is correct, except that I don't know if that's the right character tag. Is "Yaevin" the character tag of the character in question? What does the Aurora log say when you compile the script?

Here's the script I used to turn Elianna Corbett hostile in "Medical Problems 2." As you can see, it's exactly the same script, except that it's a different object name and a different tag, since it's turning a different character hostile.

#include "inc_ai"

void main()
{
object oPC = GetFirstPC();
object oEli = GetObjectByTag("ck_elianna");
AI_ClearPersonalAttitude(oEli, oPC);
AI_SetPersonalAttitude(CN_ATTITUDE_HOSTILE, oEli, oPC);
SetProfile(oEli, PROFILE_TYPE_ENEMY_WITCHER, TRUE);
}
Click to expand...

And an another talk: How can I create this? (When a conversation ends, a character disappear with a special effect) (example: azar javed with that lighting bolts)
Click to expand...
You can teleport the character to a new place to get him to vanish without running to his despawn point.

To make a special effect at the place where the character has vanished, create a special effect at that spot. To get the special effect to happen right before the character vanishes, use a delay command to make the teleporting out happen a couple of seconds after the special effect starts. If you look at the scripts in "The Price of Neutrality," you can see how the folks at CDPR made a teleportation special effect around Sabrina. Or if you look at the scripts in "Medical Problems 2," you can see how I made a teleportation special effect around Geralt. Just substitute the special effect of your choice for the teleportation special effect.

You need to be able to read through the scripts in previously-made adventures and figure out how they did what they did -- that's the key to doing stuff like this.
 
2

234ab

Rookie
#3
Dec 7, 2011
THANK AGAIN, Corylea. what is name of script, otherwise? (in Price of Neutrality) I see manually in Djinni, and use tag of ck_elianna in the "enemyscript".
 
C

Corylea.723

Ex-moderator
#4
Dec 7, 2011
234ab said:
THANK AGAIN, Corylea. what is name of script, otherwise? (in Price of Neutrality)
Click to expand...
I don't remember the name of the script; I'd find it by looking through the scripts in that adventure, and you can do that, yourself. I recommend that you look through most of the scripts in that adventure, just to get a sense of what's possible and how things are done.


234ab said:
I see manually in Djinni, and use tag of ck_elianna in the "enemyscript".
Click to expand...
No, no! You use the tag OF THE CHARACTER YOU WANT TO TURN HOSTILE.

"ck_elianna" is the character I wanted to turn hostile. You need the tag for the character you want to turn hostile.

Here's a picture of where to find the character tag:



Open up the character template of the character you want to turn hostile and copy the tag from there.


P. S. -- I edited the title of this topic to reflect what you were talking about. When people have Djinni questions, it helps if they can search the forum for answers, so I gave your topic a more descriptive title, so as to be of more use to future modders.
 
2

234ab

Rookie
#5
Dec 9, 2011
Corylea said:
I don't remember the name of the script; I'd find it by looking through the scripts in that adventure, and you can do that, yourself. I recommend that you look through most of the scripts in that adventure, just to get a sense of what's possible and how things are done.

- Okay.

No, no! You use the tag OF THE CHARACTER YOU WANT TO TURN HOSTILE.

- Hey, relax. I said: the character tag doesn't work...
Here's a picture of where to find the character tag:

I know to where find a tag :D
Click to expand...
 
2

234ab

Rookie
#6
Dec 10, 2011
It seems the "enemyscript" had no NCS. This is the problem after all.
 
C

Corylea.723

Ex-moderator
#7
Dec 10, 2011
234ab said:
It seems the "enemyscript" had no NCS. This is the problem after all.
Click to expand...
Ah. Yes, that would be a big problem. :eek:
 
2

234ab

Rookie
#8
Dec 10, 2011
Corylea said:
Ah. Yes, that would be a big problem. :eek:
Click to expand...
I return later that "hostile part". I try to make that NPC vanish. 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?
 
Share:
Facebook Twitter Reddit Pinterest Tumblr WhatsApp Email Link
  • English
    English Polski (Polish) Deutsch (German) Русский (Russian) Français (French) Português brasileiro (Brazilian Portuguese) Italiano (Italian) 日本語 (Japanese) Español (Spanish)

STAY CONNECTED

Facebook Twitter YouTube
CDProjekt RED Mature 17+
  • Contact administration
  • User agreement
  • Privacy policy
  • Cookie policy
  • Press Center
© 2018 CD PROJEKT S.A. ALL RIGHTS RESERVED

The Witcher® is a trademark of CD PROJEKT S. A. The Witcher game © CD PROJEKT S. A. All rights reserved. The Witcher game is based on the prose of Andrzej Sapkowski. All other copyrights and trademarks are the property of their respective owners.

Forum software by XenForo® © 2010-2020 XenForo Ltd.