This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Pages:

**1**1

**Programming Help / check on what boundary is hit when colliding with the room edges**

« **on:**September 08, 2013, 02:03:52 PM »

Hi,

First of all: I'm really new on Enigma. Just discovered the tool last weekend so forgive me for asking questions that are probably asked before. However, I checked the documentation and the forum posts but did not really found the answer.

I'm playing around with Enigma, trying to make a simple ball-game. You probably know, bal+plate, some bricks to hit and when hitting the walls, the velocity of the ball is inverted. No big deal.

In this game, the room has 3 edges where the velocity inverts (left, right, top) and one that edge that is game over (bottom). So in the collision event I wanted to inspect what edge of the room the ball is colliding with. That turned out to be more difficult than I expected.

After playing around a bit a came upon the section explaining the file: events.res. So I thought if events can be defined, why not just define them. I found the entry "intersect boundary"

So I made a copy like this (just showing the left intersection here):

Nice and easy, I thought. However, to my surprise the event never showed in the Enigma IDE.

I guess I'm missing something fundamental. Can anyone explain what part I'm missing here?

Regards,

Ruud

First of all: I'm really new on Enigma. Just discovered the tool last weekend so forgive me for asking questions that are probably asked before. However, I checked the documentation and the forum posts but did not really found the answer.

I'm playing around with Enigma, trying to make a simple ball-game. You probably know, bal+plate, some bricks to hit and when hitting the walls, the velocity of the ball is inverted. No big deal.

In this game, the room has 3 edges where the velocity inverts (left, right, top) and one that edge that is game over (bottom). So in the collision event I wanted to inspect what edge of the room the ball is colliding with. That turned out to be more difficult than I expected.

After playing around a bit a came upon the section explaining the file: events.res. So I thought if events can be defined, why not just define them. I found the entry "intersect boundary"

Code: [Select]

`boundary: 7`

Name: Intersect Boundary

Mode: Special

Case: 1

Sub Check: (bbox_left < 0) or (bbox_right > room_width) or (bbox_top < 0) or (bbox_bottom > room_height)

So I made a copy like this (just showing the left intersection here):

Code: [Select]

`boundaryleft: 7`

Name: Intersect Left Boundary

Mode: Special

Case: 1

Sub Check: (bbox_left < 0)

Nice and easy, I thought. However, to my surprise the event never showed in the Enigma IDE.

I guess I'm missing something fundamental. Can anyone explain what part I'm missing here?

Regards,

Ruud

Pages:

**1**