Player choose camera distance

eatbeaver

New Member
Hi, i want to make a camera system like in Ryoko td or Warlock were players just type in -camera X and then the camera zooms out to that range. Also i want the camera to reset itself to that postion until the player choose to change distance.
 

Danis[h]

New Member
Hi, i want to make a camera system like in Ryoko td or Warlock were players just type in -camera X and then the camera zooms out to that range. Also i want the camera to reset itself to that postion until the player choose to change distance.
This is what I use in my TD.. It doesnt reset automatically, but the camera zooms out to the entered value.

Trigger:
  • Camera
    • Events
      • Player - Player 1 (Red) types a chat message containing -zoom as A substring
      • Player - Player 2 (Blue) types a chat message containing -zoom as A substring
      • Player - Player 3 (Teal) types a chat message containing -zoom as A substring
      • Player - Player 4 (Purple) types a chat message containing -zoom as A substring
      • Player - Player 5 (Yellow) types a chat message containing -zoom as A substring
      • Player - Player 6 (Orange) types a chat message containing -zoom as A substring
      • Player - Player 7 (Green) types a chat message containing -zoom as A substring
      • Player - Player 8 (Pink) types a chat message containing -zoom as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 6)) Equal to -zoom
    • Actions
      • Camera - Set (Triggering player)'s camera Distance to target to (Real((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) over 2.00 seconds
      • Game - Display to (Player group((Triggering player))) the text: (Camera Distance Set To: + (Substring((Entered chat string), 7, (Length of (Entered chat string)))))


note there is a white space after -zoom, like this " " <-- inbetween the "" marks.
 

Galdiuz

Creator of Photon Command
Code:
Untitled Trigger 001
    Events
        Player - Player 1 (Red) types a chat message containing -camera  as A substring
        Player - Player 2 (Blue) types a chat message containing -camera  as A substring
        Player - Player 3 (Teal) types a chat message containing -camera  as A substring
        Player - Player 4 (Purple) types a chat message containing -camera  as A substring
    Conditions
    Actions
        Set Camera_Real[(Player number of (Triggering player))] = (Real((Substring((Entered chat string), 9, (Length of (Entered chat string))))))
        Camera - Set (Triggering player)'s camera Distance to target to Camera_Real[(Player number of (Triggering player))] over 1.00 seconds
Code:
Untitled Trigger 002
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Camera - Set (Picked player)'s camera Distance to target to Camera_Real[(Player number of (Picked player))] over 1.00 seconds
Note that the real variable has a defalut value of 2500

EDIT: Oh, it seems that i was too late.
 

eatbeaver

New Member
Code:
Camera zoom
    Events
        Player - Player 1 (Red) types a chat message containing -cam  as A substring
        Player - Player 2 (Blue) types a chat message containing -cam as A substring
        Player - Player 3 (Teal) types a chat message containing -cam as A substring
        Player - Player 4 (Purple) types a chat message containing -cam as A substring
        Player - Player 5 (Yellow) types a chat message containing -cam as A substring
        Player - Player 6 (Orange) types a chat message containing -cam  as A substring
    Conditions
        (Substring((Entered chat string), 1, 6)) Equal to -cam 
    Actions
        Camera - Set (Triggering player)'s camera Distance to target to (Real((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) over 0.00 seconds
        Game - Display to (Player group((Triggering player))) the text: (Camera distance set to:  + (Substring((Entered chat string), 7, (Length of (Entered chat string)))))
Why isn't this trigger working?
 

Chocobo

White-Flower
Code:
Camera zoom
    Events
        Player - Player 1 (Red) types a chat message containing -cam  as A substring
        Player - Player 2 (Blue) types a chat message containing -cam  as A substring
        Player - Player 3 (Teal) types a chat message containing -cam  as A substring
        Player - Player 4 (Purple) types a chat message containing -cam  as A substring
        Player - Player 5 (Yellow) types a chat message containing -cam  as A substring
        Player - Player 6 (Orange) types a chat message containing -cam  as A substring
    Conditions
        (Substring((Entered chat string), 1, [B]5[/B])) Equal to -cam 
    Actions
        Camera - Set (Triggering player)'s camera Distance to target to (Real((Substring((Entered chat string), [B]6[/B], (Length of (Entered chat string)))))) over 0.00 seconds
        Game - Display to (Player group((Triggering player))) the text: (Camera distance set to:  + (Substring((Entered chat string), [B]6[/B], (Length of (Entered chat string)))))
"-" = 1
"c" = 2
"a" = 3
"m" = 4
" " = 5
 

SwedishChef

New Member
i have a question if it is alright. Is there any way i can detect if the other substring is between 750 and 2500. So if i write under 750 f.ex. -zoom 500 it will turn to 750 and if you type over it will turn to 2500.

E: if you want you can do it in jass. (im learning it now =))
 

Chocobo

White-Flower
.

Code:
Camera zoom
    Events
        Player - Player 1 (Red) types a chat message containing -cam  as A substring
        Player - Player 2 (Blue) types a chat message containing -cam  as A substring
        Player - Player 3 (Teal) types a chat message containing -cam  as A substring
        Player - Player 4 (Purple) types a chat message containing -cam  as A substring
        Player - Player 5 (Yellow) types a chat message containing -cam  as A substring
        Player - Player 6 (Orange) types a chat message containing -cam  as A substring
    Conditions
        (Substring((Entered chat string), 1, 5)) Equal to -cam 
    Actions

        -- if (Substring((Entered chat string), 6, (Length of (Entered chat string)))) lesser than 750.00 --
              -- then Game - Display to (Player group((Triggering player))) the text: (Camera distance set to: 750.00) --
              -- Camera - Set (Triggering player)'s camera Distance to target to 750.00) over 0.00 seconds --
        -- else --
        -- if (Substring((Entered chat string), 6, (Length of (Entered chat string)))) greater than 2500.00 --
              -- then Game - Display to (Player group((Triggering player))) the text: (Camera distance set to: 2500.00) --
              -- Camera - Set (Triggering player)'s camera Distance to target to 2500.00) over 0.00 seconds --
        -- else  Game - Display to (Player group((Triggering player))) the text: (Camera distance set to:  + (Substring((Entered chat string), 6, (Length of (Entered chat string))))) --
             --  Camera - Set (Triggering player)'s camera Distance to target to (Real((Substring((Entered chat string), 6, (Length of (Entered chat string)))))) over 0.00 seconds
 

SwedishChef

New Member
Why aint this working??

Trigger:
  • Zoom
    • Events
      • Player - Any player types a chat message containing -zoom as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 6)) Equal to -zoom
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Length of (Substring((Entered chat string), 7, (Length of (Entered chat string))))) Less than 750
        • Then - Actions
          • Game - Display to (Player group((Triggering player))) the text: (Camer set to: + 750)
          • Camera - Set (Triggering player)'s camera Distance to target to 750.00 over 1.00 seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Length of (Substring((Entered chat string), 7, (Length of (Entered chat string))))) Greater than 2500
            • Then - Actions
              • Game - Display to (Player group((Triggering player))) the text: (Camer set to: + 2500)
              • Camera - Set (Triggering player)'s camera Distance to target to 2500.00 over 0.00 seconds
            • Else - Actions
              • Game - Display to (Player group((Triggering player))) the text: (Camer set to: + (Substring((Entered chat string), 7, (Length of (Entered chat string)))))
              • Camera - Set (Triggering player)'s camera Distance to target to (Real((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) over 0.00 seconds
 

Chocobo

White-Flower
convert string to real (copied the wrong text in the old post).

Trigger:
  • Zoom
    • Events
      • Player - Any player types a chat message containing -zoom as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 6)) Equal to -zoom
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Real((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) Less than 750.00
        • Then - Actions
          • Game - Display to (Player group((Triggering player))) the text: (Camer set to: + 750)
          • Camera - Set (Triggering player)'s camera Distance to target to 750.00 over 1.00 seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Real((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) Greater than 2500.00
            • Then - Actions
              • Game - Display to (Player group((Triggering player))) the text: (Camer set to: + 2500)
              • Camera - Set (Triggering player)'s camera Distance to target to 2500.00 over 0.00 seconds
            • Else - Actions
              • Game - Display to (Player group((Triggering player))) the text: (Camer set to: + (Substring((Entered chat string), 7, (Length of (Entered chat string)))))
              • Camera - Set (Triggering player)'s camera Distance to target to (Real((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) over 0.00 seconds
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • tom_mai78101 tom_mai78101:
    I have a GIF though
  • tom_mai78101 tom_mai78101:
    In the GIF, I've configured it so the lower the "Main Value" is, the better. I had to compress it pretty far down though.
  • tom_mai78101 tom_mai78101:
    And this is the thread with the video that shows the wall clip. https://tasvideos.org/Forum/Topics/23453
    +2
  • tom_mai78101 tom_mai78101:
    Hmm, about the Headline News, I noticed threads are being moved into the subforum (Health News, Environmental News, etc.). When that happens, the TH Forum Home page loses the articles, and instead would show old articles posted 1 or 2 weeks ago.
  • tom_mai78101 tom_mai78101:
    What do we do with the Home page?
  • Ghan Ghan:
    I added those forums to the filter for that widget.
    +1
  • tom_mai78101 tom_mai78101:
    Oh nice. They're back. Thanks.
  • tom_mai78101 tom_mai78101:
    Now I think it makes more sense for me to put news in their own subforums, without worry.
  • The Helper The Helper:
    Awesome Ghan thanks! I was purposely not moving the first 15 news articles in Headline news to the different subforums but I guess I don't have to do that now?
  • tom_mai78101 tom_mai78101:
    Question: Is there a way to remove thread redirects? It creates a copy of the moved thread and takes up space, and I am leaning towards wanting to remove them in the Headline News. But if they have an expiration date, I guess I'm fine with it.
  • The Helper The Helper:
    If you move a thread please leave a permanent redirect. You can delete any redirects after 6 months. The redirects are left to help Search Engines find the moved content.
  • tom_mai78101 tom_mai78101:
    What if you move the permanent redirect, not the thread?
  • The Helper The Helper:
    I think that works but I have not messed with it. You can delete redirects though if you have to that will not delete the original thread
  • The Helper The Helper:
    if a redirect ends up in the same forum as the post it goes to though I think the redirect drops or fails or something but they are not bugged out and when you are working on an indirect the original post is safe.
  • The Helper The Helper:
    Happy Early Friday :)
    +1
  • V-SNES V-SNES:
    Happy Friday :)
  • tom_mai78101 tom_mai78101:
    Fun Friday for me
  • tom_mai78101 tom_mai78101:
    Happy Fun Friday to all.
    +2
  • The Helper The Helper:
    Happy Sunday everyone!!!
  • V-SNES V-SNES:
    Happy Sunday!!!
    +1
  • jonas jonas:
    Happy monday :p
  • jonas jonas:
    Everyone hates mondays?
    +1
  • The Helper The Helper:
    Happy Tuesday!
  • jonas jonas:
    Happy belated tuesday

    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