![]() |
Show userlabel after recon passthrough
I'm tying to show a custom label on the mini-map to blue players once a recon plane has gone through a pass-through trigger over the target. I'm having difficulty coming to grips with the various userlabel methods.The code below has errors. Baby steps please, explaining each method's use.
Code:
public override void OnTrigger(int missionNumber, string shortName, bool active) |
Your mistake:
Code:
GPUserLabel lbl = GamePlay.gpMakeUserLabel(p, BluePlayersArray, "RAF Dunkirk", t, GPUserIconType.Factory); to show the lable only to one side use you must use: Code:
GamePlay.gpDrawUserLabel(BluePlayersArray, lbl); |
Thankyou again Kodiak, I'm using this in the dedi server context but MakeUserLabel fails with invalid arguement(s) :confused: What's the purpose behind the method taking an arguement for the player who created the label? Surely there will be instances where the scripter wants to display a label at times when no actual player has 'created' the label?
Code:
double t = GamePlay.gpTimeofDay(); |
GPUserIconType is an enum type the argument type is int so you must cast (int)
Code:
GPUserLabel lbl = GamePlay.gpMakeUserLabel(p, GamePlay.gpPlayer(), "RAF Dunkirk", t, (int)GPUserIconType.Factory); |
That did it. Thankyou again for the assistance.
|
All times are GMT. The time now is 12:49 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.