Jump to content
Luft08

Tracing mission execution

Recommended Posts

I'm trying to learn how to create a coop mission.  Currently my efforts result in missions that have anomalous behavior.  I believe this is due to the fact that I am not initializing the server completely before the clients get initialized.  I'm studying the code from people who really know how to do things right but because of the nature of Arma  it is difficult figuring out what is happening and in what order even with the help of the initialization order web page.

 

I was wondering if there is an easy way to trace the flow of a mission and log it to a file without inserting statements into every function and method?

 

Thanks.

Share this post


Link to post
Share on other sites

There is no easy way to do this. But there is a debugging tutorial which may enlight some things if you don't know already:

 

 

my favorite phrase there:

 

On 4/12/2014 at 9:07 PM, terox said:

LOCALITY ERROR
This is where you need knowledge on the engine's idiosyncrasies. Only experience will get you there

 

  • Like 2

Share this post


Link to post
Share on other sites
On 8/1/2021 at 8:07 PM, Luft08 said:

I was wondering if there is an easy way to trace the flow of a mission and log it to a file without inserting statements into every function and method?

The simple answer is no.

ARMA in general is an event driven system so bits of code run when an event is triggered.

This gets more complicated when you are running in multi-player mode as now you can add where is the code running.

I don't think a trace of the function calls will help because it will be so large.  When I look at how missions are written I usually start in the init.sqf but I guess you also need to look in the other event scripts as well.

As a general rule I try to focus on parts of a mission/script and use diag_log calls to write information to the report file to help you understand what is happening.

I'd happily talk you through what I do with my missions.

This is a mission I published (Eden editor files): https://steamcommunity.com/linkfilter/?url=https://1drv.ms/u/s!AnX2_vGoXf5F9iA_hQh4VuoDvmFP?e=Kkohpp

Good luck  S

  • Thanks 1

Share this post


Link to post
Share on other sites

I get the feeling the original poster has played a big, multiplayer mission with lots of scripted features and thought 'I can do something similar to this! How hard can it be?' Only to discover the answer is very.

Share this post


Link to post
Share on other sites
9 hours ago, strider42 said:

The simple answer is no.

ARMA in general is an event driven system so bits of code run when an event is triggered.

This gets more complicated when you are running in multi-player mode as now you can add where is the code running.

I don't think a trace of the function calls will help because it will be so large.  When I look at how missions are written I usually start in the init.sqf but I guess you also need to look in the other event scripts as well.

As a general rule I try to focus on parts of a mission/script and use diag_log calls to write information to the report file to help you understand what is happening.

I'd happily talk you through what I do with my missions.

This is a mission I published (Eden editor files): https://steamcommunity.com/linkfilter/?url=https://1drv.ms/u/s!AnX2_vGoXf5F9iA_hQh4VuoDvmFP?e=Kkohpp

Good luck  S

Thanks strider42. I have downloaded your mission and will study it. When I have a feel for what you did I may take you up on your offer for a walk through.  I appreciate any help I can get.

Share this post


Link to post
Share on other sites
9 hours ago, Tankbuster said:

I get the feeling the original poster has played a big, multiplayer mission with lots of scripted features and thought 'I can do something similar to this! How hard can it be?' Only to discover the answer is very.

Nope. Actually I am a retired computer programmer with lots of time on his hands. I understand how difficult coding can be on various platforms. They all have their idiosyncrasies and SQF is no exception.

 

It will just take time and a lot of work to come up to speed. I've been dinking around with Arma and SQF for a while but only now getting serious about making quality missions. If I stick with it maybe I can produce something worth playing in about a year.

 

 

  • Like 1

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

×