Moving the view to other coordinates (case solved)

You must understand the Game Editor concepts, before post here.

Moving the view to other coordinates (case solved)

Postby Diana Kennedy » Fri Jun 02, 2006 5:39 am

I used this code on mouse button down:

Code: Select all
view. x = -2450;
view.y = 1204;


This sort of code worked well in antother game I made, but not in this one. The view jumps indeed, but t a totally different location. I don't know even where exactly, it's just black space. I checked and double checked : -the coordinates are right. Is there any possible explanation why this happens? Is threre an other, maybe more reliavle way to move the view?

Ok - ok forget it! Case solved! I made mistake in coordinates. Need some sleep! :oops: :oops:
User avatar
Diana Kennedy
 
Posts: 257
Joined: Wed Dec 07, 2005 12:34 am
Location: France, where Presidents who got shot in Texas do exile ;-)
Score: 0 Give a positive score

Postby Kodo » Fri Jun 02, 2006 8:55 am

I found using coordinates to move the view around extremely frustrating, instead (as I think many other do) I simply use a filled region to mark the position then make the view go to that instead:

view.x = target_region_1.x;
view.y = target_region_1.y;

Using this method you never need to worry about actual numbers and you can just pull the target region around wherever and whenever you like, this makes it easier to change things around if you want to.
User avatar
Kodo
 
Posts: 449
Joined: Thu Oct 20, 2005 8:20 pm
Location: UK
Score: 23 Give a positive score

Postby Diana Kennedy » Fri Jun 02, 2006 9:05 am

good trick, Steve! Will try this out! Yeah, with those number-coordinates, its so frustrating. A little tiny error and the mess is perfect :)
User avatar
Diana Kennedy
 
Posts: 257
Joined: Wed Dec 07, 2005 12:34 am
Location: France, where Presidents who got shot in Texas do exile ;-)
Score: 0 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest