![]() |
|
#1
|
|||
|
|||
![]()
With the new patch its possible to get the Mission time.
Code:
double t = GamePlay.gpTimeofDay(); Code:
static string CreateTimeString(double num) { double hours = Math.Floor(num); double minutes = (num - hours) * 60.0; double seconds = (minutes - Math.Floor(minutes)) * 60.0; int H = (int)Math.Floor(hours); int M = (int)Math.Floor(minutes); int S = (int)Math.Floor(seconds); return H.ToString() + ":" + M.ToString() + ":" + S.ToString(); } Also we get the possibility to set lables, but i had no luck to get it to work. So maybe others can give me a hint how to use it. ![]() |
#2
|
|||
|
|||
![]()
Regarding labels I've tried:
Code:
public override void OnUserCreateUserLabel(GPUserLabel ul) { //Player ulPlayer = ul.Player; GamePlay.gpLogServer(null, "Marker: {0}", new object[] { ul.Text }); GamePlay.gpDrawUserLabel(ul); } public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex) { base.OnPlaceEnter(player, actor, placeIndex); //Point2d startPoint2d = new Point2d(actor.Pos().x, actor.Pos().y); //GPUserLabel userLabel = GamePlay.gpMakeUserLabel(startPoint2d, player, player.Name(), GamePlay.gpTimeofDay(), 0); //GamePlay.gpDrawUserLabel(player.Army(), userLabel); //GamePlay.gpLogServer(new Player[] { player }, " Hello {0} in {1}!", new object[] { bobDesignation((actor as AiAircraft).InternalTypeName()), userLabel.Text }); //GamePlay.gpLogServer(null, " Hello {0} in {1}!", new object[] { bobDesignation((actor as AiAircraft).InternalTypeName()), userLabel.Text }); ... etc (Also, pressing enter creating a new label in map window fires my guns ![]() Hopefully someone nails the usage of the new label features.
__________________
![]() |
#3
|
|||
|
|||
![]()
Didn't have luck with user labels too
![]() |
#4
|
|||
|
|||
![]()
I tried scripting labels as well. No compiler errors, but no labels for ground object displayed in online mission. I wonder whether labels are only displayed with icons-on server settings?
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash. Get the latest COD Team Fusion patch info HERE |
#5
|
|||
|
|||
![]()
I did a test with all icon stuff enabled, no success.
|
#6
|
|||
|
|||
![]()
Me too,
i got the OnUserCreateUserLabel Event in single player but not in Multiplayer and Dedi. In all cases no Icon was shown. So it seems to be a Bug. ![]() |
![]() |
|
|