View Actor Problems Pleas Read! (reacently modified)

Game Editor comments and discussion.

View Actor Problems Pleas Read! (reacently modified)

Postby Turon » Sun Sep 23, 2012 6:24 pm

How do you make the view follow the actor in both x and y axis's. I have been using methods of making the view follow the actor but I cant making the view follow the player on the Y axis at the same time as it follows on the X axis.
Do Youknow how to make the view follow the player on the x and y axis without using follow actor?
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: View Actor Problems Pleas Read! (reacently modified)

Postby Soullem » Thu Sep 27, 2012 11:28 pm

There are many ways to do this, the simplest being to parent the actor to the view. This will lock the player in the center of the screen(or wherever he is relative to the view.)

If you want the view to follow the player with some wiggle room you will need some coding.
There are other ways to do this, but I will do a simple way.

1.) Create 4 wire frame actors named moveview up down left and right, and parent them to the player.
2) To make this really simple you can set up a collision event for each one, and for each one write the code to move the screen.
Code: Select all
//for the right
view.x+=10;

//for the left
view.x-=10;

// for up
view.y-=10;

// and down
view.y+=10;



You must position the frames to be a square with open corners like this


Hope this helps
Attachments
help.png
Current Project:
The Project That needs to be Done -- Pokemon http://game-editor.com/forum/viewtopic.php?f=4&t=12591

Temporarily Abandoned:
Souls of Gustara -- Awesome upgrade blimp game 42%ish
Eggventures of Eggman -- Adventure Game 20%ish
User avatar
Soullem
 
Posts: 105
Joined: Thu Aug 02, 2012 3:12 pm
Score: 5 Give a positive score

Re: View Actor Problems Pleas Read! (reacently modified)

Postby Turon » Sun Sep 30, 2012 9:17 am

Hey thanks a lot! I saw wireframe actors in the Caveman demo that came with Game Editor but I could not understand their use.
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: View Actor Problems Pleas Read! (reacently modified)

Postby Soullem » Wed Oct 03, 2012 11:49 pm

thanks... Hope this method works for you.

Glad I could be of service
Current Project:
The Project That needs to be Done -- Pokemon http://game-editor.com/forum/viewtopic.php?f=4&t=12591

Temporarily Abandoned:
Souls of Gustara -- Awesome upgrade blimp game 42%ish
Eggventures of Eggman -- Adventure Game 20%ish
User avatar
Soullem
 
Posts: 105
Joined: Thu Aug 02, 2012 3:12 pm
Score: 5 Give a positive score

Re: View Actor Problems Pleas Read! (reacently modified)

Postby arcreamer » Mon Jan 07, 2013 6:13 pm

How would this work if the wireframe regions are parented to the player? Then they would stay the same distance away from the player at all times, and make it impossible for the player to collide into them. I'm trying to do this as well, but thats whats happening
arcreamer
 
Posts: 398
Joined: Tue Jul 03, 2007 4:08 pm
Score: 9 Give a positive score

Re: View Actor Problems Pleas Read! (reacently modified)

Postby skydereign » Mon Jan 07, 2013 6:29 pm

The reason you use the wireframes is so you don't need to parent the view to the player. These are two different methods for view control, you can't combine the two. So if you want to use wireframes instead, you should unparent the view from the player.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest