Jump to content
Buddski

How to force messages to logs?

Recommended Posts

I am struggling to push messages from scripts into the logs as a part of troubleshooting. Specifically I want to trigger a log entry when a trigger is tripped. For one of my triggers I can see the impact of trigger, ie a team is spawned so i know the trigger is working correctly for that one. But I have another trigger that is not doing anything yet.

 

I want to send an entry to the log when the trigger is activated. I have tried by adding a script directly to the trigger prefab. I have tried OnActivate, OnInit and EOnTouch with the resulting format as follows:

class StPhilTrigger_Class: NO_SCR_SpawnTrigger

{

     override void EOnTouch(IEntity owner, IEntity other, int touchTypesMask)

     {

          Print("StPhillipe Reinforcements trigger has been touched");

     }

 

     override void OnActivate(IEntity ent)

     {

          Print("StPhillipe Reinforcements trigger has been activated");

     }

 

     override void OnInit(IEntity owner)

     {

          Print("StPhillipe Reinforcements trigger has been initialised");

     }

};

 

None of these lines result in anything pushing into the logs...at initiation, on entry to the trigger area etc.

 

I have other triggers that are not working so i want to be able to force the messages to log to "trap" the events. This was straight forward for Arma3 but cant crack it for Reforger. Any hints on where I am going wrong please?

Share this post


Link to post
Share on other sites

In a script that I found on the internet it shows this code:

Print("Faction Manager not found!!", LogLevel.ERROR);

I guess you would have to change the log level to the one you want. The log is 

LogLevel.NORMAL

 

I hope it works for you

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×