Page 1 of 1
Trigger an event at a certain location
Posted: Sat Sep 22, 2012 7:38 pm
by Exophesis
Hi.
How can you make a script trigger an event if the player is located at a certain x and y position?
i.e: Display Hud Text when the player is standing at x=2 and y=8
Thanks

Re: Trigger an event at a certain location
Posted: Sat Sep 22, 2012 7:42 pm
by Neikun
This would be very easy. A matter of choosing your pressure plate (hidden, or tileset) and putting a connection to you lua script function.
Put the pressure plate at the desired x,y
When the party steps on it, the hudPrint will activate.
Helpful reading:
http://www.grimrock.net/modding/introdu ... scripting/
Code: Select all
function positionsay
hudPrint ("Stepping here has made these words appear!")
end
Re: Trigger an event at a certain location
Posted: Sat Sep 22, 2012 8:09 pm
by Exophesis
Neikun wrote:This would be very easy. A matter of choosing your pressure plate (hidden, or tileset) and putting a connection to you lua script function.
Put the pressure plate at the desired x,y
When the party steps on it, the hudPrint will activate.
Helpful reading:
http://www.grimrock.net/modding/introdu ... scripting/
Code: Select all
function positionsay
hudPrint ("Stepping here has made these words appear!")
end
Thanks so much. Never saw the Hidden Pressure Plate.