Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Joey, flink, AndrewAMD, ozgur, Ayumi), 1,195 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 5 1 2 3 4 5
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 Offline OP
User
Marky Mark  Offline 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 Offline
Expert
xXxGuitar511  Offline
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: xXxGuitar511] #116073
03/09/07 15:50
03/09/07 15:50
Joined: Jul 2002
Posts: 857
Québec
Marky Mark Offline OP
User
Marky Mark  Offline OP
User

Joined: Jul 2002
Posts: 857
Québec
yeah I know I defined my bmap and stuff. But Maybe I forgot the wait(1) statements lol. Anywayy, Scorpion, if you could show us your code...


Yeah! IE sucks, use Mozilla...
Marc Rémillard.
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 Offline
Expert
Germanunkol  Offline
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 Offline
Expert
xXxGuitar511  Offline
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...


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 Offline OP
User
Marky Mark  Offline 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




Yeah! IE sucks, use Mozilla...
Marc Rémillard.
Re: The Tornado [Re: Marky Mark] #116077
03/09/07 19:19
03/09/07 19:19
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline
Expert
XNASorcerer  Offline
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
Realspawn posted a long time ago, a tutorial about a tornado and it was pretty nice. He was using 2 or 3 models with some transparent textures and some particles at the bottom of the model. Them he was making the model and particles to rotate different directions.

Re: The Tornado [Re: XNASorcerer] #116078
03/09/07 20:57
03/09/07 20:57
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
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 ):

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.
Re: The Tornado [Re: Scorpion] #116079
03/09/07 21:21
03/09/07 21:21
Joined: Jul 2002
Posts: 857
Québec
Marky Mark Offline OP
User
Marky Mark  Offline OP
User

Joined: Jul 2002
Posts: 857
Québec
Looks so nice! We'll just need to add some effects to it Thanks so much




Yeah! IE sucks, use Mozilla...
Marc Rémillard.
Re: The Tornado [Re: Marky Mark] #116080
03/09/07 21:23
03/09/07 21:23
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
just say me what you need for effects, guess i can help

Page 2 of 5 1 2 3 4 5

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