이 예제는 http://cafe.naver.com/guyfan/7541 여기의 자료를 기반으로 제작되었습니다.
1.오브젝트 world, Create 이벤트에

global.thisroomissoftview=0

를 추가한다

2.오브젝트 SoftViewer를 만든다
3.오브젝트 SoftViewer, Step 이벤트에

if global.thisroomissoftview=0{
instance_destroy();}
if instance_exists(player) {
hspeed = (player.x-x) /40;
vspeed = (player.y-y) /15;
}
else{speed=0;}

를 넣는다

4.오브젝트 camera, Step 이벤트에

if(instance_exists(player) == true){
if(instance_exists(SoftViewer) == false){
  view_xview = floor(player.x/view_wview)*view_wview;
  view_yview = floor(player.y/view_hview)*view_hview;}
}

를 넣는다

5.적용시키려면

적용시키고 싶은 룸을 더블클릭하여
Creation code를 클릭한다음

global.thisroomissoftview=1

을 넣는다

 

예제파일 (IWBTE Miniwa Edition 기반)

'기타 > 겜메 뻘팁' 카테고리의 다른 글

ini 사용시 팁  (0) 2016.11.25
시간표시 팁  (0) 2016.03.01
배경 무한루프 예제  (0) 2015.10.07
자연스러운 촉수 예제  (0) 2015.07.05
레이저 코드  (0) 2015.03.25
by SHOOTING_STAR 2015. 5. 9. 20:47