게임메이커 강좌

 이 스크립트는 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
분류 제목 글쓴이 날짜 조회 수
자료실 GameMaker6.1버전 다운로드 3 M4A1 Carbine 2009.01.10 5677
자료실 GameMaker7 또다른 크랙(간단한거) 6 file Shot! 2009.01.10 7958
자료실 Rpg [hp/mp/exp/level] 모든 버전 호환 가능 미완성 4 file 은색바람 2012.12.01 3636
RTS RTS 게임이란? 1 file 아방스 2011.12.11 7319
기타 [Easy RPG]1강 - 스크립트 파헤치기 1부 13 file 개촙포에버 2013.02.28 4405
스크립트 [GML Script] execute_script_string 짭뿌C 2014.03.18 2007
기초 강좌 [GML] 01: 변수를 알아봐요! 2 짭뿌C 2013.12.07 3956
기초 강좌 [GML] 02: ..조건문?? 3 짭뿌C 2013.12.07 2774
기초 강좌 [GML] 03: 특정 코드를 반복해봐! 1 짭뿌C 2013.12.08 2849
스크립트 [GML] 강좌 정리 PDF 1 file 바람냥 2016.06.04 1884
중급 강좌 [Rpg] RPG를 만들자! :0강 9 file 은색바람 2012.12.01 6649
[게임메이커 8] 게임메이커 시작하기. 아방스 2011.10.10 4615
기초 강좌 [게임메이커 8] 기본 개념 및 둘러보기 9 아방스 2011.10.12 6697
[게임메이커 8] 설치 및 업데이트 1 아방스 2011.10.10 5738
슈팅 [게임메이커 8] 슈팅 게임만들기 1편 5 file 아방스 2011.10.16 9287
슈팅 [게임메이커 8] 슈팅 게임을 제작 하기 1 - 준비단계 1 아방스 2011.10.14 6895
중급 강좌 [게임메이커 실전]MMORPG를 만들어 보자 - 1 : 기본적인 변수 선언 10 개촙포에버 2012.06.27 5946
중급 강좌 [게임메이커 실전]MMORPG를 만들어 보자 - 2 : 주인공 만들기1부 - 이동 8 개촙포에버 2012.06.28 7081
중급 강좌 [게임메이커 실전]MMORPG를 만들어 보자 - 2 : 주인공 만들기2부 - 공격 6 개촙포에버 2012.07.15 4497
중급 강좌 [게임메이커 실전]MMORPG를 만들어 보자 - 2 : 주인공 만들기3부 - 몬스터만들기 2 개촙포에버 2012.08.01 4774
Board Pagination Prev 1 2 3 Next
/ 3