so have this GFx Movie with some dynamic texts
Code:class GFxGladiatorInventory extends GFxMoviePlayer; var GFxObject Root; var GFxObject Text1; var GFxObject Text2; var string myString; var GladiatorPawn MyPawn; function bool start (optional bool StartPaused = false) { local PlayerController PC; local GladiatorPawn GP; local GladiatorPlayerController GPC; super.start(); Advance(0); tickHud(0.75); Root = GetVariableObject("_root"); myString = Root.GetString("MyString"); Text2= GetVariableObject("_root.textb"); Text1= GetVariableObject("_root.texta"); Text1.SetText("hello"); Text2.SetText(MyString); GetPC().WorldInfo.Game.Broadcast(GetPC(), "YourHudWorks"); PC=GetPC(); GP=GladiatorPawn(PC.pawn); GP.gladiustaken=true; GPC=GladiatorPlayerController(PC); GetPC().WorldInfo.Game.Broadcast(GetPC(), "YourHudWorks"); if (GPC.gladiustaken==TRUE) { text2.SetText("you've Taken A gladius");} return true; } function TickHud(Float DeltaTime) { local PlayerController PC; local GladiatorPawn GP; local GladiatorPlayerController GPC; GetPC().WorldInfo.Game.Broadcast(GetPC(), "YourHudIsBeingTicked"); PC=GetPC(); GPC=GladiatorPlayerController(PC); if (GPC.gladiustaken==false) { text2.SetText("you've Taken A gladius");} } Function CheckVariable() { local PlayerController PC; local GladiatorPlayerController GPC; PC=GetPC(); GPC=GladiatorPlayerController(PC); if(GPC.gladiustaken==true) { GetPC().WorldInfo.Game.Broadcast(GetPC(), "YourHudIsBeingTicked"); } } function CallMyActionScriptFunc() { ActionScriptVoid("_root.addnow"); } defaultproperties { }
There's a TickHud function wich just broadcasts amessage , but it just only broadcast it once , and i supose it should broadcast it like every 0.75 seconds , how to tick a HUD properly?
so if for example a variable of somewhere changes , something happends .
If i could set a timer this would be work done , but you can't with GFx movie.. any similar function so i can tick it¿
Nevermind Resolved. Just created my own HUD class and inserted there the tick hud function in it



Reply With Quote

Bookmarks