Gamestudio Links
Zorro Links
Newest Posts
contractUpdate() is filtering if >2 rows
by mistery. 12/04/26 19:03
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (mistery, AndrewAMD), 5,869 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Drawing a line of particles #437636
02/20/14 21:04
02/20/14 21:04
Joined: Apr 2005
Posts: 796
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 796
U.S.A. Michigan
Hey guys, I am trying to utilize a for loop to draw a line of particles. In the end I am trying to achieve something that works like draw_line3d. I wouldnt be here asking this question if Conitec would just include the formulas for their draw functions in the manual tongue Anyway, I am trying to do something similar to this;

VECTOR temp;
distance = vec_dist(pos_a.x,pos_b.x);
for(i=0; i<distance; i++)
{
effect(pulse_ef_a_base,1,vector(temp.x+i, temp.y, temp.z),nullvector);
}

As you can already guess this wont work. I am not the best at math so I was wondering if someone could help me figure out how to get this to work. To reiterate, I am trying to draw a line of particles from pointA to pointB using a 'for' loop. Thanks to whoever can help me laugh

Re: Drawing a line of particles [Re: exile] #437638
02/20/14 21:48
02/20/14 21:48
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
use BEAM if possible. just set your offset/distance into velocity and don't set move.
else use lerp:
Code:
VECTOR temp;
distance = vec_dist(pos_a.x,pos_b.x);
var per_quant = 4;
for(i = 0; i <= per_quant * distance; i++)
{
vec_lerp(temp, pos_a, pos_b, i / (per_quant * distance));
effect(pulse_ef_a_base,1,temp,nullvector);
}



Visit my site: www.masterq32.de
Re: Drawing a line of particles [Re: MasterQ32] #437640
02/20/14 21:55
02/20/14 21:55
Joined: Apr 2005
Posts: 796
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 796
U.S.A. Michigan
And of course, it was something I thought of but said "Naahhhh, that wouldn't work" tongue

Thanks MasterQ32, I owe you one! Consider this topic solved/closed.


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

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