Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
vertex_to_vertex attaching #136426
06/14/07 14:42
06/14/07 14:42
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B Offline OP
Expert
mpdeveloper_B  Offline OP
Expert

Joined: Feb 2006
Posts: 2,185
this code allows c-scripters to attach a vertex from one entity to a vertex on another entity using mesh deforming. i'll post the code and an explanation:

Code:

entity* ent1;
entity* ent2;

function vertex_to_vertex(e1, vertex1, e2, vertex2)
{
var temp1;
var temp2;
ent1 = e1;
ent2 = e2;
vec_for_vertex (temp1, ent1, vertex1);
vec_set (temp2, temp1);
vec_to_mesh (temp2, ent2, vertex2);
}



vertex_to_vertex (entity 1, vertex 1, entity 2, vertex 2);

entity 1 = the name of the first entity such as "you" or "me"

vertex 1 = the vertex of the first entity to be connected to the second vertex of the second entity

entity 2 = the name of the second entity such as "you" or "me"

vertex 2 = the vertex of the second entity to be connected to the first vertex of the first entity

returns: nothing

uses:

to connect a vertex from one entity to a vertex on another entity

example:

action smoketrail
{
while(you)
{
vertex_to_vertex (me, 1, missile_ent, 30); // connect the top vertex of the smoke to the top vertex of the missile
//code here...
wait(1);
}
}

Last edited by Manslayer101; 06/14/07 14:43.

- aka Manslayer101
Re: vertex_to_vertex attaching [Re: mpdeveloper_B] #136427
06/14/07 17:21
06/14/07 17:21
Joined: Jun 2006
Posts: 2,640
Earth
Germanunkol Offline
Expert
Germanunkol  Offline
Expert

Joined: Jun 2006
Posts: 2,640
Earth
cool idea
did u use it for something??


lol... i can already see this in action... cool


~"I never let school interfere with my education"~
-Mark Twain
Re: vertex_to_vertex attaching [Re: Germanunkol] #136428
06/14/07 17:29
06/14/07 17:29
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
simple to use... simple to understand... nice idea


Never say never.
Re: vertex_to_vertex attaching [Re: tompo] #136429
06/14/07 17:46
06/14/07 17:46
Joined: Feb 2006
Posts: 302
Beienrode/NDS/GERMANY
Dj_Pint Offline
Senior Member
Dj_Pint  Offline
Senior Member

Joined: Feb 2006
Posts: 302
Beienrode/NDS/GERMANY
hey thanks man! this is pretty coool!


if u want to see some stuff i made, go to youTube and search for djpint, not dj pint^^
Re: vertex_to_vertex attaching [Re: Dj_Pint] #136430
06/14/07 18:30
06/14/07 18:30
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Thanks for this contribution manslayer101 this will be handy when creating a vehicle... or even attaching weapons


Devon.


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: vertex_to_vertex attaching [Re: DLively] #136431
06/15/07 02:36
06/15/07 02:36
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B Offline OP
Expert
mpdeveloper_B  Offline OP
Expert

Joined: Feb 2006
Posts: 2,185
no problem and thank you, someone gave me the idea and showed me how, and it turned out working great, this code could also be used for armored core style missle trails, sword/saber trails, just stretching objects, connecting objects by their vertexes, dents in models, terrain deforming, etc....

i would like to write simple things like this more often, if there is enough people who want them, i could write things like this on the side, or if i get free time, make a whole pack of engine functions and sell them cheap

Last edited by Manslayer101; 06/15/07 02:40.

- aka Manslayer101
Re: vertex_to_vertex attaching [Re: mpdeveloper_B] #136432
06/15/07 15:08
06/15/07 15:08
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
wow, this could attach several terrains together
why didnt i ever think of that, lol, instead i allways edited each time in MED :/ (stupidity mode)

thanks!!

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: vertex_to_vertex attaching [Re: Helghast] #136433
06/19/07 02:26
06/19/07 02:26
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B Offline OP
Expert
mpdeveloper_B  Offline OP
Expert

Joined: Feb 2006
Posts: 2,185
no problem dennis, and you know i never even thought of that either


- aka Manslayer101
Re: vertex_to_vertex attaching [Re: mpdeveloper_B] #136434
06/22/07 15:43
06/22/07 15:43
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
i have to ask. i have a hammer weapon that i want to give the sword trail code posted in another thread, and i want to attach the weapon to my character model as a weapon. can i use this code to implement that? or do i have to use the other vertex attach code in the au resources?

Re: vertex_to_vertex attaching [Re: Blink] #136435
06/22/07 16:15
06/22/07 16:15
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
if the trail is the model, why not?
but I suppose that the trail is bmap or particles effect with fade alpha, so better idea will be use simple vec_for_vertex to find hammer's top

Last edited by tompo; 06/22/07 16:17.

Never say never.
Page 1 of 3 1 2 3

Moderated by  adoado, checkbutton, mk_1, Perro 

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