Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Hanky27, AndrewAMD), 1,266 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
collision array? #105719
01/07/07 08:38
01/07/07 08:38
Joined: Mar 2005
Posts: 123
O
oronll Offline OP
Member
oronll  Offline OP
Member
O

Joined: Mar 2005
Posts: 123
Is there a way to make the collision detection follow a array instead the set modes?

or maybe not even an array . just a variable will do .

Re: collision array? [Re: oronll] #105720
01/07/07 09:49
01/07/07 09:49
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I dont know what you exactly mean when you talk about arrays 2D collision detection comes into my mind and when you talk about variables I think about something like

var colisionMode;
collisionMode = IGNORE_ME + IGNORE_MODELS + GLIDE;

if its the second option, just do it like that. Combine all collision modes in one variable and use 'collisionMode' in your c_move or c_trace instruction as you like.

Re: collision array? [Re: HeelX] #105721
01/07/07 10:24
01/07/07 10:24
Joined: Mar 2005
Posts: 123
O
oronll Offline OP
Member
oronll  Offline OP
Member
O

Joined: Mar 2005
Posts: 123
I meant more like .. If i could tag all these entities here my.skill2 = 2; .. and all these entities over here my.skill2 = 3;

and then somehow tell the entity you have c_move on to ignore all entities with skill2 = 2;

Last edited by oronll; 01/07/07 11:01.
Re: collision array? [Re: oronll] #105722
01/07/07 12:58
01/07/07 12:58
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
So that entities tagged with 2 overrun the entities tagged with 3? Easy! Just have a look of the meaning of "push" for the c_move instruction. By this you can define different push values for "groups" in an array and you link entities via a skill to the appropriate array field, e.g.

my.skill2 = 10; //group10

var pushArray[100]; //for hundred groups

pushArray[10]=2; //group 10 has now the push value 2

in the entity's while loop:

my.push = pushArray[my.skill2]; //update push value

and you use then in c_move IGNORE_PUSH to overrun all entities with a lower push value. So, if you assign one group the push value 1 or -10 or such group10-entities will overrun these.

Last edited by HeelX; 01/07/07 12:59.
Re: collision array? [Re: HeelX] #105723
01/07/07 20:07
01/07/07 20:07
Joined: Mar 2005
Posts: 123
O
oronll Offline OP
Member
oronll  Offline OP
Member
O

Joined: Mar 2005
Posts: 123
I have tried that but there is one major flaw .. if they both have to use collision detection PUSH will not work since one is always higher than the other .

They should have made entities with equal push NOT collide .


anyway push doesn't work for this case .

Re: collision array? [Re: oronll] #105724
01/07/07 21:07
01/07/07 21:07
Joined: Mar 2005
Posts: 123
O
oronll Offline OP
Member
oronll  Offline OP
Member
O

Joined: Mar 2005
Posts: 123
Here is exactly what I need ..

I need a way for everything to be passable but still trigger a hit detection .. that would solve my problem .

Re: collision array? [Re: oronll] #105725
01/07/07 22:18
01/07/07 22:18
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
you can use enable_entity then the push must be lower...

Re: collision array? [Re: Scorpion] #105726
01/07/07 23:56
01/07/07 23:56
Joined: Mar 2005
Posts: 123
O
oronll Offline OP
Member
oronll  Offline OP
Member
O

Joined: Mar 2005
Posts: 123
i am telling you push does not work the same way ...

ok lets put it this way ..

You have entity A and entity B ..

Entity A has

my.push = 10 ;

my.enable entity = on;

VAR SP[3] 12,0,0;

c_move (my,nullvector,sh, IGNORE_PUSH );



Entity A has

my.push = 5 ;

my.enable entity = on;

VAR SP[3] 12,0,0;

c_move (my,nullvector,sh, IGNORE_PUSH );




these 2 entities will never pass through each other because both are using thier own collision . but both have to .

Last edited by oronll; 01/07/07 23:56.

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