Right, I'm having a little trouble with triggeractions in Gscript2, mainly because I can't work out how to receive the action.
I thought it might be one of the following:
NPC Code:
function onActionname() {
NPC Code:
function onname() {
Neither of these appear to work, and it does not appear to be documented. Does anyone know how the action is received?
Edit It appears that with weapons, it is received using onActionserverside() if I use serverside as the actionname, but with a database NPC, it fails. I have set the shape with:
NPC Code:
function onCreated() setshape(1,32,32);
And triggeraction'd with:
NPC Code:
triggeraction(x+0.5,y+0.5,"lol","magic","please");
However, receiving using this method does not work:
NPC Code:
function onActionlol()