Well after much time spent on the fourms i found that people need codes that involved the cameras. So i looked around more and found how easy it was to make some camera code. Any feedback will be great i don't care if it's bad. Also i will take ideas. Note: I belive the camera.alpha code needs pro edition to run currectly.

Code:
/* Poison/Camera effect      Coded by David Branco a.k.a DaveTheAve

Note: This code was made for use with the templates.
To use:
Include this .WDL last in the main script
Call the function of the effect you want.
To shutoff:
Camera effects: Call the function "normal_camera"
Other Effects: Call the function "shutdown_effects" */

bmap poison_pan = "poison.bmp"; //Fullscreen poison bmp file
bmap pain_pan = "pain.bmp"; //Fullscreen pain bmp file
var poison_stat, 0; //Keep at 0 Needed to reset effect is more poison is taken
var poison_speed, 1; //Speed the poison effect decreases by
var pain_stat, 0; //Keep at 0 Needed to reset effect is more poison is taken
var pain_speed, 1; //Speed the poison effect decreases by
var drugged_working, 0; //Keep at 0 Needed for the drug camera

panel poison_panel
{
alpha = 0;
bmap = poison_pan;
flags = transparent, refresh, d3d;
}

panel pain_panel
{
alpha = 0;
bmap = pain_pan;
flags = transparent, refresh, d3d;
}

function poison_effect()
{
poison_panel.alpha = 80;
poison_stat = 1;
poison_panel.visible = on;
while(poison_panel.alpha > 0)
{
poison_panel.alpha -= poison_speed * time;
wait(1);
}
poison_panel.alpha = 0;
poison_panel.visible = off;
poison_stat = 0;
}

function pain_effect()
{
pain_panel.alpha = 80;
pain_stat = 1;
pain_panel.visible = on;
while(pain_panel.alpha > 0)
{
pain_panel.alpha -= pain_speed * time;
wait(1);
}
pain_panel.alpha = 0;
pain_panel.visible = off;
pain_stat = 0;
}

function pain_remain_on_screen_effect()
{
pain_stat = 1;
pain_panel.visible = on;
wait(5);
while(pain_stat == 1)
{
pain_panel.alpha = 100 - player._HEALTH;
wait(1);
}
pain_panel.alpha = 0;
pain_panel.visible = off;
pain_stat = 0;
}

function shutdown_effects()
{
pain_stat = 0;
poison_stat = 0;
}

function normal_camera()
{
camera.alpha = 50;
camera.transparent = off;
drugged_working = 0;
}

function slowmo_camera()
{
camera.transparent = on;
camera.alpha = 30;
}

function drugged_camera()
{
camera.transparent = on;
camera.alpha = 8;
drugged_working = 1;
while (drugged_working == 1)
{
camera.x += 10 * time;
wait(1);
camera.x -= 10 * time;
wait(1);
}
}

function nos_camera()
{
camera.transparent = on;
camera.alpha = 20;
}



Edit: I belive i had used the alpha values wrong so i just fixed them. Also so small improvments on the poison code and the pain code.

Edit: Thank you Snake67 for the "* time" help.

Should I make the camera.alpha codes run off a .bmp file to support lower editions?
single choice
Votes accepted starting: 01/13/05 22:28
You must vote before you can view the results of this poll.
Last edited by Davetheave; 01/15/05 05:23.

Latest Project: RadioWave www.NeoeliteUSA.com Computer System: Motherboard: DFI LanParty CPU: AMD Athlon XP 2800 AGP: Radeon 9600XT Ram: 1GB Case: Antec PlusView OS: Windows XP (Modded)