Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Ayumi), 1,170 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to debug collision detection? #9589
06/27/02 00:51
06/27/02 00:51
Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
W
WildCat Offline OP
Expert
WildCat  Offline OP
Expert
W

Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
Hi gang.

I'm having trouble with collision detection.

When I set move mode to "Ignore_you" and fire a bullet, the bullet explodes inside my ship.

It's like it is ignoring the ignore. Can anyone offer some suggestions on how to debug this?

I'm stumpped. I made a real simple level for testing and the ignore works fine.

I put the same code that works in the simple level into my game, and the bullets still explode inside the model.

Maybe there is some parameter on the parent that is set that is messing this up, but I can't find it...

- WildCat


Visit us at [url=http://www.vertexgames.com]Vertex Games[/url]!
Re: How to debug collision detection? #9590
06/27/02 03:33
06/27/02 03:33
Joined: Jul 2000
Posts: 8,973
Bay Area
Doug Offline
Senior Expert
Doug  Offline
Senior Expert

Joined: Jul 2000
Posts: 8,973
Bay Area
Just a guess, but set your warn_level = 2 and see if you get a "dangerous instruction in event" message.


Conitec's Free Resources:
User Magazine || Docs and Tutorials || WIKI
Re: How to debug collision detection? #9591
06/27/02 05:34
06/27/02 05:34
Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
W
WildCat Offline OP
Expert
WildCat  Offline OP
Expert
W

Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
I'll give it a shot Doug, but I doubt it. Currenly my event says:

Beep;
Remove me;

(!)

Still, I'll do as you suggest and see if that tells me anything meaningful.

Thanks Doug.

- WildCat


Visit us at [url=http://www.vertexgames.com]Vertex Games[/url]!
Re: How to debug collision detection? #9592
06/27/02 10:55
06/27/02 10:55
Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
W
WildCat Offline OP
Expert
WildCat  Offline OP
Expert
W

Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
I should know better than to question the Master...

Ok, Doug. You got me. I had a dangerous event alright.

Here's the offending code, which is offensive in one script, and works fine in another. (Go figure!)

code:
function bullet_event()
{
beep;
remove me;
}

var bulletspeed[3] = 20,0,0;


ACTION fire_bullet
{
my.event = bullet_event;
my.enable_entity = on;

while (1)
{
vec_set(temp,bulletspeed);
vec_scale(temp,time); // temp = time corrected bulletspeed
move_mode = ignore_you;
ent_move(temp,nullvector);
wait(1);
}
}
//*****************************************


FUNCTION FIRE_GUN()
{
IF(MY.SHOT_TIMER > 0){RETURN;}
IF(PLAYER_SHIP1 == ME) //PLAYER1 = RED
{ENT_CREATE(RED_SHOT_STR,MY.POS,FIRE_BULLET);}

I've since added a wait(1) as the first line of the bullet event, which makes it "undangerous", but the bullet still explodes immediately while inside my ship.

Any thoughts?

- WildCat


Visit us at [url=http://www.vertexgames.com]Vertex Games[/url]!
Re: How to debug collision detection? #9593
06/28/02 03:34
06/28/02 03:34
Joined: Jul 2000
Posts: 8,973
Bay Area
Doug Offline
Senior Expert
Doug  Offline
Senior Expert

Joined: Jul 2000
Posts: 8,973
Bay Area
Are you sure it's colliding with the ship? Do you have any other object in that area (i.e. muzzle flash)?


Conitec's Free Resources:
User Magazine || Docs and Tutorials || WIKI
Re: How to debug collision detection? #9594
06/28/02 04:28
06/28/02 04:28
Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
W
WildCat Offline OP
Expert
WildCat  Offline OP
Expert
W

Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
Hmmm...

You got me thinking...
all of my action takes place inside a large hollow, passable sphere. Maybe I'm actually colliding with that.

I know once upon a time, passable objects had no collision detection, but that was before ENT_MOVE...

I'm not at a computer where I can try this, but is the command that I am looking for more like this:

MOVE_MODE = IGNORE_YOU + IGNORE_PASSENTS;
ENT_MOVE(TEMP,NULLVECTOR);

Thats something I've not tried before!

- Cautiously Optimistic WildCat


Visit us at [url=http://www.vertexgames.com]Vertex Games[/url]!
Re: How to debug collision detection? #9595
06/28/02 07:10
06/28/02 07:10
Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
W
WildCat Offline OP
Expert
WildCat  Offline OP
Expert
W

Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
That did it, Doug!

Thanks for your Gentle guidence.

- Wildcat


Visit us at [url=http://www.vertexgames.com]Vertex Games[/url]!

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