Value selection - how to identify changes by user

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Nicoman35
Posts: 681
Joined: Thu, 17. Nov 05, 13:12
x3tc

Value selection - how to identify changes by user

Post by Nicoman35 » Tue, 28. Mar 23, 17:41

I am currently making a menu containing value selections.
The first selection has influence on the other selections. And vice versa.
The problem: Because they influence one another, a feedback effect occurs. Keeping the values switching back and forth without any interaction by the user. I would need a method to somehow identify, if a value selection was changed by the user or by something else. Is this possible?

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Re: Value selection - how to identify changes by user

Post by Cycrow » Tue, 28. Mar 23, 17:53

It can be done to an extent. But it's not really designed for it.

The menu is just a series of arrays containing the data to draw the menu. If you store this array you can manipulate it in a seperate script to make dynamic changes to the menu by modifying the array

This is much easier in FL which adds event driven menu controls

Nicoman35
Posts: 681
Joined: Thu, 17. Nov 05, 13:12
x3tc

Re: Value selection - how to identify changes by user

Post by Nicoman35 » Tue, 28. Mar 23, 19:54

Cycrow wrote:
Tue, 28. Mar 23, 17:53
This is much easier in FL which adds event driven menu controls
Cycrow. Bro. I bought AP / FL just yesterday. Calm :mrgreen:
For now, I will stick with TC until my mod works as desired. Then I will switch to AP/FL and see if and what I can do there.
Cycrow wrote:
Tue, 28. Mar 23, 17:53
The menu is just a series of arrays containing the data to draw the menu. If you store this array you can manipulate it in a seperate script to make dynamic changes to the menu by modifying the array
This is what I am doing. Problem is, the menu notices these changes made by the other script. It treats those changes just like I would change the selection. Guess I will do some design change to not have feedback effects.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Re: Value selection - how to identify changes by user

Post by Cycrow » Tue, 28. Mar 23, 22:17

yes any changes you make to the array will be updated to the menu as well. There isn't any other way to do it in TC/AP.

FL makes a lot of improvements for scripts and modding, including the new menu/input system

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”