I have a mirror in my game, when the player examines it or 'look into' it, I want to call the examine self response. I thing I need to call objects script but I can't get the syntax right.
I am definitely no code guru and the syntax is likely wrong but could you try:
Do(player, “look at”)
In the script for looking into the mirror?
I’d try it but I’m not by my PC.
Someone help that awful code!! :)
Thanks Pixie but that returns error ‘object reference not set to an instance of an object’ when I examine the mirror
There's a recent post asking how to make a script that calls a verb/command on some object. Here's a link.
If the player's description is plain text, I think you would want:
msg (GetString (game.pov, "look"))
If it's a script, you'd want:
do (game.pov, "look")
If you're not sure which (because you have multiple possible player objects?); or if you want to include the game's checks for darkness (or whatever) first, you would use the "lookat" command:
params = NewDictionary() dictionary add (params, "object", game.pov) do (lookat, "script", params)
while already solved, just a reminder:
there's also the possibility of:
'look' (when NOT currently controlling the Player Object)
'pov_look' (when CURRENTLY CONTROLLING the Player Object)
so, make sure you're using the right ('look' vs 'pov_look') description Script/String