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

TnZ Scripting Tricks FAQ

+
Prev
  • 1
  • …

    Go to page

  • 4
  • 5
  • 6
  • 7
Next
First Prev 6 of 7

Go to page

Next Last
G

Gamewidow

Forum veteran
#101
Oct 9, 2008
Not exactly on topic here, but of interest:I just finished adding about 800 or so documents to the djinni wiki .. one document per scripting function ... I may have missed a few, but the large part of them are all there. You can link to the top launch page herei only copied the text Simon dumped in there from the nss.api and a lot of it is still in Polish, so please, those of you know know how these functions work, please have a look and flesh out those entries to help others .. i can't do it alone :)
 
R

ralf1731

Senior user
#102
Oct 9, 2008
Thanks a lot for this work. The most fuktions are in the nwn-lexicon too. you could copy, paste...But there are some different fct. I like the examples in the nwn-lexicon.
 
A

ailinon

Senior user
#103
Oct 9, 2008
Note that a vast majority of those doesn't really need redocumenting - they're the same functions that the NWN/NWN2 community has been using for the past few years. NWN Lexicon, has dozens of them documented quite extensively - oops, as Ralf stated in the meantime.
 
G

Gamewidow

Forum veteran
#104
Oct 9, 2008
well it's done nowdo with it what you will
 
U

username_2075278

Senior user
#105
Oct 9, 2008
Ailinon said:
Note that a vast majority of those doesn't really need redocumenting - they're the same functions that the NWN/NWN2 community has been using for the past few years. NWN Lexicon, has dozens of them documented quite extensively - oops, as Ralf stated in the meantime.
Click to expand...
It's true that a lot of the functions are the same as in earlier versions of Aurora. But surprisingly many aren't, and also the Witcher does many things differently from previous Aurora games. Also, some things which worked in earlier versions of Aurora may not work in The Witcher, so having our own documentation is no bad thing. I agree that doing something systematic to link to the NWNLexicon version of the documentation would be a good idea, I may even get round to doing something about it.But the Widow's but a huge amount of work in here - it's worth a 'thank you', I think, rather than a dismissive comment. If it doesn't help you it doesn't, but it will help lots of people.
 
G

Gamewidow

Forum veteran
#106
Oct 9, 2008
thanks Simon :)
 
A

ailinon

Senior user
#107
Oct 9, 2008
By all means, more resources is a good thing, not a bad one! Never have I meant my comment to be dismissive, and Game Widow has my most sincere apologies if it came out wrong.What I meant, perhaps in a too much imprecise manner, was that most of those functions work just as other sites document them - AND if they work differently in The Witcher, that's what deserves the most attention. So, instead of just documenting or translating Polish documentation, I think the most focus from now on - now that the big-ass starting brick has been placed - should be the Witcher peculiarities. Like, SetName not working at all, or something.
 
R

ralf1731

Senior user
#108
Oct 9, 2008
@Ailinon object oPC = GetFirstPC();if (!GetLocalInt(oPC,"SCRIPT_ALREADY_RAN")) {
Click to expand...
 
A

ailinon

Senior user
#109
Oct 10, 2008
But... that's essentially the same. How odd.
 
N

nandusso

Senior user
#110
Oct 10, 2008
.. bah!.. To check I've tried this script and it works.void main(){ object oPC = GetFirstPC(); if (!GetLocalInt(oPC,"ciop")) { PrintString("ciop"); SetLocalInt(oPC,"ciop",1); }}Futile things, anyway ;)bye
 
R

ralf1731

Senior user
#111
Oct 10, 2008
Where do you check? In a Trigger "OnEnter"?Edit:
@nandussoAnyway, in other scripts I've seen that Set/GetLocalInt works well with the PC ( GetFirstPC ) but with the NPC sometime works and sometime doesn't, as if the game forgot the int.
Click to expand...
Exactement!
 
N

nandusso

Senior user
#112
Oct 12, 2008
No, I've run the script manually while the game was running, to see the output in the aurora log.Anyway, in other scripts I've seen that Set/GetLocalInt works well with the PC ( GetFirstPC ) but with the NPC sometime works and sometime doesn't, as if the game forgot the int.bye
 
R

ralf1731

Senior user
#113
Oct 19, 2008
I never worked with the switch-command, but i want learn. I know its similar to the if-command.Set in the cow-Heartbeat the following script:void main(){int nRoll;object oAp = GetObjectByTag("wp_kuh1");nRoll = Random(4);switch (nRoll) { case 0: // Nothing happens case 1: ActionMoveToObject (oAp, TRUE); break; case 2: ActionRandomWalk(); break; case 3: ActionWait(20.0); break; }}The cow stand and is doing nothing.
 
G

Gamewidow

Forum veteran
#114
Oct 19, 2008
Ralf ... serais-tu par chance français ? :)I pointed out your script to simon, maybe he has some ideas :wave:
 
U

username_2075278

Senior user
#115
Oct 19, 2008
Ralf1731 said:
I never worked with the switch-command, but i want learn. I know its similar to the if-command.Set in the cow-Heartbeat the following script:void main(){int nRoll;object oAp = GetObjectByTag("wp_kuh1");nRoll = Random(4);switch (nRoll) { case 0: // Nothing happens case 1: ActionMoveToObject (oAp, TRUE); break; case 2: ActionRandomWalk(); break; case 3: ActionWait(20.0); break; }}The cow stand and is doing nothing.
Click to expand...
Note, I have not tested this. But in your case 0 there's no break, so it will just drop through to your case 1. I think what you meant is probably:
Code:
void main(){    int nRoll;    object oAp = GetObjectByTag("wp_kuh1");    nRoll = Random(4);    switch (nRoll) {      case 0:  		// Nothing happens 		break;          case 1:        ActionMoveToObject (oAp, TRUE); break;      case 2:  		ActionRandomWalk(); break;      case 3:  		ActionWait(20.0); break;     }}
Frankly I'd be inclined to rewrite that:
Code:
void main(){    object oAp = GetObjectByTag("wp_kuh1");    int nRoll = Random(4);    switch (nRoll) {      case 1:        ActionMoveToObject (oAp, TRUE); break;      case 2:  		ActionRandomWalk(); break;      case 3:  		ActionWait(20.0); break;       default:        /* nothing happens */    }}
The 'default' is technically redundant but does not harm. Finally, you're switching between actions but you're not actually assigning those actions to anyone. I suspect what you really want is:
Code:
void main(){    object oAp = GetObjectByTag("wp_kuh1");	object oPlayer = GetFirstPC();    int nRoll = Random(4);    switch (nRoll) {      case 1:        AssignCommand( oPlayer, ActionMoveToObject (oAp, TRUE)); break;      case 2:  		AssignCommand( oPlayer, ActionRandomWalk()); break;      case 3:  		AssignCommand( oPlayer, ActionWait(20.0)); break;       default:        /* nothing happens */    }}
 
R

ralf1731

Senior user
#116
Oct 19, 2008
@Simon Brookethanks1. code:
 
A

ailinon

Senior user
#117
Oct 20, 2008
Keywords are case-sensitive. Are you writing the 'if' lowercase or uppercase? Should be definitely lowercase...
 
R

ralf1731

Senior user
#118
Oct 21, 2008
oh my god, im stupid.... need a break... thanks
 
A

ailinon

Senior user
#119
Oct 23, 2008
On-Anything script hooks work only with script set "custom" - but then you don't have fighting capabilities, etc. For enhancing the default script set, you need the OnUserEvent hook.
 
M

m-alen

Senior user
#120
Oct 30, 2008
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");}
 
Prev
  • 1
  • …

    Go to page

  • 4
  • 5
  • 6
  • 7
Next
First Prev 6 of 7

Go to page

Next Last
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.