Tutorial: Event Code

Discuss and post your mods and scenarios here for others to download.

Moderator: Vic

Goodmongo
Posts: 346
Joined: Thu Sep 22, 2011 3:56 pm

RE: Event Code

Post by Goodmongo »

I am planning to try and get deeply involved in some mods.  Is there a list of the entire API anywhere?  I'm especially interested in all the function calls with a description of the parameters required for each one.
 
For example the basic ExecMessage(0, -1, -1,-1) has four parameters.  Is there documentation where each parameter is explained?
 
I did a search of the ATG Wiki site but did not see a link to all the various functions.  I am reading through all the FAQ's and tutorials but so far have not found it.  Thanks in advance.
lancer
Posts: 2963
Joined: Tue Oct 18, 2005 8:56 am

RE: Event Code

Post by lancer »

G'day,

Documentation is scratchy.

You can try the orginal AT manual (comes with ATG) for descriptions of the original set of functions.

All the new ones added into ATG and patched thereafter are best figured out by going into the editor and looking at the explanations and tool tips that arise when you go to use them.

Most of them are straightforward. A few aren't but they are ones that are rarely used.

Cheers,
Lancer
Goodmongo
Posts: 346
Joined: Thu Sep 22, 2011 3:56 pm

RE: Event Code

Post by Goodmongo »

Thanks Lancer. I did find the original manual but it sure would have been easier and nicer to see the functions and rule variable also in one nice manual.

Off the top of your head do you know if I can change the AP's of a specific unit or change their entrenchment value? Also, can ZOC's be changed at all?
User avatar
lion_of_judah
Posts: 2305
Joined: Mon Jan 08, 2007 6:36 pm
Location: somewhere over the rainbow

RE: Event Code

Post by lion_of_judah »

I need some help please for my Ivorian civil war scnenario. I would like to program an event that will be used one time only for the Government " Cote D'Ivorie" and the rebels " North Cote D'Ivorie. Say on April 3rd 2003 either side askes for a cease-fire, the government plays their card, and the rebels accept or even better it is forced upon both sides via the UN. thus giving both sides time to re-equip and arm their forces then when the time is ready either side just declares war again. Now since I suck at programming, I will need some help, so any help what soever will so be appreciated.
User avatar
Strategiusz
Posts: 247
Joined: Sat Sep 13, 2008 10:46 am
Location: Upper Silesia, Poland
Contact:

RE: Event Code

Post by Strategiusz »

How to set names for those options and make them reacting on clicking? I have managed with making simple events.

Image

EDIT

OK, I found the names. They are in Settings -> GameSlots.

EDIT 2

OK, I can run those events after checking GameVar > 0.

But there is some strange "+" button named "click to change the event coupled to this variant". It looks like it doesn't work. But it looks like it is not necessary to work.
Attachments
scenariovariants.jpg
scenariovariants.jpg (73.88 KiB) Viewed 783 times
User avatar
ernieschwitz
Posts: 4533
Joined: Tue Sep 15, 2009 3:46 pm
Location: Denmark

RE: Event Code

Post by ernieschwitz »

EDIT 2

OK, I can run those events after checking GameVar > 0.

But there is some strange "+" button named "click to change the event coupled to this variant". It looks like it doesn't work. But it looks like it is not necessary to work.

It does work, i used it by mistake once. You can program the game to execute an event when the option is chosen. Not sure why one would do that, since it when deselected is not un-executed. But I guess you could use it to incrementally increase a value.

The ordinary way you want these select boxes to work, is that they change a value when selected, say from 0 to 1, and then you make an event at startup (or later) and check the value, and then do whatever you chose.
Creator of High Quality Scenarios for:
  • Advanced Tactics Gold
    DC: Warsaw to Paris
    DC: Community Project.
Try this Global WW2 Scenario: https://www.vrdesigns.net/scenario.php?nr=280
Post Reply

Return to “Mods and Scenarios”