code a library to run during game?

So I want to run a library after the game has started is that possible to do in code, or can you only load it when the game loads?


Libraries can only load when the game is loaded. What is it you want to do? The code in a library can run at any time.

ETA: Templates can only be set when a game is loaded. If you are asking about templates in libraries (say for changing first to third person), then no. You would have to set the attributes, and where they are scripts, that could be complicated. It is doable however, and how much you need to do depends on your game.


Well I'm using your past tense third person library you provided, and modified it as you suggested and it works except when you start the game I want it to be in first person but when you switch to any other playable character to be third person, is that even possible or should I just scrap the idea and find a new one to replace it?


Changing from first to third person part way through a game will be possible, but would be a lot of work, and quite a bit of scripting. You would need to modify pretty much all of the built-in commands for a start.


I tried modifying all the template messages to use WriteVerb, so that it uses the pronoun/gender from the player object. I've not tested it with 2nd or 3rd person, but it seems to work fine when the player object's gender is "I".

The main thing is that every description that might be encountered by different characters needs to be changed. If a room's description is "It's dark, but you can hear someone moving around in the north corner.", you'd have to change that to "It's dark, but {=GetDisplayAlias(game.pov)} can hear someone moving around in the north corner."


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums