I need to somehow get an Agent referenced in my tracker to not get everyones Tracked Value and only for onr person but i dont know how to do it. I havent written anything related to the agent and there is propaply an easy way to get the agent there, would be realy happy over some healp here is the place were i have the probleme (the one is called TargetValueNew on purpose.
you can get all agents
Players:=GetPlayspace().GetPlayers()
for(i : int = 0..Players.Length):
if(Player : agent = Players[i]):
if(Agent : agent = agent[Player]):
This loop which doesn’t contain unnecessary steps might be easier to understand.
for. Player : (GetPlayspace().GetPlayers())
do:
if i now copy and past it in like this it still wont work do you know why? Thanks for the help allready
Replace (agent:agent) with (Player)
I dont know what i did wrong here but it is still marked red
You need to indent the block below the for loop so it’s inside the scope of the for loop.
Why do you have the loop:
up top? that’s going to give you an infinite loop… If you describe what it is you are trying to do I could try writing script example for you but I’m not totally clear on what you want.
ok 3rd time lucky
for. Player : (GetPlayspace().GetPlayers())
do:
if(Agent : agent = agent[Player]):
Targetvalue7 := Tracker8.GetValue(Agent)
etc..
etc...
sorry that i didnt answere yesterday but i want to make a ranked system were it checks the tracker every second to look what rank the player is and add a ui and it now gets the ui of the players but always changes betwen them so for one second ther is your score displayed and the next time it is your enemies i have send you a part of my code and the rest is built up like it.
OnBegin():void =
loop:
for. Player : (GetPlayspace().GetPlayers())
do:
TargetValue7 := Tracker8.GetValue(Player)
TargetValue6 := Tracker7.GetValue(Player)
TargetValue5 := Tracker6.GetValue(Player)
TargetValue4 := Tracker5.GetValue(Player)
TargetValue3 := Tracker4.GetValue(Player)
TargetValueNew := Tracker3.GetValue(Player)
TargetValue2 := Tracker2.GetValue(Player)
TargetValue := Tracker.GetValue(Player)
set Time = Time + 1
Sleep(1.0)
if (Time < 1200):
Print ("Its the {Time} second")
if (TargetValue >= 0):
if(TargetValue2 < 1):
ShowRanked := RankedUi.Show()
ShowRanked
Print("tracker is at {TargetValue}")
if(TargetValue =1):
ShowProgress5 := ProgressBar5.Show()
ShowProgress5
if(TargetValue =2):
ShowProgress10 := ProgressBar10.Show()
ShowProgress10
if(TargetValue =3):
ShowProgress15 := ProgressBar15.Show()
ShowProgress15
if(TargetValue =4):
ShowProgress20 := ProgressBar20.Show()
ShowProgress20
if(TargetValue =5):
ShowProgress25 := ProgressBar25.Show()
ShowProgress25
if(TargetValue =6):
ShowProgress30 := ProgressBar30.Show()
ShowProgress30
if(TargetValue =7):
ShowProgress35 := ProgressBar35.Show()
ShowProgress35
if(TargetValue =8):
ShowProgress40 := ProgressBar40.Show()
ShowProgress40
if(TargetValue =9):
ShowProgress45 := ProgressBar45.Show()
ShowProgress45
if(TargetValue =10):
ShowProgress50 := ProgressBar50.Show()
ShowProgress50
if(TargetValue =11):
ShowProgress55 := ProgressBar55.Show()
ShowProgress55
if(TargetValue =12):
ShowProgress60 := ProgressBar60.Show()
ShowProgress60
if(TargetValue =13):
ShowProgress65 := ProgressBar65.Show()
ShowProgress65
thanks for the help allready a lot helpers like you save my day
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.