Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,388 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 4 1 2 3 4
[assist] sword trail ? #339653
08/28/10 14:40
08/28/10 14:40
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
been a while since i used this to ask for help but... am at an impass... so:

would anyone happen to know of or can give an idea for creating a sword trail, i dont think particles is suited for that, so far it seems a trail model has to be used..

[EDIT: c-script version]
and yes i've tried the C-Script one in Resources, cant get it to work, it seems to be converted ok, gives no more errors, juts doesnt word

Last edited by darkinferno; 08/28/10 14:57.
Re: [assist] sword trail ? [Re: darkinferno] #339654
08/28/10 14:44
08/28/10 14:44
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
What about example from Acknex Resources? laugh
Here you go:
Download link
It's C-Script, but can be translated in to Lite-c with easy I guess laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: 3run] #339657
08/28/10 14:58
08/28/10 14:58
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
lol u guess... its not working out, so far i havent heard of anyone that got it to work for liteC

Re: [assist] sword trail ? [Re: darkinferno] #339659
08/28/10 15:02
08/28/10 15:02
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
What if we make 2 trace from base to tip of the sword, and then attach particles to it? Wouldn't that work normal?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: 3run] #339660
08/28/10 15:26
08/28/10 15:26
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Sorry for double post, but who told you that it's not working?! grin
Even such noob as me got it to work grin Enjoy:
Download link


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: darkinferno] #339661
08/28/10 15:32
08/28/10 15:32
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Originally Posted By: darkinferno
lol u guess... its not working out, so far i havent heard of anyone that got it to work for liteC


challenge accepted.

---edit: guess it's too late?
edit2: yep it's too late. It's hardly a challenge though, as 3run said.

Last edited by Quadraxas; 08/28/10 15:33.

3333333333
Re: [assist] sword trail ? [Re: Quad] #339662
08/28/10 15:33
08/28/10 15:33
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
lol, weeeeeee indeed ^ ^ hope u pull it off quadraxas, may get u a free demo for something wink

[EDIT]
not too late man, go right ahead =]

Last edited by darkinferno; 08/28/10 15:33.
Re: [assist] sword trail ? [Re: Quad] #339663
08/28/10 15:33
08/28/10 15:33
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Yep grin growing old dude? I guess, I'm faster than you tongue


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: 3run] #339664
08/28/10 15:34
08/28/10 15:34
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
If 3run's version is not working i am still up for challenge ^^


3333333333
Re: [assist] sword trail ? [Re: Quad] #339665
08/28/10 15:35
08/28/10 15:35
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Unfortunately, it works grin darkinferno, can I get some free demo? blush Link changed, now demo can be downloaded from my website ^^


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: 3run] #339673
08/28/10 16:25
08/28/10 16:25
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
lol sorry didnt see your post 3run, well ur demo ran fine but am having problems implementing it to my game, so i need to find whats causing tha problems and all... seems weird tho,

i'll keep u posted

Re: [assist] sword trail ? [Re: darkinferno] #339674
08/28/10 16:28
08/28/10 16:28
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
I'm glad to hear, that you found it useful laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: 3run] #339675
08/28/10 16:34
08/28/10 16:34
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
lol i still avent gotten it working yet, very strange though, i cant see any code errors

Re: [assist] sword trail ? [Re: darkinferno] #339676
08/28/10 16:36
08/28/10 16:36
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
You mean, that you can't get it to work in your project? Or you can't get to work my demo? O_o


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: 3run] #339677
08/28/10 16:39
08/28/10 16:39
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
my project, lol demo works fine, idk whats causing a prob in my code

Re: [assist] sword trail ? [Re: darkinferno] #339679
08/28/10 16:43
08/28/10 16:43
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
check your PM's.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: 3run] #339687
08/28/10 17:12
08/28/10 17:12
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
keep the posts here so others may get help if they ever encounter similar problems:

meh, seems i was being a noob, lol i put tha swordtrail model in tha wrong dev folder, now it shows up in game, can see where it tries to follow the sword correctly, except, its at an offset.. as in, its out of place

Re: [assist] sword trail ? [Re: darkinferno] #339689
08/28/10 17:15
08/28/10 17:15
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
All of us were noob at once grin
About the offset, can you post some picture that shows the problem?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: 3run] #339692
08/28/10 17:44
08/28/10 17:44
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
Code:
// sword trail effect
//***********************************************************************************************************
ENTITY* trail1;
////////////////

function sw_Trail_ctrl()
{
	VECTOR trailpos1;
	VECTOR trailpos2;
	VECTOR trailpos3;
	VECTOR trailpos4;
	VECTOR trailpos5;
	VECTOR trailpos6;
	VECTOR trailpos7;
	VECTOR trailpos8;
	VECTOR trailpos9;
	VECTOR trailpos10;

	trail1 = ent_create("trail1mdl.mdl",me.x,NULL);
	set(trail1,PASSABLE);

	var trail_length = 2; // adjust length of the trails
	vec_set(trailpos10,nullvector);
	vec_set(trailpos9,nullvector);
	vec_set(trailpos8,nullvector);
	vec_set(trailpos7,nullvector);
	vec_set(trailpos6,nullvector);
	vec_set(trailpos5,nullvector);
	vec_set(trailpos4,nullvector);
	vec_set(trailpos3,nullvector);
	vec_set(trailpos2,nullvector);
	vec_set(trailpos1,nullvector);
	
	while(1)
	{
		
		vec_for_vertex(trailpos2,me,46); // vertex # for top of blade
		vec_for_vertex(trailpos1,me,28); // vertex # for bottom of blade
		//vec_set(trail1.x,my.x);
		
		vec_lerp(trailpos10,trailpos10,trailpos8,time_step/trail_length);
		vec_lerp(trailpos9,trailpos9,trailpos7,time_step/trail_length);
		vec_lerp(trailpos8,trailpos8,trailpos6,time_step/trail_length);
		vec_lerp(trailpos7,trailpos7,trailpos5,time_step/trail_length);
		vec_lerp(trailpos6,trailpos6,trailpos4,time_step/trail_length);
		vec_lerp(trailpos5,trailpos5,trailpos3,time_step/trail_length);
		vec_lerp(trailpos4,trailpos4,trailpos2,time_step/trail_length);
		vec_lerp(trailpos3,trailpos3,trailpos1,time_step/trail_length);
		
		vec_to_mesh(trailpos1,trail1,19);
		vec_to_mesh(trailpos2,trail1,20);
		vec_to_mesh(trailpos3,trail1,17);
		vec_to_mesh(trailpos4,trail1,18);
		vec_to_mesh(trailpos5,trail1,16);
		vec_to_mesh(trailpos6,trail1,15);
		vec_to_mesh(trailpos7,trail1,13);
		vec_to_mesh(trailpos8,trail1,14);
		vec_to_mesh(trailpos9,trail1,12);
		vec_to_mesh(trailpos10,trail1,11);
		vec_to_mesh(trailpos1,trail1,2);
		vec_to_mesh(trailpos2,trail1,1);
		vec_to_mesh(trailpos3,trail1,4);
		vec_to_mesh(trailpos4,trail1,3);
		vec_to_mesh(trailpos5,trail1,5);
		vec_to_mesh(trailpos6,trail1,6);
		vec_to_mesh(trailpos7,trail1,8);
		vec_to_mesh(trailpos8,trail1,7);
		vec_to_mesh(trailpos9,trail1,9);
		vec_to_mesh(trailpos10,trail1,10);
		
		wait(1);
	}
	
}




lol am no noob =P
anyways, i made a function sw_Trail_ctrl and called it from my sword function, as said, i see tha trail.. BUT its at an offset, above the actual sword

Re: [assist] sword trail ? [Re: darkinferno] #339695
08/28/10 18:10
08/28/10 18:10
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
I'm just kidding bro laugh
Some how I got it to work (some times I even amaze myself grin ).
If you are using an other sword model, you need to change this two numbers according to your sword model:
Code:
vec_for_vertex(trailpos2,me,39); // vertex at the top of the sword
vec_for_vertex(trailpos1,me,9); // vertex at the bottom of the sword

Results...
BEFORE:

AFTER:

I hope, this is what you were looking for laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: 3run] #339700
08/28/10 18:37
08/28/10 18:37
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Sorry for double post laugh But here is an other effect (made with particles). I'm using free version of GS, so I can't use BEAM or STREAK. Turn them on, and may be effect will looks better laugh

Here is the demo:
Download link


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: 3run] #339701
08/28/10 18:55
08/28/10 18:55
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
thats not the problem, as u can see my vertice numbers differs from urs, something else is going on..

i wonder if quadraxas is still up fa looking into this, the trail just doesnt follow my character

Re: [assist] sword trail ? [Re: darkinferno] #339703
08/28/10 19:05
08/28/10 19:05
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
I guess I got what error you are having...
I tried to fix it, but I fail... frown
As your knowledge is better than mine, may be you should try set trail position to swords position, in while loop? Cause it looks as trail is not set to swords position.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: 3run] #339707
08/28/10 19:14
08/28/10 19:14
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
i tried.. but got some weird error where the trail moved away from the player when i moved, as if it had its own movement code.. idk man, am pretty much lost

Re: [assist] sword trail ? [Re: darkinferno] #339710
08/28/10 19:46
08/28/10 19:46
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Me too frown may be I'm too sleepy to figer out with it frown I'll take a look of this tomorrow, if you aren't in hurry of cause.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: darkinferno] #339711
08/28/10 19:48
08/28/10 19:48
Joined: Sep 2009
Posts: 496
P
Progger Offline
Senior Member
Progger  Offline
Senior Member
P

Joined: Sep 2009
Posts: 496
darkinferno can u post a picture of ur problem?


asking is the best Way to get help laugh laugh laugh
Re: [assist] sword trail ? [Re: Progger] #339740
08/28/10 21:45
08/28/10 21:45
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
sorry i dnt think i can po3st screen from tha game, hmm, 3run if u recreated the error, can u post tha error ? oh and the beam/streak flag doesnt help tha particle trail much 3run wink

Re: [assist] sword trail ? [Re: darkinferno] #339742
08/28/10 21:52
08/28/10 21:52
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Sure bro, here you go:

About particles... shit happens frown


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: 3run] #339748
08/28/10 22:49
08/28/10 22:49
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
ya thats the error i ave also

Re: [assist] sword trail ? [Re: darkinferno] #339749
08/28/10 22:55
08/28/10 22:55
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
i can look in to it if 3run can post the errornous one. Also initial code can be written in a more convenient way using loops and a vector array instead of alot vectorsç


3333333333
Re: [assist] sword trail ? [Re: Quad] #339753
08/28/10 23:37
08/28/10 23:37
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Try putting this line in the function. (before the loop starts)

proc_mode = PROC_LATE;


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: [assist] sword trail ? [Re: EvilSOB] #339757
08/29/10 01:00
08/29/10 01:00
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
didnt help EvilSOB, no effect at all

Re: [assist] sword trail ? [Re: darkinferno] #339768
08/29/10 08:07
08/29/10 08:07
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
How about this one? It's actually a small modification to the script, but I promise it'll look better LoL
http://www.mediafire.com/?jbjgsmain8gduv2
The one above has problem when moving
This one is fixed:
http://www.mediafire.com/?jknlkbamgvs12zo

[ANOTHER EDIT]
About the problem in your code, you must substract everything after vec_for_vertex by my.x
Code:
vec_for_vertex(trailpos2,me,46); // vertex # for top of blade
vec_sub(trailpos2,my.x);
vec_for_vertex(trailpos1,me,28); // vertex # for bottom of blade
vec_sub(trailpos1,my.x);




Last edited by bart_the_13th; 08/29/10 08:25.
Re: [assist] sword trail ? [Re: bart_the_13th] #339819
08/29/10 13:10
08/29/10 13:10
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
i like tha first code because the trail looks smoother, however when i add vec_sub, it shows correctly on the players created postition but doesnt move around with the player, did u get that ?

[EDIT]
added: vec_set(trail1.x,my.x);

code seems to work now, so i guess anyone that wants to use this now has a thread that may help, i'll also add u guys to tha beta test list, if ur willing, should be in about a month

Re: [assist] sword trail ? [Re: darkinferno] #339823
08/29/10 13:28
08/29/10 13:28
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
True, until I set the trail_length to 5 grin
I think I make mistake, like you said, it should be vec_sub-ed by trail.x tongue
Anyway, glad that you got it work(and I have my own sword trail :D)

Re: [assist] sword trail ? [Re: bart_the_13th] #339874
08/29/10 15:53
08/29/10 15:53
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Will be happy to participate in testing laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [assist] sword trail ? [Re: 3run] #339875
08/29/10 15:59
08/29/10 15:59
Joined: Sep 2009
Posts: 496
P
Progger Offline
Senior Member
Progger  Offline
Senior Member
P

Joined: Sep 2009
Posts: 496
I would like to test it too darkinferno laugh but i didnt help u so its ur decision
WFG Progger


asking is the best Way to get help laugh laugh laugh
Re: [assist] sword trail ? [Re: Progger] #339924
08/29/10 19:58
08/29/10 19:58
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Does quad is eligible too? ^^


3333333333
Re: [assist] sword trail ? [Re: Quad] #339928
08/29/10 20:07
08/29/10 20:07
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
Im not sure how the aum one does it, looks pretty close, but i'd just have a quad, constantly have 2 vertices placed at opposing ends of the blade, and have the other two slower interpolating towards the other two respective verts. this way the speed of the sword decides the degree of trail.

Re: [assist] sword trail ? [Re: lostclimate] #339950
08/30/10 06:28
08/30/10 06:28
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
The aum version work by having a trail model with a lot of quad polygon interconnected, then set their vertices using interpolation results between the first quad and the last quad(or atleast that what I think grin )

Mine work like how particles work. I create a quad-polygon entity with the 1st & 2nd vertices set to the current sword's vertices, and the 3rd & 4th using the last sword's vertices. I create it every two frame (though it can be set into every frame but will create more trail). The trail fades away using alpha and removed when it's alpha reach 0.

BTW, I think I'll sign up to be beta tester grin

Page 1 of 4 1 2 3 4

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