1 registered members (AndrewAMD),
1,014
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Poison/Camera Effect WDL
#39200
01/14/05 07:28
01/14/05 07:28
|
Joined: Aug 2004
Posts: 44 RI, USA, Earth (or Mars dk rly...
Davetheave
OP
Newbie
|
OP
Newbie
Joined: Aug 2004
Posts: 44
RI, USA, Earth (or Mars dk rly...
|
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.
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)
|
|
|
Re: Poison/Camera Effect WDL
[Re: snake67]
#39202
01/14/05 20:30
01/14/05 20:30
|
Joined: Aug 2004
Posts: 44 RI, USA, Earth (or Mars dk rly...
Davetheave
OP
Newbie
|
OP
Newbie
Joined: Aug 2004
Posts: 44
RI, USA, Earth (or Mars dk rly...
|
Well thank you for posting and i did at the "* time". I don't know what that does so thats why i never added it. If you can plz tell what how that affects my code.
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)
|
|
|
Re: Poison/Camera Effect WDL
[Re: snake67]
#39205
01/15/05 04:40
01/15/05 04:40
|
Joined: Aug 2004
Posts: 44 RI, USA, Earth (or Mars dk rly...
Davetheave
OP
Newbie
|
OP
Newbie
Joined: Aug 2004
Posts: 44
RI, USA, Earth (or Mars dk rly...
|
Snake67 i have updated the code thank you for your help. Everyone else plz leave your feedback, vote on the poll, and any ideas are much needed.
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)
|
|
|
Re: Poison/Camera Effect WDL
[Re: Davetheave]
#39206
01/15/05 10:03
01/15/05 10:03
|
Joined: Nov 2004
Posts: 832 United States, Utah
Braxton
Developer
|
Developer
Joined: Nov 2004
Posts: 832
United States, Utah
|
So what does this do exactly???
"The GREAT LAW: Life is and always will be justly ordered, and that all past experiences, good and bad, were the equitable out working of our evolving, yet unevolved selves"
- As A Man Thinketh
|
|
|
Re: Poison/Camera Effect WDL
[Re: Braxton]
#39207
01/15/05 10:46
01/15/05 10:46
|
Joined: Aug 2004
Posts: 44 RI, USA, Earth (or Mars dk rly...
Davetheave
OP
Newbie
|
OP
Newbie
Joined: Aug 2004
Posts: 44
RI, USA, Earth (or Mars dk rly...
|
Well this code basicly will blur the screen givin it a Drug effect (or whatever the fuction effect is called), also i added some fuctions that you can call get your player gets shot that will make the screen flash red, or get darker with every shot. Then theres a poison code that will flash the screen green when the player is poisoned (script must call it).
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)
|
|
|
Re: Poison/Camera Effect WDL
[Re: Davetheave]
#39208
01/20/06 18:08
01/20/06 18:08
|
Joined: Dec 2005
Posts: 47 USA, Texas
kmangwing
Newbie
|
Newbie
Joined: Dec 2005
Posts: 47
USA, Texas
|
sweet. Did you change it so it can work in the lower editions?
(\__/) This bunny's dead
(x.X )
(> < ) My aim is kmangwing
|
|
|
|