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
0 registered members (), 938 guests, and 4 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
Fist-Fighting?? #6509
08/08/01 14:51
08/08/01 14:51

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Hey All,
Numerous times I have seen reference to melee and close combat with A4. I understand A5 has bonuses with this as it has ent-vertex etc...

I have been trying to create a simple code that runs my characters "attack" animation frames, and takes into account collisons he has with other entities.
When he hits another entity it obviously takes damage. The same principle can be used against him.

Unfortunately I can't work out how to do this, I have examined the magazines, this forum, and code I have that does something similar (eg. Venture.wdl), but can find no simple way to do this.

Has anyone coded this and can give me ANY help, I would be most grateful..

Take it easy guys
-Static


Re: Fist-Fighting?? #6510
08/08/01 16:33
08/08/01 16:33
Joined: May 2001
Posts: 1,261
Outarville, France
al1 Offline
Expert
al1  Offline
Expert

Joined: May 2001
Posts: 1,261
Outarville, France
There is effectively a worshop of fight the translation of which ends at Conitec. A little of patience, it should be downloadable very quickly



Re: Fist-Fighting?? #6511
08/08/01 17:05
08/08/01 17:05
Joined: Sep 2000
Posts: 1,148
Eagle Offline
Serious User
Eagle  Offline
Serious User

Joined: Sep 2000
Posts: 1,148
WOW! This is great!!!


in the end its all about the game
Re: Fist-Fighting?? #6512
08/08/01 18:38
08/08/01 18:38
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline
Expert
Keith B [Ambit]  Offline
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Static707, it's a little complicated but not too hard once you're familiar with WDL. I've scripted a 3D fighting game (you can see a small demo video of it here: http://vulcan.spaceports.com/~lethargy/video.html ). I did it like this: you set a flag during fight animations so that if you release a button or press something else the animation will still play. I used the scan function for the collision detection, as using ent_vertex isn't very practical, though it might be with the new commands that will be featured in the next update.
Cheers,
Keith

Re: Fist-Fighting?? #6513
08/08/01 20:36
08/08/01 20:36

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Hey Ambit,
Actually YEAH i have seen the video before, and was VERY impressed. So it goes without saying that I took your advie as gospel, and set out to try and create a scanning function to detect players and have them loss health when infront on my player.

That way all I had to do was attach a key and animation to it.. and bingo my character is fighting.
Didn't work.. had problems with the scanning
Easier if I show the code..
/////////////////////////////////////////////////////////////////


ACTION fist_damage_scan { // to scan when in combat, see if you hit anybody
MY_POS.X = PLAYER.X;
MY_POS.Y = PLAYER.Y;
MY_POS.Z = PLAYER.Z;
MY_ANGLE.PAN = CAMERA.PAN;
MY_ANGLE.TILT = CAMERA.TILT;
scan_sector.PAN = 120;
scan_sector.TILT = 120;
scan_sector.Z = 5;
SCAN MY_POS,MY_ANGLE,scan_sector;
}

ACTION fist_attack
{ // This action allows players to hit people.. pretty easy. NOT

MY.fist_damage_scan = 0; // They arn't getting hit to begin with
while(MY._HEALTH > 0) // can't fight if dead - dems da rules
{
if(fist_damage_scan == _DETECTED)
{ // Hit received?
MY._HEALTH -= 5; // this WILL be a fist_damage variable
fist_damage_scan = 0; // reset the _signal skill
}
WAIT (1);
}
}

/////////////////////////////////////////////////////////////////

It doesn't suprise me, but the problem is with the "fist_damage_scan = 0" It didn't mind the detect.. but I couldn't set it so that it reset.
of cause the "fist_attack()" is in my players main action.

Not sure how to fix this problem. BTW If I am completely off the track with what Ambit was suggesting I will not be offended.

Thanks
Static707


Re: Fist-Fighting?? #6514
08/09/01 07:12
08/09/01 07:12
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline
Expert
Keith B [Ambit]  Offline
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Hi Static707, sorry I can't be of a great deal of help at the moment as I'm off to Cornwall for week tomorrow to see the inlaws... Basically, the way I did it was by using scan_entity, which allows you to set a cone of collision. You have to be careful with it though, because you have to enable_scan on all entities that can be hit and this can cause problems if you haven't kept track of everything... I'll be back to my computer sometime next week, so If you're still stuck then, give me a shout here or via the private message thing on this forum and I'll try to give you some better pointers.

Cheers,
Keith



Moderated by  HeelX, Spirit 

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