|
|
Re: vertex_to_vertex attaching
[Re: Blink]
#136437
06/22/07 16:34
06/22/07 16:34
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
OP
Expert
|
OP
Expert
Joined: Feb 2006
Posts: 2,185
|
it may be a bit laggy, but other than that i don't see a problem
- aka Manslayer101
|
|
|
Re: vertex_to_vertex attaching
[Re: mpdeveloper_B]
#136440
06/22/07 20:29
06/22/07 20:29
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink

Expert
|

Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
see, my issue with the other code was, the hammer became passable after you picked it up, so it wouldnt be able to be used as a weapon, right?
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
Re: vertex_to_vertex attaching
[Re: Blink]
#136441
06/23/07 04:10
06/23/07 04:10
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
OP
Expert
|
OP
Expert
Joined: Feb 2006
Posts: 2,185
|
well, got a quick remedy for that, use this code: Code:
function hammer_damage(vertex1, vertex2) { var attach_pos; var attach; var res; vec_for_vertex(attach,you,vertex1); //vertice at "pinky" side of palm vec_for_vertex(attach_pos,my,vertex2); //vertice between thumb and pointer finger res = c_trace (attach, attach_pos, ignore_passable + ignore_me + ignore_you + use_polygon + use_aabb + ignore_maps); if (res != 0 you != null) { if (you.skill67 != 1979) { you.health -= 40*time_step; ///create effects on target.x as the position } } }
ok, for this line: if (you.skill67 != 1979) set a skill for the person holding the weapon such as: my.skill67 = 1979; skill67 and 1979 are only an example, it can be any skill and number you want, this is so that it doesn't damage the player, you could probably replace this with if (you == player) and it may work the same and you would add this in your hammer's while loop, like this: while (me) { hammer_damage(number of first vertex, number of second vertex); wait(1); } what you would do is add 2 vertexes on your hammer model, and put the number of the two vertexes in the place of "number of first vertex" and "number of second vertex", you'll need to put the 2 vertexes where you would like damage to be registered, like one at the bottom of the hammer, where it's held, and one at the end that's being swung at the enemy if you have any questions, pm me with your code and i'll work it out for you 
- aka Manslayer101
|
|
|
Re: vertex_to_vertex attaching
[Re: mpdeveloper_B]
#136442
06/24/07 00:19
06/24/07 00:19
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink

Expert
|

Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
Manslayer, i havent even touched the sword trail or the attach to vertex codes, i am having trouble with a menu code right now. when its time to implement these codes, it is difficult to use them? i just want my charcter to use the hammer as a weapon, and the trail to follow as he swings it and throws the hammer. i am really new to scripting, and i have only successfully updated old syntax, and implemented a few scripts that i got here. i am a little intimidated by the scripts.
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
Re: vertex_to_vertex attaching
[Re: Blink]
#136443
06/24/07 13:33
06/24/07 13:33
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
OP
Expert
|
OP
Expert
Joined: Feb 2006
Posts: 2,185
|
i'm not good at making trail code, but for damage i can help you, just pm me when you need that code, believe me when i say that attaching to vertexes isn't that hard at all, if they will help i have two new vertex codes, attach_to_vertex, and pan_to_vertex, when used together they can be used for v attaching things like that hammer, of course i have lots of other functions i've been writing which could be helpful too, like a new scanning code for smarter ai, but stuff like that will be released after i finish work on preva, but if you need the vertex codes i'll post them for all to use
- aka Manslayer101
|
|
|
Re: vertex_to_vertex attaching
[Re: Blink]
#136445
06/25/07 14:42
06/25/07 14:42
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
OP
Expert
|
OP
Expert
Joined: Feb 2006
Posts: 2,185
|
no, this code isn't to vertex attach, this one is used for mesh deforming, attaching a vertex to another vertex, what you need is a real vertex attach code, i'll post it for you
- aka Manslayer101
|
|
|
|