Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Lights on models {Sigh} #121543
04/05/07 01:12
04/05/07 01:12
Joined: Aug 2004
Posts: 137
F
foodstamp Offline OP
Member
foodstamp  Offline OP
Member
F

Joined: Aug 2004
Posts: 137
I was messin with some of the fx scripts in the template folder. Well I come across the short circuit action. I have tried to mess with it a bit but I cant get it to work period. I mess something up all the time. Anyway I noticed the short circuit action lighted the model up. Is there anyway to make this a standard dynamic light ?

Code:
// action: FXA_ShortCircuit
// title: Short Circuit Sparker
// help:
// Desc: Emits shower of sparks with making "zap" noises.
//
//
// section: Trigger
//
// help: Activate when trigger is set? (0 if always active)
// skill12: ID 0
//
// section: Dynamic Light
//
// cntl: spin 0 255 1
// skill1: Red 133
// cntl: spin 0 255 1
// skill2: Green 194
// cntl: spin 0 255 1
// skill3: Blue 201
// cntl: 0 x 1
// skill5: LightRange 250
//
// section: Spark
//
// cntl: 1 x 1
// skill11: Size 1
// cntl: spin 0 255 1
// skill6: Red 255
// cntl: spin 0 255 1
// skill7: Green 255
// cntl: spin 0 255 1
// skill8: Blue 203
// cntl: 1 x 1
// skill9: Lifespan 250
//
// help: Percent chance that this emitter will spark every 1/4 second.
// cntl: 1 100 1
// skill14: PerSpark 55
// help: Duration of each spark shower (in ticks).
// cntl: 1 x 1
// skill15: DirSpark 6
action FXA_ShortCircuit
{
my.invisible = on;
my.passable = on;

// activate dynamic light color
my.red = my.skill1;
my.green = my.skill2;
my.blue = my.skill3;

my.skill15 /= 2; // random duration time = base + random(base)


while(1)
{
if((my.skill12 == 0) || Trigger00_Check(my.skill12,trigger00_bitlist) == 1)
{
if(random(100) < my.skill14) // percent chance of activating everything 1/4 second
{
my.skill21 = my.skill15+random(my.skill15); // duration

while(my.skill21 > 0)
{
my.lightrange = my.skill5 * (random(0.8)+0.2); // 20 to 100% the max lightrange

effect(FXA_ShortCircuit_Part,(20*time_step),my.x,nullvector);

// play a random "zap" sound if no sound is playing
if(!snd_playing(fxa_circuit_handle))
{
if(random(2)> 1) {fxa_circuit_handle = ent_playsound(my,fxa_circuit1_wav,100);}
else {fxa_circuit_handle = ent_playsound(my,fxa_circuit2_wav,100);}
}

my.skill21 -= time_step;
wait(1);
}
}
}
my.lightrange = 1;
sleep(0.25);
}
}



Re: Lights on models {Sigh} [Re: foodstamp] #121544
04/05/07 19:53
04/05/07 19:53
Joined: Aug 2004
Posts: 137
F
foodstamp Offline OP
Member
foodstamp  Offline OP
Member
F

Joined: Aug 2004
Posts: 137
nvrmind found it on my own


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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