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 2 of 3 1 2 3
Re: vertex_to_vertex attaching [Re: tompo] #136436
06/22/07 16:24
06/22/07 16:24
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
see, the trail is a model, and so is the hammer and player. wont that be a problem?

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 Offline OP
Expert
mpdeveloper_B  Offline 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] #136438
06/22/07 17:22
06/22/07 17:22
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
trail with model? why not particle effect? with descent alpha and size in time? creating at the top of the hammer?


Never say never.
Re: vertex_to_vertex attaching [Re: tompo] #136439
06/22/07 18:59
06/22/07 18:59
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B Offline OP
Expert
mpdeveloper_B  Offline OP
Expert

Joined: Feb 2006
Posts: 2,185
because models are faster and blend better


- 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 Offline

Expert
Blink  Offline

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 Offline OP
Expert
mpdeveloper_B  Offline 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 Offline

Expert
Blink  Offline

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 Offline OP
Expert
mpdeveloper_B  Offline 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: mpdeveloper_B] #136444
06/24/07 17:58
06/24/07 17:58
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
i have the trail code already. its the one from the au resources. i just dont understand how to use the vertex attach. i am using plBiped01 script for my player and i want to use the hammer as a weapon. it will have the trail action, but i wasnt sure if i can use the function to vertex attach the hammer to my hand while the hammer uses the trail code. is that possible? my other question is, one of my attack animations is a hammer throw and return. i did the animations with the hammer to be thrown and returning to the hand of my character. will i have to eliminate that animation now? i did the thing that was done with the cbabe and hero mdl. the weapons that they use when you merge them automatically move with the models because they are animated with matching frames. so i thought it would be cool to do that so i wouldnt have to do vertex attach. but i didnt know how i was going to add the weapon without making it a weapon pick up with the templates, and i cant use the weapon pick up code and the sword trail code at the same time, so i chose the sword trail code, and now i want to use the vertex attach. is this too much?

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 Offline OP
Expert
mpdeveloper_B  Offline 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
Page 2 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