temnix Posted December 4, 2016 Share Posted December 4, 2016 I'm not having any luck with it. Does it work? Link to comment
temnix Posted December 4, 2016 Author Share Posted December 4, 2016 Thank you. All right then... how about some way to select a character? I have a mechanic that does something which would really work much better with a pause so the player can select the character it happened to, or if there is no pause, perhaps a character can be selected automatically? Link to comment
Roxanne Posted December 4, 2016 Share Posted December 4, 2016 PauseGame is done from the GUI level (Hit Spacebar or by selecting autopause on certain events, e.g. enemy detected, trap found). You do not interface to that level from the script level (anymore). Autoselect works - but only if defining the action for the selected character as well. The whatever-trigger does something to a cre then the cre is selected to do something in return - in order for it to work you would want to eliminate other cre's + scripts to intervene >>>> In my limited repertoire I call this a *cutscene*. And in a way that *pauses* the game to do any other thing at this time. Link to comment
temnix Posted December 4, 2016 Author Share Posted December 4, 2016 Is it completely impossible to pause the game from the scripts, or is it just not usually done? And as for auto-select - how to do that? I see no action for it on the list. Link to comment
argent77 Posted December 4, 2016 Share Posted December 4, 2016 PauseGame() works only from creature scripts or via ActionOverride(). The message displayed in the combat log is "Auto-Paused: Scripted". The script action ClickLButtonObject(O:Target*,I:ScrollSpeed*Scroll) can theoretically be used to simulate selecting a creature, but this action is very unreliable. Sometimes it works, sometimes it does something unexpected, most of the time it doesn't work at all. Link to comment
Roxanne Posted December 4, 2016 Share Posted December 4, 2016 Problem is not so much the pausing (or rather freezing) but the way for the player to know what is going on and what to do next (it is not intuitive - unless you break the wall and display a stringtext for the player). I experimented with A PauseGame() works only from creature scripts or via ActionOverride(). The message displayed in the combat log is "Auto-Paused: Scripted". Then I needed a second PauseGame() for the game to continue (just like you hit spacebar to pause and hit it again to unpause) But it allows not for Player actions to be performed during the pause. B I once did it with the light cutscene mode, selecting the respective NPC with CutSceneId(whatever), doing some actions and then freezing (pausing) the game - the way out would be any click, input etc by the player. Both options to me appeared like *too alien*, it never came across like something that was actually intended and I aticipated that most players would consider it a bug - my *personal* decision in the end was to go for true cutscenes that would script the initial part of a battle and then give the player hands on again to finish it from there. Link to comment
temnix Posted December 5, 2016 Author Share Posted December 5, 2016 I'm not making a cutscene, however. I'm looking for a mechanism that will freeze the action. There will be a little warning sound and the character to receive a bonus will flash, so that the player can click him. But, while I can imitate a general freeze effect with the Pause Creature opcode, that does not stop arrows on the way, fireballs, spell durations, poison and so on. I'm surprised that PauseGame() works only from a creature's script. At any rate, that's something to test. Does this application of PauseGame() unpause with the space bar? I even tried to hitch a ride on the auto-pause "Character injured" option - damaging a character then immediately healing him, in the other topic. That's something of a last resort, though. So far I have an Everyone-targeted Pause Creature lasting 1 second, perhaps I should make it 2 seconds. This gives the player a little time to react. But I would prefer a solid permanent pause so that the player does not need to rush and click before the bonus runs out but can conveniently select the character, assign the actions and unpause the game. Which is also important because the bonus only lasts a few seconds, so a real pause, unlike the opcode, would pause the bonus effect as well. P.S. Where is the "Auto-Paused: Scripted" message? In which 2DA file? Perhaps I could edit it to something comelier. Link to comment
temnix Posted December 6, 2016 Author Share Posted December 6, 2016 Okay, this is all done. Now I only need to try argent77's auto-select suggestion. It'll be a small mod, and I'll put you and Roxanne in the Thanks section. Link to comment
Roxanne Posted December 6, 2016 Share Posted December 6, 2016 Okay, this is all done. Now I only need to try argent77's auto-select suggestion. It'll be a small mod, and I'll put you and Roxanne in the Thanks section. The script action ClickLButtonObject(O:Target*,I:ScrollSpeed*Scroll) can theoretically be used to simulate selecting a creature, but this action is very unreliable. Sometimes it works, sometimes it does something unexpected, most of the time it doesn't work at all. It works most of the time (or starts to work) but often is interrupted for a lot of reasons, mostly by some player input/action that you cannot avoid. Link to comment
temnix Posted December 6, 2016 Author Share Posted December 6, 2016 But if it's launched from baldur.bcs? Well, I'll give it a try and see if I can break it. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.