Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, VoroneTZ), 1,507 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Split screen? [Re: LemmyTheSlayer] #436721
01/31/14 19:29
01/31/14 19:29
Joined: Jan 2012
Posts: 36
T
themuzikman Offline OP
Newbie
themuzikman  Offline OP
Newbie
T

Joined: Jan 2012
Posts: 36
This is what I have in my main script:

Code:
VIEW* camera2 = {
   flags = SHOW;
}

   VECTOR* offset1 = {0,-distance,0};
   VECTOR* offset2 = {0, distance,0};

   
function main() {
	video_screen = 2;
	video_mode = 9;
   level_load("newtest.wmb");
      
   camera.size_x = screen_size.x/2 - 2;
   camera2.size_x = screen_size.x/2 - 2;
   camera2.pos_x = screen_size.x/2 + 2;
   

   camera.x = -75;
   camera.y = 42;
   camera.pan = 0;
   
   camera2.x = -75;
   camera2.y = -42;
  //camera2.z = 50;
   camera2.pan = 0;
   //camera2.tilt = -29;
   

vec_set(camera.x,player.x);
vec_add(camera.x,offset1);
vec_set(camera2.x,player.x);
vec_add(camera2.x,offset2);
   

}



I'm getting a syntax error at VECTOR* offset1 = {0,-distance,0};, so I assume I just don't have something in the right order.

Re: Split screen? [Re: themuzikman] #436722
01/31/14 19:44
01/31/14 19:44
Joined: Mar 2010
Posts: 57
Germany, Niedersachsen
LemmyTheSlayer Offline
Junior Member
LemmyTheSlayer  Offline
Junior Member

Joined: Mar 2010
Posts: 57
Germany, Niedersachsen
distance is not defined. replace it with some value.
Code:
VECTOR* offset1 = {0,-10,0};
VECTOR* offset2 = {0, 10,0};


maybe you should also have a look here


SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE
Re: Split screen? [Re: LemmyTheSlayer] #436723
01/31/14 19:51
01/31/14 19:51
Joined: Jan 2012
Posts: 36
T
themuzikman Offline OP
Newbie
themuzikman  Offline OP
Newbie
T

Joined: Jan 2012
Posts: 36
Thanks, I looked in the tutorial but I didn't see anything for this vector thing. Or for cameras. And I didn't see anything specifically like this in the manual...

I'm still getting the same syntax error, though. Other than that, I've gotten it looking good now. Thank you.

Re: Split screen? [Re: themuzikman] #436725
01/31/14 21:19
01/31/14 21:19
Joined: Mar 2010
Posts: 57
Germany, Niedersachsen
LemmyTheSlayer Offline
Junior Member
LemmyTheSlayer  Offline
Junior Member

Joined: Mar 2010
Posts: 57
Germany, Niedersachsen
sorry, my mistake. this is how it is supposed to look like:
Code:
VECTOR* offset1 = {
    x = 0;
    y = -10;
    z = 0
};

VECTOR* offset2 = {
    x = 0;
    y = 10;
    z = 0
};



SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE
Re: Split screen? [Re: LemmyTheSlayer] #436731
01/31/14 22:11
01/31/14 22:11
Joined: Jan 2012
Posts: 36
T
themuzikman Offline OP
Newbie
themuzikman  Offline OP
Newbie
T

Joined: Jan 2012
Posts: 36
Should be:
Code:
VECTOR* offset1 = {
    x = 0;
    y = -10;
    z = 0;
}

VECTOR* offset2 = {
    x = 0;
    y = 10;
    z = 0;
}



wink

So now that fixes my startup error, but my right camera is still in a fixed position.

Re: Split screen? [Re: themuzikman] #436735
01/31/14 22:27
01/31/14 22:27
Joined: Mar 2010
Posts: 57
Germany, Niedersachsen
LemmyTheSlayer Offline
Junior Member
LemmyTheSlayer  Offline
Junior Member

Joined: Mar 2010
Posts: 57
Germany, Niedersachsen
you have to create a player and move it.
refer to the tutorials for that one.


SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE
Re: Split screen? [Re: LemmyTheSlayer] #436736
01/31/14 22:30
01/31/14 22:30
Joined: Jan 2012
Posts: 36
T
themuzikman Offline OP
Newbie
themuzikman  Offline OP
Newbie
T

Joined: Jan 2012
Posts: 36
Well I already have a player and the left camera works with it, but the right camera is static and seems to be fixed on a random coordinate...

If I try it without a player, then the two cameras are in the correct position, but unable to move the camera, obviously...

Last edited by themuzikman; 01/31/14 22:31.
Re: Split screen? [Re: themuzikman] #436737
01/31/14 22:35
01/31/14 22:35
Joined: Mar 2010
Posts: 57
Germany, Niedersachsen
LemmyTheSlayer Offline
Junior Member
LemmyTheSlayer  Offline
Junior Member

Joined: Mar 2010
Posts: 57
Germany, Niedersachsen
you have put the vec_set and vec_add stuff in a loop, haven't you?


SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE
Re: Split screen? [Re: LemmyTheSlayer] #436738
01/31/14 22:49
01/31/14 22:49
Joined: Jan 2012
Posts: 36
T
themuzikman Offline OP
Newbie
themuzikman  Offline OP
Newbie
T

Joined: Jan 2012
Posts: 36
I haven't changed that from what you posted...

Re: Split screen? [Re: themuzikman] #436739
01/31/14 22:56
01/31/14 22:56
Joined: Mar 2010
Posts: 57
Germany, Niedersachsen
LemmyTheSlayer Offline
Junior Member
LemmyTheSlayer  Offline
Junior Member

Joined: Mar 2010
Posts: 57
Germany, Niedersachsen
if it's not in a loop, the camera position is only updated once.
you want it to be constantly updated.


SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE
Page 2 of 3 1 2 3

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1