marcrem
Number of posts : 32 Registration date : 2007-03-09
| Subject: Moving the storm Fri Mar 09, 2007 4:08 am | |
| - Quote :
- ok, here's my plan...
Create an entity for the center of the storm. Then place this (in WED), in the center of your storm . Then, during the first cycle of the [clouds, lightning cubes, etc] action, they will find their offset from the storm center, and save it in a skill (or three).
var StromScale = 1;
ACTION StormCenter { StormC = my; }
ACTION Cloud [lightning, etc] { wait(1); vec_diff(temp, my.x, StormC.x); vec_set(my.skill50, temp); ... while(1) { ... vec_set(my.x, StormC.x); vec_set(temp, my.skill50); vec_scale(temp, StormScale); vec_add(my.x, temp); ... wait(1); } }
Then you'd just use another function to move around StormC.x, and all else will follow... plus you can also set the StormScale value to scale the storm... So Here we go. The cloud action: - Code:
-
action ScloudBew { my.skill1 = 5000; if (ObservationConditions[olBewcity] == ocPoor) { my.visible = off; } if (ObservationConditions[olBewcity] == ocAverage) { my.visible = on; my.transparent = on; my.alpha = 50; darkcloud(); //changes the color of the cloud to dark } if (ObservationConditions[olBewcity] == ocGood) { my.visible = on; darkercloud(); //changes the color of the cloud to very dark } }
The lightning actions: - Code:
-
//================================================================================ // ACTION FOR CLOUDS //================================================================================ //only the first two lines are important for lightning
action lightning_cloud { my.skill1 = 1; num_of_pos_ents += 1; //this will auto increment keep count of pos ents
my.invisible = on; my.scale_x = 3; my.scale_y = 3; my.scale_z = 0.5; my.skin = 6;
my.transparent = on; my.alpha = 35;
while(me) { my.pan += 1* time; c_move(my, vector(2*time,0,0),nullvector, ignore_passable); wait(1);
} }
//================================================================================ // ACTION FOR BUILDINGS (lightning targets) //================================================================================ //only the first two lines are important for lightning
action building { my.skill1 = 2; num_of_neg_ents += 1;
my.invisible = on; my.scale_z = 5; my.skin = 5; }
I can send the whole script if needed.. | |
|