RUNNING WITH RIFLES
http://www.runningwithrifles.com/phpBB3/

How to trigger call_request_event?
http://www.runningwithrifles.com/phpBB3/viewtopic.php?f=7&t=3295
Page 1 of 1

Author:  openhair [ Mon Apr 17, 2017 4:07 pm ]
Post subject:  How to trigger call_request_event?

Hey fellow modders.

I had some fun modding recently and came to the point where I wanted to react on calls with a custom script. What I basically want to do is some support call like "Where is the McGuffin? (100RP)" - "The McGuffin is at [location]".

This seems to be possible with an event handler, but a comment somehow mysteriously states that it does not work with all calls, but only those that are marked somehow (naive testing supports that hypothesis :D )

Code:
// call events, happens for calls that have marked themselves for notification
protected void handleCallRequestEvent(const XmlElement@ event) {}


But I did not find how to mark the call. I suppose there is some XML-Attribute or -Tag, but I could not find its name. Can anybody help?

Author:  pasik [ Thu Apr 20, 2017 6:18 am ]
Post subject:  Re: How to trigger call_request_event?

The call specification file can handle notify_metagame keyword in the call tag, give it a value of "1" and it should make the script side event to happen. I think we never ended up using it in vanilla but looking at the code I'd expect it to work.

Author:  openhair [ Thu Apr 20, 2017 9:00 pm ]
Post subject:  Re: How to trigger call_request_event?

Thanks pasik! notify_metagame does work as intended.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/