- Joined
- Feb 20, 2007
- Messages
- 338
I have a simple true false statement:
Conditions:
First_person Equal to False
It is boolean
However I find that I want to have up to 6 if/then/else actions.
I believe I need to use an integer variable and an integer comparison - yes or no?
If so how do I go about setting it up to work.
I know that this should be one of the simplest things to do however when you consider the amount of stuff my triggers are dealing with (shown below) I think you can understand my confusion as to how to do this.
The set up trigger:
Then the execution:
I find that using the ship (which is rather large) and the helicopter/flying machine (which is smaller) with the same distance tends to have the camera too far from the flying machine.
I also want to set it up to where when other specific units are selected the camera either zooms out, has a steeper angle of attack or does nothing.
I might also use the variable tied into regions, I have some rather high hills which always leads to the camera going through the hill as the unit goes down the mountain. I tried resetting camera height but then the far z limitations end up mucking up the view or the unit falls too far below the camera view and lets face it my hills are rounded not squares so I do not get smooth transitions.
I am uncertain as to how to use integer comparisons to achieve my goals.
Conditions:
First_person Equal to False
It is boolean
However I find that I want to have up to 6 if/then/else actions.
I believe I need to use an integer variable and an integer comparison - yes or no?
If so how do I go about setting it up to work.
I know that this should be one of the simplest things to do however when you consider the amount of stuff my triggers are dealing with (shown below) I think you can understand my confusion as to how to do this.
The set up trigger:
-
First Person setup
-
Events
- Player - Player 9 (Gray) Selects a unit
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Ship
- (Unit-type of (Triggering unit)) Equal to Flying Machine
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Set First_person = True
-
Else - Actions
- Set First_person = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Then the execution:
-
Apply First Person
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- First_person Equal to False
-
Then - Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Angle of attack to Camera_AoA[(Integer A)] over 0.20 seconds
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Field of view to (Camera_FieldOfView[(Integer A)] + 15.00) over 0.01 seconds
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Roll to Camera_Roll[(Integer A)] over 0.01 seconds
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Height Offset to ((Current flying height of SelectedUnit[(Integer A)]) + Camera_Height[(Integer A)]) over 0.01 seconds
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Rotation to Camera_Rotation[(Integer A)] over 0.45 seconds
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Distance to target to 500.00 over 0.01 seconds
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Far Z to Camera_FarZ[(Integer A)] over 0.01 seconds
-
Loop - Actions
-
For each (Integer A) from 1 to 12, do (Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- First_person Equal to True
-
Then - Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Angle of attack to Camera_AoA_2[(Integer A)] over 0.20 seconds
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Field of view to (Camera_FieldOfView[(Integer A)] + 15.00) over 0.01 seconds
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Roll to Camera_Roll[(Integer A)] over 0.01 seconds
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Height Offset to ((Current flying height of SelectedUnit[(Integer A)]) + Camera_Height[(Integer A)]) over 0.01 seconds
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Rotation to Camera_Rotation[(Integer A)] over 0.20 seconds
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Distance to target to 1100.00 over 0.01 seconds
- Camera - Set (Owner of SelectedUnit[(Integer A)])'s camera Far Z to Camera_FarZ[(Integer A)] over 0.01 seconds
-
Loop - Actions
-
For each (Integer A) from 1 to 12, do (Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
I find that using the ship (which is rather large) and the helicopter/flying machine (which is smaller) with the same distance tends to have the camera too far from the flying machine.
I also want to set it up to where when other specific units are selected the camera either zooms out, has a steeper angle of attack or does nothing.
I might also use the variable tied into regions, I have some rather high hills which always leads to the camera going through the hill as the unit goes down the mountain. I tried resetting camera height but then the far z limitations end up mucking up the view or the unit falls too far below the camera view and lets face it my hills are rounded not squares so I do not get smooth transitions.
I am uncertain as to how to use integer comparisons to achieve my goals.