Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LUA:
- local function EventHandler(obj,trg,ev,sub)
- if ev == 10 and sub == 30 then
- nwn.SetObject(trg);
- --"trans" should be the name of the below script
- nwn.ExecuteScript("trans",obj);
- end
- end
- nwn.SetEventHandler(EventHandler);
- NWSCRIPT:
- #include "nwnx_lua"
- void main()
- {
- object oTrans = OBJECT_SELF;
- object oTarget = GetTransitionTarget(oTrans);
- if(!GetIsObjectValid(oTarget))
- return;
- SendMessageToPC(GetFirstPC(),"Transition: "+GetName(oTrans)+" target: "+GetName(GetArea(oTarget))+" PC: "+GetName(LuaGetObject(3)));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement