Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> Quick question about making a static engine...
Unspecified
Bahmo
Posted: Dec 18 2005, 05:27 AM
Quote Post


Regular


Group Icon
Group: Members
Posts: 227
Member No.: 477
Joined: 17-June 04

Status: (-4908d) [XX]


OK, I understand that to start out, I'm supposed to set detector objects on all sides of Mario, by setting their position to Mario, plus or minus a few. But is there any way to easily calculate where I should place them? They usually go too far or close!


--------------------
When I let people know I'm autistic, most of them think I said "optimistic." So I correct them and explain the difference between the two: Whereas autism is a mental disorder, optimism is a severe mental disorder.
PMEmail Poster
Top
Unspecified
Draco Icebane
Posted: Dec 18 2005, 05:43 AM
Quote Post


Standard Member
[*][*][*][*][*]


Group Icon
Group: Banned
Posts: 52997
Member No.: 10
Joined: 13-October 03

Status: (71582612m) [XX]


Treat Mario like a box.

His sprite is not a box. His collision area is. It is possible to make him several boxes for somewhat more precision but this is not recommended unless your sprites are really big
PM
Top
Unspecified
Bahmo
Posted: Dec 19 2005, 12:35 AM
Quote Post


Regular


Group Icon
Group: Members
Posts: 227
Member No.: 477
Joined: 17-June 04

Status: (-4908d) [XX]


THink you misunderstood my question, Draco. I knew that. What I need to know is this:

Assuming I am setting the location of sensor, I will create an always event that reads something like this: Set X Position of (SENSOR) to X(MARIO) + n.

My problem is guessing what n is. My sensor either moves too far from Mario, or too close. I can build a box around him by hand, but to keep it in place I need to use an event with an equation. Is there any way to solve for n?


--------------------
When I let people know I'm autistic, most of them think I said "optimistic." So I correct them and explain the difference between the two: Whereas autism is a mental disorder, optimism is a severe mental disorder.
PMEmail Poster
Top
United States
Nicholas Ainsworth
Posted: Dec 19 2005, 10:52 AM
Quote Post


cue fanfare
[M][S][*][*][*]
[*][*][KFC]

Group Icon
Group: Global Moderators
Posts: 25399
Member No.: 621
Joined: 27-September 04

Status: (0d) [--]


Make a separate collision mask that's the exact size of Mario's tallest and widest frame of animation (in all his animations), use that as a reference, and move from there.


--------------------
user posted image

Currently seeking talented and dedicated Python users for assistance with an important project. PM me for details.
PMEmail PosterUsers WebsiteAOL
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0324 ]   [ 13 queries used ]   [ GZIP Enabled ]   [ Server Load: 1.17 ]