|
Re: The Tornado
[Re: Scorpion]
#116071
03/09/07 15:43
03/09/07 15:43
|
Joined: Jul 2002
Posts: 857 Québec
Marky Mark
OP
User
|
OP
User
Joined: Jul 2002
Posts: 857
Québec
|
Scorpion, did you used Germanunkol's script ? I can't get it working. I tried to test it, but I'm getting errors about an empty pointer..
Yeah! IE sucks, use Mozilla... Marc Rémillard.
|
|
|
Re: The Tornado
[Re: Marky Mark]
#116072
03/09/07 15:47
03/09/07 15:47
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
GermanUnkol's script is missing a few wait(1); statements, lol. Plus, you'd have to still modify it (change the order of the actions, define your tornado's particle [bmap], etc). He was just giving you psuedo-code, to get you started.
But Scorpion, please post the code you got, I'd love to see this run...
xXxGuitar511 - Programmer
|
|
|
Re: The Tornado
[Re: Marky Mark]
#116074
03/09/07 16:08
03/09/07 16:08
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
Expert
|
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
I think I'll program myself a programm that put a wait(1) into every while(1) loop. Dang, this is embarrassing. Why do I leave out wait(1)s every time I post? -.- I'll try not to let that happen again...-.-
Yeah, I guess you can call it pseudo code, since I never tested it...^^
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
Re: The Tornado
[Re: Germanunkol]
#116075
03/09/07 16:11
03/09/07 16:11
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
lol, I don't really even know what psuedo means. I always heard people use it, and I thought it meant "untested", or "just made it right now, idk", but according to Webster dictionary, it means "false". So sorry for calling your code psuedo-code... ![](/ubbthreads/images/graemlins/wink.gif)
xXxGuitar511 - Programmer
|
|
|
Re: The Tornado
[Re: xXxGuitar511]
#116076
03/09/07 19:10
03/09/07 19:10
|
Joined: Jul 2002
Posts: 857 Québec
Marky Mark
OP
User
|
OP
User
Joined: Jul 2002
Posts: 857
Québec
|
Well it comes from a french word I think, and it's like a nickname. If your nickname si xXxGuitar511, this is also your "psuedo" So its like saying Your "code" instead of Your code ![](/ubbthreads/images/graemlins/tongue.gif)
Yeah! IE sucks, use Mozilla... Marc Rémillard.
|
|
|
Re: The Tornado
[Re: XNASorcerer]
#116078
03/09/07 20:57
03/09/07 20:57
|
Joined: Jan 2007
Posts: 1,619 Germany
Scorpion
Serious User
|
Serious User
Joined: Jan 2007
Posts: 1,619
Germany
|
ok, i worked a bit on the script, it is not perfect, but its a first version(btw: function main is added,so its a plug and play script ![](/ubbthreads/images/graemlins/wink.gif) ): DownloadScript+files Code:
bmap tornado_bmap = <sprite.tga>; bmap small_bmap = <particle.bmp>;
function tornado_particles; function small_particle;
function tornado_sprite() { var distance; var distance_add; var max_alpha = 40; my.facing = on; my.transparent=on; my.alpha=0; my.passable = on; my.unlit=on; my.light=on; my.red=70; my.green=50; my.blue=30; while(my.skill3 == 0) { wait(1); } distance_add=random(0.7); while(1) { distance + = distance_add*time; my.skill2 + = my.skill1 * time; you = ptr_for_handle(my.skill3); if(abs(my.z-your.z)>1000) { my.alpha-=0.5*time; if(my.alpha < 0){wait(1);ent_remove(me);return;} } else { my.alpha = min(my.alpha+time,max_alpha); } my.x = sin(my.skill2)*distance + you.x+20*sin(my.z+your.pan); my.y = cos(my.skill2)*distance + you.y+20*sin(my.z+your.pan); my.z += random(5)*time; if(total_ticks%5<1)//all 5 ticks { my.scale_x += 0.002; my.scale_y += 0.002; } if(random(40)>39.9) { effect(tornado_particles,2,my.x,nullvector); } my.roll + = my.skill1*time; wait(1); } }
function move_tornado { var position[3]; var new_pos[3]; new_pos.x=random(5)-2.5; new_pos.y=random(5)-2.5; while(1) { if(random(10)>9.9)//new dir { new_pos.x=random(5)-2.5; new_pos.y=random(5)-2.5; } position.x += (new_pos.x-position.x)*0.1*time; position.y += (new_pos.y-position.y)*0.1*time; my.x += position.x*time; my.y += position.y*time; my.pan+=5*time; wait(1); } }
function tornado_paritcle_func { if(my.skill_a==1) { my.alpha+=time; if(my.alpha>5) { my.skill_a=0; } } else { my.alpha-=time; } my.size += 20*time; my.x = your.x - 10*sin(total_ticks); my.y = your.y - 10*cos(total_ticks); effect(small_particle,1,vector(my.x+50-random(100),my.y+50-random(100),my.z+50-random(100)),vector(0,0,-0.125)); if(my.alpha<0) { my.lifespan=0; } }
function tornado_particles { my.bmap = tornado_bmap; my.function=tornado_paritcle_func; my.transparent=on; my.size = 200; my.alpha=0; my.skill_a=1; my.red=20; my.green=10; my.blue=0; }
function small_particle_func { my.alpha-=time; my.x = your.x +50-random(100); my.y = your.y +50-random(100); if(my.alpha<0) { my.lifespan=0; } }
function small_particle { my.size=0.5; my.function = small_particle_func; my.red=0; my.green=0; my.blue=0; my.bmap = small_bmap; my.streak=on; my.move=on; my.transparent = on; }
action tornado() { my.passable = on; my.invisible = on; //move_me here^^ move_tornado(); while(1) { you = ent_create("sprite.tga",my.x,tornado_sprite); you.skill1 = random(10)+2; you.skill2 = random(360); you.scale_x = 0.125; you.scale_y = you.scale_x; you.skill3 = handle(my); wait(-random(0.2)); } }
function main { fps_max=75; level_load("tornado.wmb"); wait(3); randomize(); while(1) { camera.pan -= mouse_force.x; camera.tilt += mouse_force.y; temp.x = (key_w-key_s+mickey.z/10)*15*time; temp.y = (key_a-key_d)*15*time; temp.z = 0; vec_rotate(temp,camera.pan); vec_add(camera.x,temp); wait(1); } }
Thank you germanunkohl its just your script wiht some extras
Last edited by Scorpion; 03/09/07 21:08.
|
|
|
|