Camera Splt

Description: Have idea for a script, but you can't make it? Post it here!
Moderators: Yoshi021, Lx Xzit, 5438A38A, Semi-moderatos, Moderators

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 19
Reputation: 142
Posts: 679
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #1by Yoshi021 » 29 Jan 2017, 5:08

I already suggested a new sysval for the camera, but meanwhile it gets added, this code should work. Basically, depending on how the camera is split, it returns different values

Code: Select all

  0: The screen is not split
  1: P1 is on the left, and P2 is on the right
  2: P2 is on the left, and P1 is on the right
  3: P1 is on the top, and P2 is on the bottom
  4: P2 is on the top, and P1 is on the bottom


I was able to make a small code that does what I described above.

Code: Select all

do

  if sysval(Player1scrX) - sysval(Player2scrX) <= -400 then
    v(camera) = 1
  elseif sysval(Player1scrX) - sysval(Player2scrX) >= 400 then
    v(camera) = 2
  elseif sysval(Player1scrY) - sysval(Player2scrY) <= -300 then
    v(camera) = 3
  elseif sysval(Player1scrY) - sysval(Player2scrY) >= 300 then
    v(camera) = 4
  else
    v(camera) = 0
  end if

  call sleep(1)
loop
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

Return to “Script requests”

Who is online (over the past 5 minutes)

Users browsing this forum: 2 guests