View Scrolls to new player position GM8pro

G

greenoozie

Guest
OK, I have a guy on the map that gets captured and then has to appear some where else on the Map.

I move the Player Position to x,y but then the view 0 starts roaming the Room (the Map Below), towards the new position. I would like it to be instantaneous. So how would be the best way to do this?
 

Simon Gust

Member
In the room editor there is a view tab where it says something like "view speed". If you set that to -1, it should be instant.
 
G

greenoozie

Guest
Seriously Simon? lol Ok :D I'll try that right out :D

Nope, didn't work.

I think I just have to "teleport" the view to the location as well, instead of it following the Player Position. But I don't know how to move the view at all. Is there a code that would help or at least a direction I should be looking at in the Help part?
 
Last edited by a moderator:

TheouAegis

Member
view_hspeed = -1;
view_vspeed = -1;

That is literally all it takes to make a view move instantly. If it doesn't, then you have code elsewhere overriding it.
 
G

greenoozie

Guest
Thank you very much :D I must have something over riding it, but I figured it out, and it works perfectly. I moved the view_xview[0] to manbody.x - 320, and the view_yview[0] - 240 to manbody.y directly after I assigned the new place for the manbody x,y ... Instant View at the new location :D This Makes stuff so much easier when teleporting. Makes it so I can have Rooms off screen somewhere in the distance, so I don't lose all my non global stats every time I enter a new room. :D
 
Top