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

Order of creating new items

+
N

nayava

Senior user
#1
Sep 6, 2008
Order of creating new items

In the original game I liked the change of the fights between chapter one an two when you get the silver sword and suddenly monsters were defeating much easier. I like to extend this sequence of getting "better" weapons in my mod a little bit. So Geralt starts in my mod without a weapon. After some introduction in the situation he gets a dagger.To get to my question. Geralts enters a dark cave. A companion gives him a torch and tell him to lead the way. So I like to give Geralt this torch by script and let him drop the dagger. Because I do not know how to let Geralt drop something by script I destroy the dagger, create a torch on Geralt and after that I create another dagger. But unfortunately although in the script the torch is created first Geralt always has the dagger in his inventory and drops the torch. Someone knows how this problem can be solved?
 
A

ailinon

Senior user
#2
Sep 7, 2008
Does Geralt drop the torch, or does it simply disappear or something? Also, please paste the script that you're using, it'll be easier to find out what goes wrong.-- Sinus
 
N

nayava

Senior user
#3
Sep 7, 2008
Code:
DestroyObject(GetItemPossessedBy(OPC, "dagger"));CreateItemOnObject("touch", OPC);CreateItemOnObject("dagger", OPC);
I also tried to put the first two lines in one script with is called before talking to the companion and and the last into one that is called after. This did not work too.
 
A

ailinon

Senior user
#4
Sep 7, 2008
NayAva said:
CreateItemOnObject("touch", OPC);
Click to expand...
The supplied torch template is named "it_torch_001" or "it_torch_002" - but perhaps you are intentionally using your own.Did you write "touch" instead of "torch" in your script as well? Or is your item template really named "touch"?
 
N

nayava

Senior user
#5
Sep 7, 2008
That can not be the reason. I just call the items in this script torch and dagger because the names I gave them i23 and i18 does not tell you which one of them is the torch and which is the dagger.
 
A

ailinon

Senior user
#6
Sep 7, 2008
That's why I asked you to post the exact script you were using. So, your script has "i23" and "i18", right?In that case, try to store the result of the CreateItemOnObject function in a variable, and check if it isn't OBJECT_INVALID.
 
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.