• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Interface,... stream and delay

Capitan Blood

Landlubber
hi again!
and new question:
i create new interface - images and button - in my mod i use it,
i mast print it on screen and then user push button continue quest, but then i write code and test it i see:
dialog box on screen and after(whithout delay) contionue quest...

question: hopw stop quest until button not push?
 
<!--QuoteBegin-Capitan Blood+Jul 5 2005, 05:20 AM--><div class='quotetop'>QUOTE(Capitan Blood @ Jul 5 2005, 05:20 AM)</div><div class='quotemain'><!--QuoteEBegin-->hi again!
and new question:
i create new interface - images and button - in my mod i use it,
i mast print it on screen and then user push button continue quest, but then i write code and test it i see:
dialog box on screen and after(whithout delay) contionue quest...

question: hopw stop quest until button not push?
<div align="right">[snapback]121448[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> Capitan Blood! If I read this correctly, you need to pause a quest while your screen shows, with a choice, and until the user makes the choice, the quest will not go on, yes?

To control any events, they need to be put into quests_reaction.c - which is in PotC\PROGRAM\QUESTS\

If you open that file up you will see how the commands work when interspersed with dialog.

Here is a helpful link for more info on commands:

<a href="http://robotsdontbleed.com/wacko/wakka.php?wakka=POTCwiki" target="_blank">PotC Modding Wiki</a>

I hope this helps! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
yes. you are corectly...
i put in my quest_reaction.c this:
LaunchEventsStory(characterFromID("Lineng"), TEXT[0]); //this is my screen
DoQuestReloadToLocation("AbordDeck", "rld", "loc1", "LinengWork_Abord1"); //reload to location

but it is not work... screen i flashing and not stoping!
 
<!--QuoteBegin-Capitan Blood+Jul 5 2005, 07:37 AM--><div class='quotetop'>QUOTE(Capitan Blood @ Jul 5 2005, 07:37 AM)</div><div class='quotemain'><!--QuoteEBegin-->i put in my quest_reaction.c this:
<div align="right">[snapback]121475[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /> Ah. Have you tried the PotC ModHelper? It is in the "TOOLS" folder in your PotC game directory. When you open it up, read the "Help" tab first. Then set the PotC directory so it knows where to find your game, and make sure that the box is checked for Debug Mode so it will generate error reports (also check localized if you need to). The error reports will give you a clue as to why you're having troubles (usually).

Hope that helps! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
Captain Blood:
You need to not call the reload command until after the interface exits.
Here's how I'd handle it.
Create a new quest case with the reload command.
Change your LaunchEventsStory() function so it takes a third argument, string qname, the quest case to execute on exit from the interface.

Then modify the doexit section so it says
// del event handlers code, etc
// endcancelinterface() or whatever
CompleteQuestName(qname);
}

Then the quest will not trigger until you close the interface.

Now, you could do it with LAi_QuestDelay(), which is probably better than a direct call, but will probably only work when in loc mode, and I assume you want the interface to work at sea/on wdmap too.

A general note: the way POTC works, any and all code that is directly called, will be executed directly, and only once that is done will any events execute. Your interface will show up, but then the code that executes that creates the interface comes to an end (after setting some event handlers); but the next step, executing the reload, is still called within the parent function, and thus executed before POTC gets around to checking for the player events.

(The create interface functions end simply with the creation of the interface, not with the exit of the interface as you might at first suspect).
 
Sorry, Capitan Blood, I assumed you were playing using the Build. You can get the Build mods <a href="http://www.piratesahoy.net/component/option,com_docman/task,doc_details/gid,24/Itemid,46/lang,/" target="_blank">here,</a> and they include the Mod Helper as part of the download.

Here's the info on what's in the Build:

<a href="http://www.musicats.com/B12Readme.htm" target="_blank">http://www.musicats.com/B12Readme.htm</a>

Now I thought there was a place to download Scheffnow's Mod Helper without the Build, however I don't find it. If you think you'd like to have it and NOT download the Build, I can put it up on a server for you. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
Hey, great! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
The Mod Helper probably won't be useful to you; the only thing that'd really apply is the frontend it has for error logging, but I actually find it kinda easier to read error.log than the parsed output...
(And besides, your code wasn't generating errors I'd think, it was just not working how you wanted it. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> )
 
Back
Top