게임메이커 강좌

 이 스크립트는 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] 강좌 정리 PDF 1 file 바람냥 2016.06.04 1884
스크립트 [GML Script] execute_script_string 짭뿌C 2014.03.18 2007
기초 강좌 강좌의 변동사항 안내 3 짭뿌C 2013.10.13 2017
기초 강좌 [GML] 02: ..조건문?? 3 짭뿌C 2013.12.07 2774
기초 강좌 [GML] 03: 특정 코드를 반복해봐! 1 짭뿌C 2013.12.08 2849
기초 강좌 [고전 풍] 03: 상세한 설정 2 file 짭뿌C 2013.10.08 2874
기초 강좌 [고전 풍] 04: 섬세한 손길 2 file 짭뿌C 2013.10.28 3346
기초 강좌 [고전 풍] 02: 고전 게임 풍 예제 살펴보기 2 짭뿌C 2013.10.08 3356
자료실 Rpg [hp/mp/exp/level] 모든 버전 호환 가능 미완성 4 file 은색바람 2012.12.01 3636
기타 게임메이커 드로우의 짤팁들. - 계속 업뎃됨 7 개촙포에버 2013.02.16 3697
기타 [게임메이커강좌-기타]짝맞추기 게임 만들기 1 file 아방스 2013.06.28 3847
기초 강좌 [GML] 01: 변수를 알아봐요! 2 짭뿌C 2013.12.07 3956
스크립트 불친절한 GML 모든 문법 (겜스 기반 작성) WoKet 2015.02.24 4055
중급 강좌 [게임메이커 실전]MMORPG를 만들어 보자 - 3 : 기타시스템1부 - 콤보시스템 5 개촙포에버 2012.08.11 4079
게임메이커의 기본[게임을 만드려면?] 2 개촙포에버 2011.10.12 4321
중급 강좌 [게임메이커 실전]MMORPG를 만들어 보자 - 3 : 기타시스템2부 - 레벨시스템 1 개촙포에버 2012.08.14 4398
기타 [Easy RPG]1강 - 스크립트 파헤치기 1부 13 file 개촙포에버 2013.02.28 4405
기타 [게임메이커강좌-기타]운석 피하기게임 만들기 2 file 아방스 2013.06.28 4430
Board Pagination Prev 1 2 3 Next
/ 3