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

Open/close door by code

+
A

Arkray_gog

Forum veteran
#1
Sep 8, 2008
Open/close door by code

Hello, I need a bit of help, I would need to know if these 2 things can be done and how.1) Open/close doors (and chests) by code lines and not involving keys2) Check if a container has a determinated item (the function to ask for an item tag)I haven't touched D'jinni in months but I had an idea.... ;D Thanks for the help in advance!!!
 
A

Arkray_gog

Forum veteran
#2
Sep 8, 2008
I'll try to answer myslef a part of the question.... digging NWN functions I found this:
// Unlocked an object with the tag DOOR_TAGvoid main(){ object oDoor = GetObjectByTag("DOOR_TAG"); SetLocked(oDoor, FALSE);}
Click to expand...
Is that ok for D'jinni too? ???
 
G

Gamewidow

Forum veteran
#3
Sep 8, 2008
seems like it would work, but i'm curious, why would you need this anyway ? i guess i'd need a scenario to get my brain around your question ....
 
A

Arkray_gog

Forum veteran
#4
Sep 8, 2008
I can only tell a 'puzzle' ;D What about the checking contents of a container? I want the player to have put certain items in certain containers.... I saw the 'inventorydisturb' trigger, would that do? :angel:Thanks!!!
 
G

Gamewidow

Forum veteran
#5
Sep 8, 2008
if you make your containers into "storage" (by setting "is storage" to True) would that not achieve the same thing without a script ? That way you can even take stuff out again
 
A

ailinon

Senior user
#6
Sep 9, 2008
I believe arkray wants to create a puzzle in which the player has to put specific items in specific containers, and only then will a door be unlocked.Yes, SetLocked should do. As for the OnInventoryDisturbed action, this might be of help:void main() { object oItem = GetInventoryDisturbItem(); int nAction = GetInventoryDisturbType(); if (nAction == INVENTORY_DISTURB_TYPE_ADDED && CompareTag(GetTag(oItem),"item_tag_here",TRUE) { SetLocked(GetObjectByTag("puzzle_door"),FALSE); SpeakString("*click*"); }}
 
A

Arkray_gog

Forum veteran
#7
Sep 9, 2008
Ailinon said:
I believe arkray wants to create a puzzle in which the player has to put specific items in specific containers, and only then will a door be unlocked.Yes, SetLocked should do. As for the OnInventoryDisturbed action, this might be of help:void main() { object oItem = GetInventoryDisturbItem(); int nAction = GetInventoryDisturbType(); if (nAction == INVENTORY_DISTURB_TYPE_ADDED && CompareTag(GetTag(oItem),"item_tag_here",TRUE) { SetLocked(GetObjectByTag("puzzle_door"),FALSE); SpeakString("*click*"); }}
Click to expand...
THANK YOU!!!!!! That is what I need!!! Or aproximately, because the number of puzzles is increasing :whistle: I have a friend who is writing the clues. :peace: speakstring function will be useful too if it does what I think it does, make inanimated objects display a message.
 
N

nandusso

Senior user
#8
Sep 9, 2008
But if you use the SpeakString function how can you do for translating the string in others languages without modify the script?bye
 
A

Arkray_gog

Forum veteran
#9
Sep 9, 2008
Errr, that would be impossible, it is being written in English for especific reasons.... sorry. You'll know why if I ever complete it.
 
A

Arkray_gog

Forum veteran
#10
Sep 15, 2008
OOOOOOOK!I have a problem, Ican't make a placeable to store items... I even assigned an storage template in the store part, set usable when empty to true and nothing... I can't put things inside the container... any help please?What I would actually want is something similar to the sephirots thing, where every pylon only accepted a sephi...Thanks!
 
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.