Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> Things don't move until on-screen in GM6.1/7, Please.
United States
Zero Kirby
Posted: May 5 2007, 10:10 PM
Quote Post


Well, your local psychic is off to visit your mother!
[*][*][*][*]

Group Icon
Group: Members
Posts: 6252
Member No.: 2501
Joined: 15-August 06

Status: (0d) [--]


So, I want to make it so enemies don't move until they're on-screen (or a few feet away from the edge of view) and I was wondering how to do this. Could anyone help me?


--------------------
Falcon Punch is the result of the Sun heating fists. It drives the Blue Falcon. Heating causes destruction of water into the pain, where it then hurts, creating rain. Rain creates flowing water in tears, which can then be converted into other forms through more pain.

My Ref - Full Body Ref (minus the badass hat)

Visit Just Another Just Another Day - The Webcomic!

Super Mario Zero: Game Status (RAZZ Y U STEALING MAH FORMAT BRO)
Mario Object: Pretty much finished!
Enemy Objects: [||||||||--] Just gonna add Spinies, Bullet Bills and Cheep Cheeps!
Boss Fights: None in progress.
General Engine: [|||||||||-] Ranking System Complete! Gonna add pipes!
Levels Complete: [|---------] Haven't even finished the tutorial!
PMUsers WebsiteAOLMSN
Top
Canada
Demonlemon
Posted: May 5 2007, 10:49 PM
Quote Post


MY CHILDREN COMETH
[*][*][*][*]

Group Icon
Group: Members
Posts: 5647
Member No.: 3281
Joined: 9-February 07

Status: (0d) [--]


Put this in Mario's step event

CODE
CODE  
instance_activate_all();
instance_deactivate_region(view_xview[0],view_yview[0],view_wview[0],view_hview[0],false,true);
instance_activate_object(camera)
instance_activate_object(music)
 

This will deactivate enemies and get rid of some lagging.

code by hello


--------------------
If life gives you lemons... RUN FOR YOUR LIFE!!!
user posted image
TCOTL Reference Humanoid reference Drawings/sprites people have made me.user posted image
PMEmail PosterUsers WebsiteAOL
Top
United States
Zero Kirby
Posted: May 5 2007, 10:59 PM
Quote Post


Well, your local psychic is off to visit your mother!
[*][*][*][*]

Group Icon
Group: Members
Posts: 6252
Member No.: 2501
Joined: 15-August 06

Status: (0d) [--]


QUOTE (demonlemon @ May 5 2007, 08:49 PM)
Put this in Mario's step event

CODE
CODE  
instance_activate_all();
instance_deactivate_region(view_xview[0],view_yview[0],view_wview[0],view_hview[0],false,true);
instance_activate_object(camera)
instance_activate_object(music)
 

This will deactivate enemies and get rid of some lagging.

code by hello

That's for ultramario's engine.

Not mine.


--------------------
Falcon Punch is the result of the Sun heating fists. It drives the Blue Falcon. Heating causes destruction of water into the pain, where it then hurts, creating rain. Rain creates flowing water in tears, which can then be converted into other forms through more pain.

My Ref - Full Body Ref (minus the badass hat)

Visit Just Another Just Another Day - The Webcomic!

Super Mario Zero: Game Status (RAZZ Y U STEALING MAH FORMAT BRO)
Mario Object: Pretty much finished!
Enemy Objects: [||||||||--] Just gonna add Spinies, Bullet Bills and Cheep Cheeps!
Boss Fights: None in progress.
General Engine: [|||||||||-] Ranking System Complete! Gonna add pipes!
Levels Complete: [|---------] Haven't even finished the tutorial!
PMUsers WebsiteAOLMSN
Top
United States
Grant
Posted: May 5 2007, 11:16 PM
Quote Post


John Freeman said
[*][*][*][*][*]
[*][*][*]

Group Icon
Group: Members
Posts: 8260
Member No.: 2900
Joined: 31-October 06

Status: (0d) [--]


Check the object's x and y positions relative to view_xview and view_yview (which, as you may already know, are the x and y positions of the top left corner of the view). You can also use view_wview and view_hview (the width and height of the view, respectively) for convenience. For example, let's say that the constant "distance" refers to the distance from the edge of the view that an enemy has to be beyond in order not to move: you can check to see if the x of the object in question is less than view_xview+view_wview+distance and greater than view_xview-distance, and if the y of the object is less than view_yview+view_hview+distance and greater than view_yview-distance.

This post has been edited by Grant on May 5 2007, 11:18 PM


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

QUOTE (oh youtube trolls)
u guys r retarded hippocrates

QUOTE (Piemanthe3rd)
Pie is not random. I wish people would realize this.
PMEmail PosterUsers WebsiteAOLMSN
Top
United States
Rage
Posted: May 5 2007, 11:26 PM
Quote Post


Phillip Banks
[*][*][*][*][*]
[*][*][*][*][*]
[*][KFC]

Group Icon
Group: Members
Posts: 20961
Member No.: 13
Joined: 13-October 03

Status: (0d) [--]


QUOTE (Grant @ May 6 2007, 12:16 AM)
Check the object's x and y positions relative to view_xview and view_yview (which, as you may already know, are the x and y positions of the top left corner of the view). You can also use view_wview and view_hview (the width and height of the view, respectively) for convenience. For example, let's say that the constant "distance" refers to the distance from the edge of the view that an enemy has to be beyond in order not to move: you can check to see if the x of the object in question is less than view_xview+view_wview+distance and greater than view_xview-distance, and if the y of the object is less than view_yview+view_hview+distance and greater than view_yview-distance.

i havent the slightest clue on what the hell you just said

but im guessing it'll work cool2.gif


--------------------
PMEmail PosterUsers WebsiteAOLMSN
Top
Canada
MegaTailzChao
Posted: May 5 2007, 11:26 PM
Quote Post


So long, and thanks for all the fish.
[S][*][*][*][*]
[*][*]

Group Icon
Group: Site Staff
Posts: 15788
Member No.: 2267
Joined: 2-July 06

Status: (0d) [--]


QUOTE (Zero Kirby @ May 5 2007, 10:59 PM)
That's for ultramario's engine.

Not mine.

I love how you act like it can ONLY be used in the UM engine.

Just remove those last 2 lines of code.


--------------------
user posted image
user posted imageuser posted image
PMEmail PosterMSN
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.0511 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 0.31 ]