게임메이커 강좌

 이 스크립트는 execute_string를 대체하기 위한 임시로 만든 스크립트입니다.

주로 사용하는 용도는 콘솔, 치트에 사용합니다!

 

주의:

-스크립트만 불를 수 있습니다.

-두개의 스크립트를 불를 수 없습니다.

-만약 존재하지 않는 스크립트를 썼다면, 에러가 뜹니다, 그리고 -1을 리턴합니다.

 

그리고 굳이 해석하실 필요는 없습니다! ㅠ

 

ex)----------------------------------------------------------------->

스크립트 scr_ad(argument0)

[ return argument0; ]

 

show_message(execute_script_string("scr_ad(5)"))

-> 5를 출력합니다!

 

다만 execute_script_string("scr_ad(scr_agsdf(5))"))

같이 한번에 2번 호출이 불가능합니다.

---------------------------------------------------------------------->

execute_script_string(string)

 

var i,a,b,c,count,d=0;

a=string(argument0)
if !string_count("()",a)>=1{
a=string_replace_all(a,"()}else{d=1;a=string_delete(a,string_pos("(",a),string_pos("(",a'>","@")}else{d=1;a=string_delete(a,string_pos("(",a),string_pos("(",a))
a=string_insert("@",a,string_length(a)+1)
}
a=string_replace_all(a,",","@")
a=string_delete(a,string_pos(")",a),string_pos(")",a))
a=string_delete(a,string_pos(";",a),string_pos(";",a))
count=string_count("@",a)-d
b=""
if count==0{
b[0]=string_copy(a,1,string_length(a)) b[0]=asset_get_index(b[0])}else{for (i=0;i<(count+1);i++){
if count==i{b[i]=a}else{
b[i]=string_copy(a,1,string_pos("@",a))}a=string_delete(a,1,string_pos("@",a))
b[i]=string_delete(b[i],string_pos("@",b[i]),string_pos("@",b[i]))
if i==0{b[i]=asset_get_index(b[i])}else{
if string_count("'",b[i])>=2{b[i]=string_replace_all(b[i],"'","")}
else if string_count('"',b[i])>=2{b[i]=string_replace_all(b[i],'"','')}
else{
if asset_get_type(b[i])!=asset_unknown{b[i]=asset_get_index(b[i])}else{b[i]=real(b[i])}}}
show_message(string(b[i]))
}}

if count==5{c=script_execute((b[0]),(b[1]),(b[2]),(b[3]),(b[4]),(b[5]))}
if count==4{c=script_execute((b[0]),(b[1]),(b[2]),(b[3]),(b[4]))}
if count==3{c=script_execute((b[0]),(b[1]),(b[2]),(b[3]))}
if count==2{c=script_execute((b[0]),(b[1]),(b[2]))}
if count==1{c=script_execute((b[0]),(b[1]))}
if count==0{c=script_execute((b[0]))}

return c;

Who's 짭뿌C

profile

Game Maker Studio 2를 주로 사용합니다!

블로그 : http://blog.naver.com/qorwhddlrz


List of Articles
분류 제목 글쓴이 날짜 조회 수
기초 강좌 풀스크린 켜기 file 피자보이 2016.12.24 909
중급 강좌 인벤토리 만들기1 skdjjdje 2017.11.19 1342
스크립트 불친절한 GML 모든 문법 (겜스 기반 작성) WoKet 2015.02.24 4055
중급 강좌 게임메이커의 상식[함수사전 Ver_0.01] 8 개촙포에버 2012.04.18 5289
기초 강좌 게임메이커의 기본[현란한 움직임을 구현 해 보자] 9 개촙포에버 2012.03.31 6207
게임메이커의 기본[야!목이 뭐 그렇게 뻣뻣해!좀 돌리란 말야!]-2편 8 file 개촙포에버 2011.11.08 5419
게임메이커의 기본[야!목이 뭐 그렇게 뻣뻣해!좀 돌리란 말야!]-1편 2 개촙포에버 2011.10.18 4681
게임메이커의 기본[게임을 만드려면?] 2 개촙포에버 2011.10.12 4321
게임메이커의 기본[게임메이커란?용어정리.이벤트알아보기] 2 개촙포에버 2011.10.12 4664
게임메이커로 총알피하기를 만들어 보자!! 1 file 둥실둥실 2010.08.20 5829
게임메이커로 공튀기기를 만들어 보자!! 2화 file 둥실둥실 2010.08.21 5552
게임메이커로 공튀기기를 만들어 보자!! file 둥실둥실 2010.08.21 5983
기타 게임메이커8 (Game Mkaer 8)에 오신것을 환영합니다. 2 아방스 2011.12.07 5992
자료실 게임메이커 한글판 시리얼 이용 8 버젼! 2 Jhon 2011.10.20 6332
기타 게임메이커 드로우의 짤팁들. - 계속 업뎃됨 7 개촙포에버 2013.02.16 3697
자료실 게임메이커 다운가능.. 9 밀크 2009.02.19 10181
자료실 게임 메이커 7 - Game Maker 7 [다운로드] 23 아방스 2008.09.30 13857
기초 강좌 게임 만드는데 아주 도움이 되는 자료. 5 file 은색바람 2013.02.08 5408
기초 강좌 강좌의 변동사항 안내 3 짭뿌C 2013.10.13 2017
[영령]의 왕초보 무작정 따라하기-1강 8 아방스 2009.01.03 7455
Board Pagination Prev 1 2 3 Next
/ 3