Saturday, 28 June 2008

Maybe I'm stupid...

... but yesterday I realized the I can do conditional loops in conversations. I don't know why I missed it but it doesn't matter now. Okay, I did know how to make conditionals and conversation links, I'm not completely stupid :) What I needed it for is that damn boat travel that disturbs me by looking old school NWN1. I want the CutScene camera to track the boat down the river until the boat reaches a specific way point where the player can interact via the conversation that started the travel. The problem was that it's pretty difficult to calculate how long time it takes to travel between the way points so the conversation starts unpredictably and often very wrong.

This example convo shows an example loop (for everyone as stupid as me) that loops until the counter variable = 4. In my boat travel conversation this would be a variable set when reaching a specific waypoint or tripping a trigger. You can probable do it smarter (if so tell me, please).


Back to the toolset to start to implement it into the module. It won't be easy and I'm a bit nervous that messing with the existing scripts and conversations may give me real problems for a few days.

/A

[EDIT]
Yes, I'm stupid. This thing works but isn't the best way to do it. I'll ditch this baby immediately.

6 comments:

Wyrin said...

hehe

one caveat - if you want conditionals on player nodes, you will need to have the corresponding NOT conditional checked on the second node - otherwise if the condition is true, BOTH options will be visible. There's no fall through with PLayer nodes that there is with NPC nodes - so in the example you give, as soon as the counter hits 4, there will be 2 continue nodes to choose from (as both will be = TRUE)

Wyrin said...

also, somehting I've fiddled with but not got to work consistently is the ga_cutscene_move function, which might help

Amraphael said...

You're right Wyrin. But... :)
Since the Player Nodes contains only {} or || the first one will automatically fall through, even if both = TRUE.

Amraphael said...

I have played with the ga_cutscene_move.nss but without any predictable result. I suspect that the ActionPauseCutscene has some glitches in it.

EC said...

If what you want to do is have the boat creature move from one wp to another during a red node, pause the convo until it reaches its destination and then continue with the blue PC nodes when it arrives, then all you should need is an action script with ActionPauseCutscene and AssignCutsceneActionToObject/ActionMoveToObject on that red node. I've done in the past a complex boat travel scene with just these commands and it works fine.

If you want to change the camera shots along the way, you'll need to set up a sequence of red nodes with different (parameter-based) action scripts, moving the boat from one wp to the next on each node, with the proper camera setting on each of these nodes.

Amraphael said...

Thanks E.C.P.
I'll look into it. I may work better than the ga_cutscene_move and my own complicated loop.