this is in lite-C, but it shouldn't be too much different from C-script.
Code:
#include <acknex.h>
#include <default.c>
BMAP* image1 = "image1.bmp";
VIEW* secondView =
{
layer = -1;
flags = NOSHADER | VISIBLE | NOFLAG1;
size_x = 1280;
size_y = 800;
}
MATERIAL* ballMat =
{
skin1 = image1;
effect = "screenFX.fx";
}
action ballAct()
{
my.material = ballMat;
secondView.bmap = image1;
my.flags = FLAG1 | TRANSLUCENT;
}
void main()
{
video_set(1280,800,32,1);
level_load("street.mdl");
wait(3);
ent_create("ball.mdl",vector(0,0,30),ballAct);
vec_set(camera.x,vector(-200,0,30));
vec_set(camera.pan,vector(0,0,0));
camera.aspect = 1.2;
secondView.aspect = 1.2;
while(1)
{
camera_move();
vec_set(secondView.x,camera.x);
vec_set(secondView.pan,camera.pan);
wait(1);
}
}
just some notes:
-- "screenFX.fx" is just exactly what i posted earlier;
-- since i use a widescreen, the aspects need to be set to 1.2 to get the right aspect ratio. this wouldn't work properly when i set secondView.aspect = 1.2 in the view's declaration. i could only get it to work when i set secondView.aspect = 1.2
after camera.aspect = 1.2;
-- ballAct() is just the ball's action that you see in the screenshot from my last post;
-- most of the main() function wouldn't matter to you because it's just setting up my test level.
i guess the main difference i can see is that i don't use an event to assign the material skin -- it's just in the material declaration.
um... sorry i can't be of much help with this. i'm going to be playing around with this a lot in a couple of weeks when my exams are over. i hope what i have for now helps!
julz