start a script using keyboard
start a script using keyboard
hi all,
I wonder if it is possible (in game) to start a function script by pressing a key on the keyboard...
For exemple, I would like to start the function "shout" by pressing R key... is it possible ?
I wonder if it is possible (in game) to start a function script by pressing a key on the keyboard...
For exemple, I would like to start the function "shout" by pressing R key... is it possible ?
Re: start a script using keyboard
Wooooow,(imagine a baby elephant staring at you saying wow) Woooooww, wooow.
That would blow my mind.
That would blow my mind.
I am the God of darkness and corruption.
viewtopic.php?f=14&t=4250
viewtopic.php?f=14&t=4250
Re: start a script using keyboard
Asteroth wrote:Wooooow,(imagine a baby elephant staring at you saying wow) Woooooww, wooow.
That would blow my mind.
sorry, I really don't understand your sentence..... is it something about the question ??
Re: start a script using keyboard
No, no. I'm quite insane.sorry, I really don't understand your sentence..... is it something about the question ??
Sorry doing that really would be impressive to me. All of the weirdness is because I'm weird. As for the question, some coders here might be able to handle that but I am sure it would be hard.
I am the God of darkness and corruption.
viewtopic.php?f=14&t=4250
viewtopic.php?f=14&t=4250
Re: start a script using keyboard
You seems to be a strange person...
My english is not perfect then sometimes I can't understand jokes, images things or things like that...
It makes me a little confused sometimes
About my question, it could be very interesting to do. I am thinking about a "shout" function to scare monsters (same as DM). It could be useful to make some "monsters pressure plates" puzzles.
My english is not perfect then sometimes I can't understand jokes, images things or things like that...
It makes me a little confused sometimes
About my question, it could be very interesting to do. I am thinking about a "shout" function to scare monsters (same as DM). It could be useful to make some "monsters pressure plates" puzzles.
Re: start a script using keyboard
I think komag is the most likely one to figure this out (though obviously there are many talented people here). Despite my lack of scripting knowledge I have taken a look since I did make myself involved here. So far nothing.
I am the God of darkness and corruption.
viewtopic.php?f=14&t=4250
viewtopic.php?f=14&t=4250
- montagneyaya
- Posts: 103
- Joined: Tue May 01, 2012 11:08 pm
Re: start a script using keyboard
With the onDrawGui create a "shout" button, and deal monster's scare with timer to move it away from the party
Door on floor placement: http://grimrock.nexusmods.com/mods/120
Re: start a script using keyboard
Aaagh! New systems for me to figure out! It burns!
I am the God of darkness and corruption.
viewtopic.php?f=14&t=4250
viewtopic.php?f=14&t=4250
- JohnWordsworth
- Posts: 1397
- Joined: Fri Sep 14, 2012 4:19 pm
- Location: Devon, United Kingdom
- Contact:
Re: start a script using keyboard
I don't think it would be wise to hook actions into a keyboard command specifically (some users might be playing with only the mouse - especially if LoG goes to iPad one day!). But using OnDrawGui from the 1.3.6 Beta version would be a pretty cool solution. You could easily add a button to the corner the screen say to shout.
Hacking up Petri's original DrawGui script while I'm at work makes me think something like the following would work.
Hacking up Petri's original DrawGui script while I'm at work makes me think something like the following would work.
Code: Select all
cloneObject{
name = "party",
baseObject = "party",
onDrawGui = function(g)
-- draw transparent background
g.color(30,30,30,150)
g.drawRect(30, 30, 120, 60)
-- draw button with text
g.color(128, 128, 128)
g.drawRect(40, 40, 100, 40)
g.color(255, 255, 255)
g.drawText("Shout!", 50, 30)
-- button logic
if g.button("button1", 40, 40, 100, 40) then
your_script:shout();
end
end,
}My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Re: start a script using keyboard
I can't get the 1.3.6 yet because I bought my game on GOG...
But your idea seems to be brillant
But your idea seems to be brillant