Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (NewbieZorro, Grant, TipmyPip, AndrewAMD), 12,885 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how can use view function in surface object #147256
08/11/07 09:43
08/11/07 09:43
Joined: Jul 2007
Posts: 69
fat32 Offline OP
Junior Member
fat32  Offline OP
Junior Member

Joined: Jul 2007
Posts: 69
how can use view function for use in the object surface.

for example : monitoring in the security room.


dobidob hosein_dig and max_man7000 game

HAPPY NEW YEAR !!
Re: how can use view function in surface object [Re: fat32] #147257
08/11/07 09:59
08/11/07 09:59
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
In Lite-C it's something like this:

Code:
ENTITY* myObject;

VIEW* side_view = // the view
{
layer = 30; // above or below others
pos_x = 0; // position of the view
pos_y = 0; // position of the view
size_x = 300; // size of the view
size_y = 300; // size of the view
flags = (TRANSLUCENT | VISIBLE);
}

void TheCamera()
{
while(1)
{
side_view.x = myObject.x-100; // behind the player
side_view.y = myObject.y; // center
side_view.z = 50; // above the player
side_view.alpha = 75; // make view transparent
wait(1);
}
}

void main()
{
level_load("");
wait(1);
myObject = ent_create ("myObject.mdl", vector(-150, 0, 27), NULL); // create the object in our world
TheCamera(); // start the camera and follow myObject
}


Just search in the GameStudio bible for the words VIEW and CAMERA. Also read the AUM's, George made some security cams in the past.


smile
Re: how can use view function in surface object [Re: D3D] #147258
08/11/07 14:07
08/11/07 14:07
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
I think that you´re looking for something like this:
(but this example changes the whole texture)
Code:

VIEW* side_view = // the view
{
layer = -1; // above or below others
pos_x = 0; // position of the view
pos_y = 0; // position of the view
size_x = 512; // size of the view
size_y = 512; // size of the view
flags = (VISIBLE);
}

void TheCamera(ENTITY* ent)
{
my = ent;
side_view.bmap = bmap_for_entity(my,0); //render the view into the entities texture

//do something with the view
}

void main()
{
level_load("");
wait(1);
you = ent_create ("myObject.mdl", vector(-150, 0, 27), NULL); // create the object in our world
TheCamera(you); // start the camera and follow myObject
}



very thank's [Re: Slin] #147259
08/11/07 20:46
08/11/07 20:46
Joined: Jul 2007
Posts: 69
fat32 Offline OP
Junior Member
fat32  Offline OP
Junior Member

Joined: Jul 2007
Posts: 69
very thank's i test it


dobidob hosein_dig and max_man7000 game

HAPPY NEW YEAR !!

Moderated by  HeelX, Spirit 

Gamestudio download | 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