How to get an integer = elapsed game time ?

Yamuraiha

Member
Reaction score
1
I have a trigger like this
Trigger:
  • Time 720
    • Events
    • Time - Elapsed game time is 720.00 seconds
    • Conditions
    • Actions
    • Player Group - Pick every player in (All players matching (((Matching player) controller) Equal to Computer)) and do (Actions)
    • Loop - Actions
    • Player - Set the current research level of Computer's Unit to 1 for (Picked player)

I want to get an integer = elapsed game time, so that I could use Periodic event & arithmetic action to Set level of "Computer's Unit" to elapsed game time/720 for (Picked player). Tks 4 read.
 

rogers

You can change this now in User CP.
Reaction score
1
Create a trigger that runs every 1 second and count with int + (int + 1), then use an if statement to check when the int = 720 and run your Set level.
 

Yamuraiha

Member
Reaction score
1
Create a trigger that runs every 1 second and count with int + (int + 1), then use an if statement to check when the int = 720 and run your Set level.
If that so I could use the Elapsed time event anyway ~~, but the problem is the upgrade has 64 level, If I do that I would get mad.
 

afisakov

You can change this now in User CP.
Reaction score
37
Trigger:
  • init
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Set s720 = 0
      • Trigger - Turn on time 720 <gen>

Trigger:
  • time 720
    • Events
      • Time - Every 720.00 seconds of game time
    • Conditions
    • Actions
      • Set s720 = (s720 + 1)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Equal to Computer
            • Then - Actions
              • Player - Set the current research level of Iron Forged Swords to s720 for (Picked player)
            • Else - Actions


and you just make the first level of the ability do nothing, aka 0 bonus, if you don't want it to start until 720 seconds in.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top