Page 1 of 1
Help. Opening Script.
Posted: Thu Sep 20, 2012 3:18 am
by MM037
I hope I posted in the right place. I basically know nothing about scripting, but i decided to attempt an opening script similar to the "hello world" script in the 'how to" you posted only using a "hudPrint" instead and bound it to a hidden pressure plate under the starting location in my dungeon. It works fine in the dungeon editor, however, when exported and playing in a regular game, there is already an opening script that covers it up referencing "First time playing Grimrock...?" Any advice on how to either remove the default opening "hudPrint" or work around it?
Re: Help. Opening Script.
Posted: Thu Sep 20, 2012 4:01 am
by Neikun
hmm. Good question. That is likely happening in my game as well.
Re: Help. Opening Script.
Posted: Thu Sep 20, 2012 4:58 am
by Lmaoboat
I was asking the devs to add a function for clearing the hud text just recently, and someone suggested printing several blank lines first.
So something to the effect of:
Code: Select all
function text()
hudPrint(" ")
hudPrint(" ")
hudPrint(" ")
hudPrint(" ")
hudPrint(" Hello world")
end
Re: Help. Opening Script.
Posted: Thu Sep 20, 2012 5:10 am
by Komag
yes, you can spam the hud print with blank spaces then put your real message:
- create a timer, called "newgametimer", set to 8.5 or 9 seconds
- create a script, called "newgamescript" with code:
Code: Select all
hudPrint(" ")
hudPrint(" ")
hudPrint(" ")
hudPrint(" ")
newgametimer:activate()
function newgametext()
hudPrint("Welcome to the Dungeon of Luuuuvvvvv!!!!")
end
- connect the timer to the script (Action - newgametext)
- connect the timer to itself (Action - deactivate)
- all set!
It takes four blank hud prints to clear the default "played Grimrock before?" text, and the timer will give a chance for the initial "game saved" text to fade before showing your message. You don't need any hidden pressure plate or anything, the script will run on map start.
Re: Help. Opening Script.
Posted: Thu Sep 20, 2012 5:48 am
by MM037
Thanks. That seemed to work great. Didn't even have to set the timer to 9. Set it to 0 and made all the default text disappear. Even the game saved didn't show up.
Re: Help. Opening Script.
Posted: Thu Sep 20, 2012 11:59 am
by Komag
I tried various setups, tried many more blank hudprints, etc, and so long as I have the Autosave option on in my game settings, it always shows up no matter what I do, so perhaps you have turned Autosave off?
Re: Help. Opening Script.
Posted: Wed Oct 10, 2012 12:02 pm
by GoldCoast
Works perfect, thanks for this
.
Re: Help. Opening Script.
Posted: Wed Oct 10, 2012 4:34 pm
by Trollmann
MM037 wrote:Thanks. That seemed to work great. Didn't even have to set the timer to 9. Set it to 0 and made all the default text disappear. Even the game saved didn't show up.
If it works this way, I think it should work just fine without timer. Just make script entity and add:
hudPrint(" ")
hudPrint(" ")
hudPrint(" ")
hudPrint(" ")
hudPrint("Betcha this isn't your first time playing Legend of Grimrock!")
You don't even need to define a function for it, so you can leave the "openingtext()" whateveryoucallit, and "end" out.
Re: Help. Opening Script.
Posted: Wed Oct 10, 2012 5:06 pm
by Komag
but if the player has autosave on there is an autosave message that cannot be removed, so the purpose of the timer is to wait until after that autosave message is gone