|
1 registered members (AndrewAMD),
3,639
guests, and 8
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Polygon Collision doesnt function! A7
#242655
12/24/08 22:41
12/24/08 22:41
|
Joined: Oct 2008
Posts: 112
Ness
OP
Member
|
OP
Member
Joined: Oct 2008
Posts: 112
|
Hello i got the demo of gamestudio A7!( 3dgamestudio.com THE 30 DAY DEMO) And i have two normal models!( in the middle of the origin placed of course) You can see them in the image! I have set both to them: my.event = touch; Then in the touch function: if i am touched then kill me! Ok but look at the picture! There where i am i get the collision! BUT i set both to polygon! Yes you heard it! I have set both to polygon AND i compiled of course! Why dont i get killed if i TOUCH THEM REALLY? Hope that its not one of the bugs... ^^ Thats frickin annoying that lot of buttons there bounding box or metal doesnt function! o_0? Greetings Ness! PS: Reinstalling and other things does not function! I tested it on 5 Computers and 4 Laptops! 7 XP and 2 Vista  
Last edited by Ness; 12/24/08 22:44.
|
|
|
Re: Polygon Collision doesnt function! A7
[Re: Ness]
#242657
12/24/08 22:58
12/24/08 22:58
|
Joined: Aug 2005
Posts: 512 Bayern
Schmerzmittel
User
|
User
Joined: Aug 2005
Posts: 512
Bayern
|
Hi there, can you show the code, that you use? Without its hard to say, whats wrong. But an idea: You could youse something like that:
//////////////////
//some code
//////////////////
...{
put here your code
...
if(you.skill == 1234)
my.health = 0;
...
}
This is only an idea. The code doesnt work :o). Set in your enemy declaration my.skill = 1234. (for example) Then you can find out, if a collision has occured, the skill from the enemy; with you.skill == 1234. I hope you know what i mean, because my english isnt good. Greetings Schmerzmittel
A7 Com V7.80
|
|
|
Re: Polygon Collision doesnt function! A7
[Re: Schmerzmittel]
#242659
12/24/08 23:22
12/24/08 23:22
|
Joined: Oct 2008
Posts: 112
Ness
OP
Member
|
OP
Member
Joined: Oct 2008
Posts: 112
|
I know this 12345 my.skill thing but i cant figure out what it does! I have nothing like that:
entity* enemy;
action thatsshitplayer { player = me; my.enable_entity = on; my.event = polygonfake; }
action thatsshitenemy { enemy = me; my.enable_entity = on; my.event = polygonfake; }
function polygonfake() { player.heart = 0; enemy.heart = 0;
Last edited by Ness; 12/24/08 23:23.
|
|
|
Re: Polygon Collision doesnt function! A7
[Re: Ness]
#242681
12/25/08 04:54
12/25/08 04:54
|
Joined: Aug 2000
Posts: 1,141 Baunatal, Germany
Tobias

Moderator
|

Moderator
Joined: Aug 2000
Posts: 1,141
Baunatal, Germany
|
The event seems to be set up ok, but the actions are missing a () and there are no move functions in them. So this code cant work and I dont think that this compiles at all. Also, you must not set a POLYGON flag on a moving entity, it can become entangled, please read the manual about that.
Read the lite C tutorial workshop 18 about how to move entities.
I've put this in the beginners forum because I think there you'll get help to learn moving and collision. But, if you think there is a bug in your code and want help, you need to tell more about your problem, we can not see why your code doesnt function when you don't post it.
|
|
|
Re: Polygon Collision doesnt function! A7
[Re: Tobias]
#242777
12/25/08 17:02
12/25/08 17:02
|
Joined: Oct 2008
Posts: 112
Ness
OP
Member
|
OP
Member
Joined: Oct 2008
Posts: 112
|
Please please http://rafb.net/p/TsJZ1f35.htmlLook at thIS code! You will see a short code! Its very simple and I can understand it too ^^ So there are two things there,which i can not solve! Problem 1: The typical Polygon collision problem! Look at it! And here is something:   WOW? I used in the script the polygon thingy! But i get the collision without to TOUCH THEM REALLY! And here are both models in the mdl if none want to believe me,that i modeled it correct:  !!!! There are not on ONE DATA SAVED! I only paste them in paint!
|
|
|
Re: Polygon Collision doesnt function! A7
[Re: Tobias]
#242785
12/25/08 17:27
12/25/08 17:27
|
Joined: Oct 2008
Posts: 112
Ness
OP
Member
|
OP
Member
Joined: Oct 2008
Posts: 112
|
Hm.. you didnt read the first lines? ^^ I use C-SCRIPT! and not LITE-C!! I dont know if you used A5 or A6! But i use C-Script! Look at Wiki! Its not wrong its an other comment! But i know why it does not functions with ent_move! Thats very bad.. >:( What else i switched it to """"c_move""""! Ok its good but i READ it and its NOT a bug and i want to ask how to fix this:   I sliced almost my enemy and i get the collision!? And no sory but bounding box is bad too because i get then same result as my previous post  PS: Where is this holy Lite-C wORkshop? In AUM? i am confused XD
Last edited by Ness; 12/25/08 17:31.
|
|
|
Re: Polygon Collision doesnt function! A7
[Re: Ness]
#242786
12/25/08 17:33
12/25/08 17:33
|
Joined: Aug 2000
Posts: 1,141 Baunatal, Germany
Tobias

Moderator
|

Moderator
Joined: Aug 2000
Posts: 1,141
Baunatal, Germany
|
It does not matter at all whether you use C-Script or lite-C, wrong is wrong in all languages.
You get collision when the bounding boxes touch. You can make the bounding boxes bigger with the command:
c_setminmax(me); // sets them to the real entity size
or
vec_set(my.min_x,vector(-50,-50,-50)); vec_set(my.max_x,vector(50,50,50));
sets them to -50..+50.
The tutorial is on the download page right below the trial version that you downloaded, with the big letters TUTORIAL.
|
|
|
Re: Polygon Collision doesnt function! A7
[Re: Ness]
#242789
12/25/08 17:50
12/25/08 17:50
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
this works pretty well for me:
function main()
{
load_level("asd.wmb"); // LOADING THE FILE
clip_size = 0; // show all the triangles for all the models
clip_particles = 1;
fps_max = 80; // FPS THINGY
fps_min = 80;
on_d == null;
}
ENTITY* ENEMY; // DEFINE^!!!!
var heart = 100; // PLAYERS HEALTH;
var PLAYER_SPEED[3]; // This weird Vector used to walk;
function DEAD(); // YOU SEE I ADD THIS
function DEAD2(); // I AM NOT STUPID! I DEFINED THIS TO OBUT FORGOT TO SAY!
PANEL SHIT
{
pos_x = 0; // UPPER LEFT;
pos_Y = 50;
flags = refresh,overlay,d3d; // NOT VISIBLE!!!
digits(0,0,"%s",*,1,"HAHA");
}
action player12345() // THE PLAYER's ACTION!
{
player = me; // I AM THE FOOLISH PLAYER;
my.ENABLE_ENTITY = on; // I THINK THIS MUST BE CLEAR
my.POLYGON = on; // OK I SET POLYGON ON ONLY IN SCRIPT!!!!
my.event = DEAD; // His shit Event :)
while(heart >= 0)
{
PLAYER_SPEED.x =15 * (key_w - key_s) * time;// THIS MUST BE CLEAR TOO I THINK
PLAYER_SPEED.y =15 * (key_a - key_d) * time;// AS I LEARNED IT FROM THE TUTORIALS WITHOUT += or -=!
camera.x +=15 * (key_w - key_s) * time; // FOR THE CAMERA TOO!!!!
camera.y +=15 * (key_a - key_d) * time;
c_move(me,PLAYER_SPEED,NULLVECTOR,IGNORE_PASSABLE | GLIDE); // THE MAIN THINGY TO WALK! CLEAR TOO!
wait(1); // NO ENDLESS LOOP
}
}
action ENEMYHATER // ENEMY's ACTION
{
ENEMY = me;
my.ENABLE_IMPAC = on;
my.event = DEAD2;
my.POLYGON = ON; ///////////
}
function DEAD()
{
SHIT.visible = on;
}
function DEAD2()
{
ent_remove(me); // I THINK THIS SHOULD BE CLEAR TOO!!!
// IMAO A BUG!!! HELP! IF I TOUCH THE ENEMY, THEN HE DONT VANISHES! WHY?
}and about the enemy part: READ THE MANUAL: If two entities collide, each one's event function can be triggered, the moving entities' one with EVENT_ENTITY, the hit entities' one with either EVENT_IMPACT or EVENT_PUSH. If both entities were moving, each one can get two different events in undefined order.
means, only moveing entities EVENT_ENTITY gets triggered, other one(enemy in this case) needs either EVENT_PUSH or EVENT_IMPACT. next time BEFORE blaming engine, READ MANUAL, ASK in forum if it's your faulty code or bug.
Last edited by Quadraxas; 12/25/08 17:53.
3333333333
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|