Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 7th_zorro), 923 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Collision question #271218
06/11/09 19:57
06/11/09 19:57
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Hello Everyone,

I am trying to use the sword demo style of code, from AUM12(I think laugh ) in my game.


It works as so:

When player is in his attack frames, the sword traces from the tip of the blade, to the hilt; and if result!=0 and if you!=null, you.health -= sword power.


it works, but only if im hitting near its x position; not its animated frame position.


how do i set it up so that my enemies will be able to be hit anywhere?

Hope thats descriptive enough laugh


http://i149.photobucket.com/albums/s69/sdsdinc/SWORDPROBLEMO.png


thanks for you time.

Last edited by DevoN; 06/11/09 20:06.

A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Collision question [Re: DLively] #271223
06/11/09 20:32
06/11/09 20:32
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
You need to run the instruction 'c_updatehull(me, frame);' where 'frame' is the enemy frame, and 'me' is the enemy pointer. this must run every few frames (not every frame, too slow!). eg:
Code:
while(1)
{
 c_updatehull(me, frame);
 wait(5);
}


Re: Collision question [Re: the_mehmaster] #271237
06/11/09 21:51
06/11/09 21:51
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
I looked it up in the manual, and still, i dont get how that command works...


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Collision question [Re: DLively] #271240
06/11/09 22:40
06/11/09 22:40
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I take it you are using "c_trace" when checking from blade tip to hilt?
Add USE_POLYGON to the c_trace mode flags and I think it will solve the issue.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Collision question [Re: EvilSOB] #271246
06/11/09 23:57
06/11/09 23:57
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
I've tried use_polygone, doesn't work...


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Collision question [Re: DLively] #271248
06/12/09 00:52
06/12/09 00:52
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
It seems, historically, only polygons from an ENTITY's first frame were detected when using c_trace + USE_POLYGON.

Expanding and contracting the ENTITY's bounding box quickly and properly might work. Of course, the problem might not be fully understood here.

Derived from some version of some manual.
Code:
my.frame = n;
vec_for_min(my.min_x, my);
vec_for_max(my.max_x, my);  		

..and served up for no apparent reason.

Re: Collision question [Re: testDummy] #271257
06/12/09 04:00
06/12/09 04:00
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
why is frame defined here?


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Collision question [Re: DLively] #271372
06/12/09 17:36
06/12/09 17:36
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
any other input out there??


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Collision question [Re: DLively] #271437
06/13/09 06:16
06/13/09 06:16
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
Model's bounding box may change when playing
animation. Update the bounding box with
c_setminmax each frame may help.


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