[Simple] Real = to x then else Real = x then

R 3 T R O

New Member
Reaction score
12
Ok. Ive been trying to do it but i guess this is making my brain go into a never ending loop

Trigger:
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FZReal Equal to 5000.00
        • Then - Actions
          • Set FZReal = (FZReal - 5.00)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FZReal Equal to 3000.00
            • Then - Actions
              • Set FZReal = (FZReal + 5.00)
            • Else - Actions


I want it to do, When FZReal becomes 5000.00 then start lowering the FZReal until it becomes 3000.00. When it becomes 3000.00 then start raising the FZReal to 5000.00. Over n Over again, I know my trigger dont work, i keep confuzing myself lol help!:D
 

Admit

New Member
Reaction score
25
Make two triggers and turn them on/off when they get the same real that you want.
I could make it into one trigger too if you want.

Trigger:
  • Tim1
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FZReal Greater than 3000.00
        • Then - Actions
          • Set FZReal = (FZReal - 5.00)
        • Else - Actions
          • Trigger - Turn off (This trigger)
          • Trigger - Turn on Tim2 <gen>


Trigger:
  • Tim2
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FZReal Less than 5000.00
        • Then - Actions
          • Set FZReal = (FZReal + 5.00)
        • Else - Actions
          • Trigger - Turn off (This trigger)
          • Trigger - Turn on Tim1 <gen>


Edit*

Here is a simpler version of it: (Also make sure "Step1" is "True" as diffult)
Trigger:
  • Tim2
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FZReal Equal to 3000.00
        • Then - Actions
          • Set Stage1 = True
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FZReal Equal to 5000.00
            • Then - Actions
              • Set Stage1 = False
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Stage1 Equal to True
        • Then - Actions
          • Set FZReal = (FZReal + 5.00)
        • Else - Actions
          • Set FZReal = (FZReal - 5.00)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Use "Greater than or equal to" and "Less than or equal to" just to be sure it'll work for those reasons :D

And you don't have an event for it... :S
 

Admit

New Member
Reaction score
25
Use "Greater than or equal to" and "Less than or equal to" just to be sure it'll work for those reasons :D

And you don't have an event for it... :S

If he just changes "Equals to" too: "Greater than or equal to" and "Less than or equal to" It will always run step 1 in hes trigger (as 3000 is less than 5000). ;)

Also im pretty sure he has another trigger that runs this trigger.
 

R 3 T R O

New Member
Reaction score
12
So like this?

JASS:
if udg_FZReal == 3000.00 then
    set udg_FZStage = true
elseif udg_FZReal == 5000.00 then
    set udg_FZStage = false
endif
if udg_FZStage == true then
    set udg_FZReal = ( udg_FZReal + 5.00 )
else
    set udg_FZReal = ( udg_FZReal - 5.00 )
endif
 

Crazy_Dead

New Member
Reaction score
24
So like this?

JASS:
if udg_FZReal == 3000.00 then
    set udg_FZStage = true
elseif udg_FZReal == 5000.00 then
    set udg_FZStage = false
endif
if udg_FZStage == true then
    set udg_FZReal = ( udg_FZReal + 5.00 )
else
    set udg_FZReal = ( udg_FZReal - 5.00 )
endif

It would work. :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top