Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Sword or Fist Fighting Code? #421556
04/20/13 05:52
04/20/13 05:52
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
I really need practical advice on how to make a player character be able to hit, damage, and eventually kill a foe character, and vice versa, using either a sword or a fist.

I created a player character that I can move around in a 3D environment. I created it so that if I press the space bar, he will punch forward with his fist.

I have it set up where if the player character gets within a certain distance of a foe, the foe will turn toward the player character, and try swinging a sword or swiping with its arm like a punch toward the player character, depending on who the foe is.

I figured out how to make a wizard that shoots energy balls toward the player character, damages him, and kills him. But I cannot get a sword or fist to do the same.

Does anyone have some sword-fighting or fist-fighting code they can share that is tested and works, and accomplishes this?

Last edited by Ruben; 04/20/13 05:53.
Re: Sword or Fist Fighting Code? [Re: Ruben] #421833
04/25/13 22:15
04/25/13 22:15
Joined: Jul 2008
Posts: 2,101
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,101
Germany


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: Sword or Fist Fighting Code? [Re: rayp] #422568
05/12/13 23:13
05/12/13 23:13
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
Thank you rayp. This really helped me. I appreciate it. :-)

Re: Sword or Fist Fighting Code? [Re: Ruben] #422575
05/13/13 07:20
05/13/13 07:20
Joined: Jul 2008
Posts: 2,101
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,101
Germany
Your welcome ^^


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;

Moderated by  HeelX, rvL_eXile 

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