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
1 registered members (VoroneTZ), 1,234 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Collision detect ion #133538
06/03/07 16:49
06/03/07 16:49
Joined: Jun 2007
Posts: 43
Montréal
J
Julientdc Offline OP
Newbie
Julientdc  Offline OP
Newbie
J

Joined: Jun 2007
Posts: 43
Montréal
Hello,

I want to detect the colision of my entity with all others objects in my world.

I have see this:

scan_entity()

Code:
  
limite_pos.z=0.1;
limite_pos.pan=180;
limite_pos.tilt=180;
objet_cam.enable_scan = on;
peuxbouger = scan_entity(objet_cam, limite_pos);
str_for_num(valeur_affiche,peuxbouger);
texte_fonte.string=valeur_affiche;



but this return the value 0 all the time! How I can detect colision with a value?

Thank you,
Julien

Re: Collision detect ion [Re: Julientdc] #133539
06/03/07 17:25
06/03/07 17:25
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
f.e c_scan, trigger/event_trigger, trace, enable_entity/event_entity... etc
search help for those functions

Last edited by tompo; 06/03/07 17:27.

Never say never.
Re: Collision detect ion [Re: tompo] #133540
06/03/07 20:16
06/03/07 20:16
Joined: Jun 2007
Posts: 43
Montréal
J
Julientdc Offline OP
Newbie
Julientdc  Offline OP
Newbie
J

Joined: Jun 2007
Posts: 43
Montréal
Thank you for your respond

I have try c_scan
That work for entity but not for block..

peuxbouger = c_scan(objet_cam.x,objet_cam.pan,vector(120,0,40),IGNORE_ME);
and
peuxbouger = c_scan(objet_cam.x,objet_cam.pan,vector(120,0,40),SCAN_ENTS | IGNORE_ME);

IGNORE_ME Ignores the my entity; can be combined with SCAN_ENTS.
IGNORE_YOU Ignores the you entity; can be combined with SCAN_ENTS.
SCAN_ENTS Scans for entities within the cone, and triggers their EVENT_SCAN event.
SCAN_POS Scans for camera positions placed in the level.
SCAN_PATHS Scans for path start positions.
SCAN_NODES Scans for path node positions.


Can you help me yet?

Thank you,
Julien

Re: Collision detect ion [Re: Julientdc] #133541
06/03/07 20:41
06/03/07 20:41
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
True...
because C-scan can "see" thrue the walls (blocks)

use c_trace or
my.enable_block = on; with
if(event_type == event_block)

or don't use blocks but ents
Personally I don't like blocks and don't use them at all


Never say never.
Re: Collision detect ion [Re: tompo] #133542
06/03/07 23:25
06/03/07 23:25
Joined: Dec 2005
Posts: 252
MyOwnKingdom
nipx Offline
Member
nipx  Offline
Member

Joined: Dec 2005
Posts: 252
MyOwnKingdom
not sure, but arent you looking for a collision system for moving, rotating....?

then you should use c_move and c_rotate....


nipx

Re: Collision detect ion [Re: nipx] #133543
06/04/07 00:30
06/04/07 00:30
Joined: Jun 2007
Posts: 43
Montréal
J
Julientdc Offline OP
Newbie
Julientdc  Offline OP
Newbie
J

Joined: Jun 2007
Posts: 43
Montréal
Hmm Thank you but all this functions is not what I need...

I want just a function of this style:

result = Collision(object_vector,object_angle,max_vector,max_angle);

if oject vector - max_vector = -number then
result: 443435435
else
result: 0

This:
Code:
  
here 0 | object in map here : 435435 can't continue
me > . here 0 | object in map here : 432423 can't continue
here 0 | object in map here : 135652 can't continue





c_move: this detect collision but the entity is not in my control with my movement system
C_scan: Nice but only entity
c_trace: That not work good... with my movement system

Thank you,
Julien

Last edited by Julientdc; 06/04/07 00:32.
Re: Collision detect ion [Re: Julientdc] #133544
06/04/07 06:40
06/04/07 06:40
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
What kind of movement system do you have?

Re: Collision detect ion [Re: Xarthor] #133545
06/04/07 07:37
06/04/07 07:37
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
exactly... what movement system do you have, becouse this is strange
what exactly you want to do... show us some part of the script or tell us what are you planning
and result of c_scan is 0 if nothing or distance to closest you entity if any, so can't you replace blocks with entitys and problem will be solved?

BTW... it's a pity that c_scan always scans through walls, not only with some mode like ignore_blocks

Last edited by tompo; 06/04/07 07:46.
Re: Collision detect ion [Re: tompo] #133546
06/04/07 12:26
06/04/07 12:26
Joined: Jun 2007
Posts: 43
Montréal
J
Julientdc Offline OP
Newbie
Julientdc  Offline OP
Newbie
J

Joined: Jun 2007
Posts: 43
Montréal
It's just my own movement system and c_move use the physic engine then that interfer with my system...

Ok, I think I will try to use only entity bescause c_scan is perfect.


Just a question, c_scan look only the position of the entity or all the entity?

Thank you,
Julien

Last edited by Julientdc; 06/04/07 12:27.
Re: Collision detect ion [Re: Julientdc] #133547
06/04/07 12:37
06/04/07 12:37
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
c_move does not use the physik engine.
It moves the entity and uses the A6 collision detection system.
Which is better than any collision detection system you could write with c-script.

[ironic]
But why go for the simple if the complicated is available too.
[/ironic]

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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