It is currently Thu Mar 28, 2024 4:04 pm

RUNNING WITH RIFLES Multiplayer

test

Game servers 50 List provided by EpocDotFr | Players online 97


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Apr 17, 2017 4:07 pm 
Offline

Joined: Mon Apr 17, 2017 3:53 pm
Posts: 2
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?


Top
 Profile  
 
PostPosted: Thu Apr 20, 2017 6:18 am 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
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.


Top
 Profile  
 
PostPosted: Thu Apr 20, 2017 9:00 pm 
Offline

Joined: Mon Apr 17, 2017 3:53 pm
Posts: 2
Thanks pasik! notify_metagame does work as intended.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group