Gray on 8/10/2021 at 19:39
Again, sorry if this is obvious. I did the search.
My issue is this: I'm attempting to do the simplest of conversations, frobbing an AI and allowing the player to choose from one of two options. I know, this is not how things are usually done in SS2, but they sometimes are in Thief, so there must be some overlap here that I can use. What I'm aiming for is to trigger a conversation with an AI where option A will trigger one event, and option B will trigger another. This isn't about text responses or voice files, just the basic mechanics. I'll figure out the rest later, or ask you again, when I get to that point. How can I frob an AI, get a text selection box, and click A or B? Any input is much appreciated. Thank you.
[Edit]
I doesn't actually have to be an AI. Just something that I can frob, and allow the player to choose A or B from some text box. I am trying to NOT do the career selection from Earth where you just walk into a door to choose, I'd prefer if it was something frobbable, but Earth style is my plan B.
vfig on 8/10/2021 at 22:08
Quote Posted by Gray
I know, this is not how things are usually done in SS2, but they sometimes are in Thief, so there must be some overlap here that I can use.
thats never how things are done in thief—thief has no scriptable ui at all!
but shock has some. i am not very familiar with it and dont have a shocked setup to test this with, but if you use squirrel you should be able to do this:
Code:
class Prompter extends SqRootScript {
function OnFrobWorldEnd() {
ShockGame.YorN(self, “Is this a question?”);
}
function OnYorNDone() {
if (message().yes) {
// player chose Yes
} else {
// player chose No
}
}
}
apologies for typos and bad indentation, and any other errors, im typing this on my phone. take a look at the newdark squirrel docs, specifically API-reference_Services.txt and API-reference_Messages.txt for more details. there might also be other useful ui functions in the ShockGame service, so read the docs and experiment!
ZylonBane on 9/10/2021 at 17:07
ShockGame.YorN() is only partially implemented. All it does is display a string on the screen with no UI.
If you want onscreen buttons to click, you're going to have to use scripting to either implement a custom overlay, or fake an overlay by spawning button-like objects into the world.
vfig on 9/10/2021 at 18:40
Quote Posted by ZylonBane
ShockGame.YorN() is only partially implemented. All it does is display a string on the screen with no UI.
oh damn. why am i not surprised? so yeah, if it has to be UI, then what ZB said: an overlay.
but an overlay is a complicated scripting task. youre probably better off just using a pair of buttons or your two doors.
voodoo47 on 10/10/2021 at 20:18
one of those forgotten gamesys mods did a clickable selector wheel when starting on medsci if memory serves.
Nameless Voice on 21/10/2021 at 16:01
In today's episode of "There's an NVScript for that":
If you were talking about Thief, I'd say that you might try NVDirectionalControl or NVConversation.
For the latter, apply it to a marker, and add ScriptLink links to each object which represents a conversation option.
When you activate NVConversation, it will allow you to pick from a list using movement controls. It will send TurnOn to the conversation option objects.
Use the NVConversationOption parameter to each conversation-option-object to set the label on that option.
It's already not a particularly nice UI in Thief, and I suspect that the way SS2's message log works will make it almost completely unusable there. Especially the constant beeping.
Gray on 6/12/2021 at 13:36
It would seem I've bitten off more than I can chew here. Thank you all for your kind input, but I think I'll have to abandon this idea, at least for now.
I'm quite thick now, due to 20 years of ME/CFS, and I've forgotten pretty much all I used to know about ShockEd, but since I started again a couple of months ago, things are starting to come back to me. I do search the forums, and sometimes even narcissistic crap like looking up my own old posts from 20 years ago to remind me of how I did a thing way back when. I am now considering creating a thread on how I'm doing all the ShockEd stuff nowadays, if nothing else so that I can look it up myself in a few years time when I've forgotten everything yet again, and possibly also be useful to other people. There are some little things I'm actually mildly proud of having done, but perhaps it's all so pedestrian now, given that more clever people than I have had 20 years to work on it. I'll ponder for a while whether my nonsense is worth posting. Just last night I was sitting up way too late to create a lamp you can shoot, to break it, with glass splinters flying, and the light going out. Pretty basic S&R, but I had forgotten how to do all that, and it feels pretty good to kick my very slow brain into gear again.