Hi
how can I change this to display what ever object the mouse clicks on within one function:
function object_click()
{
c009.Phylactere(String.Format("That %s does not seem to harbor anything about the plans by Skull.",object[19].Name)); // any object not just object 19?
}
I could do them individually and just change the object number but looking for a more simpler way ;)
cheers
You'll need something like:
function object_click()
{
Object* clickedObject = Object.GetAtScreenXY(mouse.x, mouse.y);
if(object != null)
c009.Phylactere(String.Format("That %s does not seem to harbor anything about the plans by Skull.",clickedObject.Name));
else // shouldn't happen!
{
// ...
}
}
Cheers Snarky,
i should have known had to reference object first :-[