Hi, I mod a GS for city builder and running well, now I want to mod another AI script to make it build the city.
Problem is I don't know how to read the params storing inside the GS itself from the AI code or if it is possible ?
Exp : like I would like to read the saved town stocked cargo value storing in a (static global ? ) variable in side the main class of the GS itself. Should I import the GS as a library ?
Read GS global params from an AI script
Moderator: OpenTTD Developers
Re: Read GS global params from an AI script
What you need is Script Communication Protocol. It provides a way of communication between AIs and GS by using signs in top corner of the map. In that topic you will find a guide on how to set it up.
-
- Engineer
- Posts: 2
- Joined: 18 May 2021 09:35
Re: Read GS global params from an AI script
Thanks for the quick and correct answer !Firrel wrote: ↑18 May 2021 20:42 What you need is Script Communication Protocol. It provides a way of communication between AIs and GS by using signs in top corner of the map. In that topic you will find a guide on how to set it up.
Who is online
Users browsing this forum: No registered users and 3 guests