AddCustomOrder questions

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
rf900
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 339
Joined: Fri May 04, 2012 6:59 am

AddCustomOrder questions

Post by rf900 »

I have read the info on the wiki, http://www.slitherinebravo.net/GameWiki ... ing_ui_hot.

Was wondering, if I return a value in the inner function will I be able to view it in the AddCustomOrder call.

Something like:

id = AddCustomOrder("Functionthatreturns something");

Also if using a UI panel one player is changing a Universal variable would that work or do I need to use the AddCustomOrder to call a function that will change the universal variable.
pipfromslitherine
Site Admin
Site Admin
Posts: 9898
Joined: Wed Mar 23, 2005 10:35 pm

Re: AddCustomOrder questions

Post by pipfromslitherine »

You should do everything that needs "doing" inside the function called by AddCustomOrder. That is the safest way to do it (it prevents, for example, things happening with different timings or in different orders).

You cannot get back any meaningful result, because the AddCustomOrder call doesn't actually call the function at that point, it adds it to the order queue for execution at some (consistent) later point.

Cheers

Pip
follow me on Twitter here
Post Reply

Return to “Battle Academy : Modders Corner ”