Page 1 of 1
Strings again
Posted: Sun Jul 10, 2011 9:33 am
by lancer
G'day Vic,
I've run into some obscure bugs/features.
Check: tempstring1 == tempstring2
Won't work. Apparently no way to compare one string to another. Could be a handy function for a future patch if easily doable.
Also...
ExecUnitPeopleModify
This Exec has four parameters. The fourth parameter is totally undocumented. Really would like to know what it is as I'm getting very erractic behaviour that experimenting hasn't managed to resolve.
Cheers,
Lancer
RE: Strings again
Posted: Sun Jul 10, 2011 9:38 am
by Vic
a) Yes the == is meant for numeric compare. there is no string compare at the moment. I'll add it to the list for v2.08
b) the 4th parameter is not used at all. it doesnt matter what you put in. Will remove it for v2.08.
thanks for the excellent feedback again!
best,
vic
RE: Strings again
Posted: Sun Jul 10, 2011 9:46 am
by lancer
G'day Vic,
Thanks for the info.
Re: my second problem. Appears to be the following...
ExecGiveReinforcement
I have a custom SFT that I have incorporated into a predefined unit. Nothing else, just one of the SFT (a Leader). When I use the above function I can happily move him around the map from one HQ to another.
However when I try and move him to a newly constituted HQ (one that I've built) he defaults back to the Capital for reasons unknown.
This occurs regardless of whether the new HQ has staff and subordinate units or not. Occassionally it will work, mostly not. I can't pin down why.
Any suggestions would be appreciated.
Cheers,
Lancer
RE: Strings again
Posted: Sun Jul 10, 2011 9:56 am
by Vic
Hi,
The reinforcements will go to the highest HQ from the lowest HQ thats still within supply AP range of the drop x,y.
You can either temporarily set the supply movement rulevar to a movementtype that has 9999 cost for everything (limiting the drop to the hex in question)
Or for more precision you can use ExecUnitGiveTroops. (it could be used in combination with a select unit popup through an action card for example)
Hope this helps.
Best regards,
Vic
RE: Strings again
Posted: Sun Jul 10, 2011 10:12 am
by lancer
G'day Vic,
Yep, that helps. Explains the erratic behaviour. Distance related.
I'll play around with your suggestions.
Thanks.
Cheers,
Lancer
RE: Strings again
Posted: Sun Jul 10, 2011 10:51 am
by Vic
Ohh... and you could also use a combi of these checks
CheckHexUnitCounter, CheckHexUnit and CheckIsUnitHQ
best,
Vic