VIEW script here

Posted By: Realspawn

VIEW script here - 09/28/15 12:18

I want a view to be visible on screen that gives a view from an other
point in the level. I gues i need that view stuff but how is it used
correctly. I looked in the manual but how do i determine the view and make it appear laugh

thx for your time as always laugh
Posted By: jcl

Re: Question about view - 09/28/15 12:25

Look under "VIEW". You need a second view that you place at the other point in the level. I think there are several examples in AUM of using multiple views or split views.
Posted By: Realspawn

Re: Question about view - 09/28/15 12:27

digging throught the aum's but sometimes it's hell even with the search function laugh i will keep digging laugh
Posted By: MasterQ32

Re: Question about view - 09/28/15 12:39

VIEW is just the same thing as "camera". Declare a VIEW like a PANEL, then use it:

Code:
VIEW *camera2 = {
  pos_x = 10;
  pos_y = 10;
  size_x = 150;
  size_y = 100;
  flags = VISIBLE;
  layer = 2;
}

Posted By: Dooley

Re: Question about view - 09/28/15 19:24

Once you have a VIEW set up, then you will need ot create an object that displays that VIEW. Here's how I set it up in my game, you will probably use different variables and such, but it may help you understand:

Quote:
while(screen_exists_n == 1)
{
camera2_view.bmap = bmap_for_entity(my,1);
vec_set(camera2_view.x,ent_spaceship.x); // set the view positions here
vec_set(camera2_view.pan,ent_spaceship.pan); // set the view angles here

wait(1);
}



I asked a question about using dynamic lights in a VIEW entity. You may want to look at some of the links and comments from that thread:

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=453845#Post453845
Posted By: Realspawn

Re: Question about view - 09/28/15 19:35

I figured it out after hours laugh will post a simple example soon
also the aum examples are from the oldy days laugh

thx for your responses
Posted By: Realspawn

Re: Question about view - 09/29/15 09:48

This is what you need to create a new view laugh you can change it into any view you want and use the same script to make more views laugh
Hope people find this usefull

Code:
Pointer that uses the view. 
ENTITY* cammy;
Using a VIEW
VIEW* new_view =
{                
pos_x = 17	 	<<< Placement on X
pos_y = 10;		<<< Placement on Y
size_x = 150;		<<< Size of view x
size_y = 150;		<<< Size of view Y
arc = 60;		<<< sets the camera.arc  zoom factor of the view
layer = 4;		<<< Placed on top of other views that have a lower layer value
genius = cammy;	<<< The pointer that is using the view
flags = SHOW ;		<<< Make view visible
}

The function that uses the VIEUW

function attached_startup()    <<< attaches the view to the pointer
{
while (!cammy) {wait (1);}       	<<< wait till pointer is in the levels.
new_view.tilt = -15;                  	<<<  make the new view look downwards a bit
new_view.pan = cammy.pan;	<<< make view pan the same as the pointer pan
while (1)
{
vec_set(new_view.x, cammy.x);  <<< set_vec (attach cam to pointer)
new_view.y -=1000;		  <<< Set Y camera
new_view.x =0;			  <<< Set X camera
new_view.z += 100; 		  <<< Set height of camera
wait (1);
}
}

Simple action for the new view camera pointer model.

action camsy()
{
cammy = me;
set(my,PASSABLE | INVISIBLE);
}

© 2024 lite-C Forums