奇怪东西研究所
跟着一群小伙伴做一些奇怪的东西
所以就要研究下面的代码了QAQ
;剧本文件大概就是这样,";"号后面是注释,被/**/框住的也是注释, ;标签符号是[]或者@,跟krkr一样,不过@后面只能跟一行命令噢。 ;[p]标签比较常用,作用是暂停,点击鼠标执行下一行命令 @call file=wide/libs/utils [bg_new name="background" storage="Bg-3"];实例化一个背景,storage后面的是图片名字 [bg_show name="background"];显示背景 ;系统表示,这里主要是对话框, [showmessage] [call file=wide/system target="*system_setting_buttons"] [text_new name=_sp_chara_name layer=ui x="-168" y=-108.5 val="" color="DDFF00" fontsize=16 anchor="MiddleLeft"] [text_show name="_sp_chara_name"] ;这块主要是立绘的实例化,那两个@命令就是设置所有立绘的标签,也可以在实例化立绘是添加各自不同的标签~ @tag_default tag="chara" [chara_new name="mayi" storage="mayi-default" jname="mayi" scale=1 jcolor=FF77FF] [chara_new name="rin" storage="rin-default" jname="Rin" scale=1 jcolor=22FFFF] ;[chara_new name="majic" storage="rin-default" jname="Rin" scale=1 jcolor=22FFFF] @reset_tag_default;mayi表情登録 [chara_face name="mayi" face="angry" storage=mayi-angry] [chara_face name="mayi" face="smile" storage=mayi-smile];rin表情登録 [chara_face name="rin" face="angry" storage=rin-angry] [chara_face name="rin" face="smile" storage=rin-smile];设置立绘的位置 @chara_pos name="mayi" x=0 y=-0.7 @chara_pos name="rin" x=-5 y=-0.7 [playbgm wait=false time=1 storage="music"] [calc exp="global.cgnum={global.cgnum}+1"] #厂长 听说这个地方许愿很灵的样子呢![p] 女神哟……我想和大家做游戏……[l]请指引我,该如何下手呢?[p] ;选项卡 [select_new text="许愿什么的还是太唯心啦!回家吧!" target=*select_a1 ];target标记了执行该选项后跳到的位置 [select_new text="向女神献上自己的身体 " target=*select_a2 ] [select_new text="在女神雕像前唱歌" target=*select_a3 ] [select_show sound=click];点击选项卡后出现的声音 ;[s]停止场景文件的执行 [s]*select_a1 #厂长 算了,还是回去吧,我在学校还是团支书呢,封建迷信可不能搞……[p] #? (尖叫声)那边的少女,不能走![p] #厂长 谁……谁呀……这荒郊野岭的,难道遇上强盗了!不会对我劫些啥吧!![p] @jump target=*a_common*select_a2 #厂长 女神哟,如果您能给我明示,妾身愿出家为牧师,青灯古卷,终身侍奉您……[p] #…… 野生的神兽跳出来了![p] [image_new name="bear" storage="bear" scale=1.7];显示图片 [show name="bear" x=0 y=1.5] #神兽 吾乃女神之守护神兽,有数万年的修为,少女哟,让我看看汝之命运。[p] #神兽 ……汝的命运,并不简单!!!! #神兽 汝的前世,乃天命之灭世者,万物的终结者。无可阻挡,无可违逆,汝即大灾变![p] #厂长 这都啥跟啥呀……[p] #神兽 总之这神殿里多你一个太多,少你一个刚好,为了世界和平你还是去做游戏去吧……[p] #…… (神兽消失了)[p] [hide name="bear"] [remove name="bear"] #? 好像看到不得了的了呢!需要帮忙吗?[p] #厂长 你……你是那个…[p] @jump target=*a_common*select_a3 #厂长 好像祈祷完之后要唱圣歌来着?[p] #厂长 你是我的小呀小♫……不,不对,[l]秋兰兮麋芜,罗生兮堂下。绿叶兮素华,芳菲菲兮袭予。夫人自有兮美子,荪何㠯兮愁苦……[p] #? 停!停止![p] #厂长 ?怎么啦……[l]咦?原来有人在这儿呀……[p] #坐在椅子上的少女 这是东方的祷文吧!西方的女神怎么可能听得懂,还有,你太!吵!啦!![p] ;显示并记录第一张CG [bg_mod name="background" storage="Bg-12"] [if exp="{global.cg1}==0"] [calc exp="global.cg1=1"] [endif] #…… 眼前出现了一位神职人员打扮的少女[p] #坐在椅子上的少女 总之在这里不可以大声喧哗![p] #厂长 抱、抱歉……我马上就走[p] #…… 【获得结局】:因为太吵闹被赶回家[p] @jump scene=new file=wide/title*a_common @show name=mayi #mayi 你好哟,我叫Mayi,想不到这里会碰上游戏制作的同好呢![p] #厂长 你……你就是骚尼公司有名的那个游戏制作人![p] #mayi 没错没错,碰上你真是缘分呐[p] [chara_mod name="mayi" face="smile"] 少女哟,需要我你引领走向星辰大海吗[p] #厂长 教练!请指引我把![p] #mayi 不要叫教练[p] [chara_mod name="mayi" face="default"] 要叫姐姐大人哟[p] #mayi 总之,工欲善其事必先利其器,要想做游戏,选好一个好的引擎很重要,构建你我现在所处这个次元的引擎叫Unity……[p] [image_new name="unity_logo" storage="unity_logo" scale=1] [show name="unity_logo" x=4 y=1.5] #厂长 (认真地拿出了小本本)这个引擎有啥特点呢?[p] [hide name="unity_logo"] [remove name="unity_logo"] #mayi 这个……那个……[p] [chara_mod name="mayi" face="angry"] 对、对了,限于篇幅这个问题的话,还是等少女你穿越结束,问下这个demo的制作人好了![p] #厂长 大姐哟,您靠谱不啊……[p] #mayi 肯、肯定靠谱啊……[p] [chara_mod name="mayi" face="default"] 对了,一定是环境、环境问题啦!得换个地方,快过来,我要发动次元传送阵了![p] #厂长 这……这个世界有如此魔幻的设定没问题吗……等等我啊![p] [bg_mod name="background" storage="room"] #mayi 嗯嗯,这里感觉好多啦。[p] #厂长 确实这比较像学习的地方……[p] #mayi 总之我的讲解就到这里结束啦[p] #厂长 啥……这就结束了么..[p] [chara_mod name="mayi" face="smile"] #mayi 还有什么问题吗?没有我就消耗一个灵魂石,发动大召唤术叫下一位老师了。[p] #厂长 大召唤术……我已经习惯这个世界的设定了……[p] [chara_mod name="mayi" face="default"] #mayi Rin酱,就决定是你了,出来吧![p] [anim name="mayi" x=-3 type="easeInQuad"];爆炸的动画 [image_new name="explosion" storage="a1" y=2 scale=6] [image_face name="explosion" face=explosion2 storage="a2"] [image_face name="explosion" face=explosion3 storage="a3"] [image_face name="explosion" face=explosion4 storage="a4"] [image_face name="explosion" face=explosion5 storage="a5"] [image_face name="explosion" face=explosion6 storage="a6"] [image_face name="explosion" face=explosion7 storage="a7"] [image_face name="explosion" face=explosion8 storage="a8"] [image_face name="explosion" face=explosion9 storage="a9"] [image_face name="explosion" face=explosion10 storage="a10"] [image_face name="explosion" face=explosion11 storage="a11"] [image_face name="explosion" face=explosion12 storage="a12"] [playse storage="explosion"];播放声音 [image_show name=explosion time=0.1] [image_mod name=explosion face="explosion2" time=0.1] [image_mod name=explosion face="explosion3" time=0.1] [image_mod name=explosion face="explosion4" time=0.1] [image_mod name=explosion face="explosion5" time=0.1] [image_mod name=explosion face="explosion6" time=0.1] [image_mod name=explosion face="explosion7" time=0.1] [image_mod name=explosion face="explosion8" time=0.1] [image_mod name=explosion face="explosion9" time=0.1] [image_mod name=explosion face="explosion10" time=0.1] [image_mod name=explosion face="explosion11" time=0.1] [image_mod name=explosion face="explosion12" time=0.1] [stopse storage="explosion"] [image_remove name="explosion"] ;爆炸动画结束 [stopbgm] @playbgm storage="dream" @show name="rin" x=3 #厂长 背景音乐的画风变了,自带BGM的妹子么![p] #mayi 这位就是Rin噢,是我的前辈,在游戏制作方面非常厉害哦![p] [chara_mod name="rin" face="smile"] #rin 还好还好,也就比你的水平高一点吧。[p] #厂长 那么,请把做游戏的方法教给我把![p] [chara_mod name="rin" face="angry"] #rin 这个议题太大了啦……我想想,还是从简单的团队组建说起吧![p] #厂长 那么一个游戏团队需要那些人呢?[p] [chara_mod name="rin" face="default"] #rin 嗯……最主要的就是战士、法师、牧师吧……[p] #厂长 战法牧……这是要单挑boss,怒刷装备,皇城PK,胜者为王的节奏吗?[p] #rin 不是咯,我一个个解释吧……[p] #rin 牧师指的当然是策划……游戏的灵魂就是游戏性了,而策划就是守护游戏灵魂的人,如何让游戏更好玩?如何让剧本更吸引人?都是策划要思考的问题。[p] #厂长 好像策划要思考的东西蛮多的……[p] #rin 没办法,策划在团队里一般都是leader的角色,必须得66666……[p] #厂长 那……战士呢?[p] #rin 战士当然指的就是程序啦,要把一个个策划的想法化为实际,必须要同一行行代码战斗,还有让人头大的算法……[p] #厂长 那最后的法师呢?[p] #rin 法师即是美术和音乐,游戏的画面、音乐都是给予玩家第一印象的东西,这东西如果不如魔法般华丽地直击人心的话可不行哟~[p] #厂长 懂了!还有么!前辈,请告诉我更多的知识吧![p] [chara_mod name="rin" face="angry"] #rin 下次啦,我那边还挂着游戏呢就被召唤过来了,点卡在燃烧,先走咯![p] [anim name="rin" x=15] [hide name="rin"] [remove name="rin"] @anim name=mayi x=0 #厂长 ……[p] #mayi 啊哈哈……前辈还是那么急性子呀!那么我们也走吧![p] #厂长 门好像是锁的样子……[p] [chara_mod name="mayi" face="angry"] #mayi 糟了!我的传送术还在冷却中,我们被困在密室了![p] #厂长 教室里面,一般不都会有备用钥匙的吗?[p] #mayi 可是,钥匙会放在哪里呢?一起找找看吧![p] [hide name=mayi] ;定义三个点击区,要设置新的点击区可以通过运行unity,找到生成的clickable实例,通过Scence界面确定精确的位置和大小 ;scale_x,scale_y是以点击区为中心原点的坐标 [clickable name="click1" tag=clickable a=0 scale_x=2.37 scale_y =0.55 x=0.1 y=0.8] [clickable name="click2" tag=clickable a=0 scale_x=0.4 scale_y=0.3 x=1.79 y=2.07] [clickable name="click3" tag=clickable a=0 scale_x=0.58 scale_y=1.51 x=-7.21 y=1.43] [clickable name="click4" tag=clickable a=0 scale_x=0.8 scale_y=0.8 x=6.08 y=0.42] [clickable name="click5" tag=clickable a=0 scale_x=0.47 scale_y=0.25 x=-4.52 y=1.33] [clickable name="click6" tag=clickable a=0 scale_x=0.89 scale_y=0.51 x=-4.99 y=0.06] [clickable name="click7" tag=clickable a=0 scale_x=0.64 scale_y=0.51 x=-0.19 y=-0.39] [clickable name="click8" tag=clickable a=0 scale_x=0.34 scale_y=0.24 x=-0.23 y=2.2];定义点击事件,若发生点击事件,跳到该标签 [evt name="click1" target="*clickable1"] [evt name="click2" target="*clickable2"] [evt name="click3" target="*clickable3"] [evt name="click4" target="*clickable4"] [evt name="click5" target="*clickable5"] [evt name="click6" target="*clickable6"] [evt name="click7" target="*clickable7"] [evt name="click8" target="*clickable8"];[calc exp="f.test=500"],定义一个游戏变量test,值等于500 ;[calc exp="sf.test2=400"]定义一个系统变量test2系统变量等于400 ;[calc exp="f.test2={f.test}*3"]定义一个游戏变量test2等于另外一个变量test乘以3 [calc exp="f.clock=0"] *cli #…… 请点击画面,找到钥匙吧![p] [cm] ;事件恢复 @evt_resume[s] *clickable1 ;!!!!!!!!!!!注意evt_stop会导致存不起档的事件发生 @evt_stop 普通的黑板,没什么好奇怪的[p] @jump target=*cli*clickable2 @evt_stop[if exp="{f.clock}==1"][image_new name="key" storage="key" scale=1][show name="key" x=0 y=1.5]原来钥匙被卡在了钟的后面[p]@jump target="clear" [else]这个时钟似乎有一些奇怪。[p][calc exp="f.clock=1"] [endif] @jump target=*cli*clickable3 @evt_stop 窗外是一片万里无云的好天气[p] @jump target=*cli*clickable4 @evt_stop 大门紧紧地关着,必须有钥匙才行呢……[p] @jump target=*cli*clickable5 @evt_stop 电视机……不过现在可不是看《熊出没》的时候吧。[p] @jump target=*cli*clickable6 @evt_stop 书架上有一张纸条,上面写着“奇怪的地方请多检查几遍噢!”[p] @jump target=*cli*clickable7 @evt_stop 讲台里面只有一些粉笔黑板擦之类的东西……[p] @jump target=*cli*clickable8 @evt_stop 播音喇叭,钥匙肯定不会藏在这里。[p] @jump target=*cli [s] *clear @clickable_remove tag=clickable @evt_resume [hide name="key"] [remove name="key"] #厂长 好的,找到钥匙了,咱们出去啦[p] [chara_mod name="mayi" face="smile"] #mayi 呼~太好了,这次还好有你在[p] [chara_mod name="mayi" face="default"] #mayi 那么,出发吧!!少女哟,只要你迈出了这一步,你的前方征途必定是星辰大海!再见啦~~[p] [anim name="mayi" x=15] [hide name="mayi [remove name="mayi"] #厂长 出个教室门至于那么夸张么……那下次再见好了……[p] [bg_mod name="background" storage="school"] [if exp="{global.cg2}==0"] [calc exp="global.cg2=1"] [endif] #…… 【获得结局】未完待续(点击鼠标回到起始界面)[p] @jump scene=new file=wide/title转载于:https://www.cnblogs.com/qscqesze/p/5377732.html
总结
- 上一篇: 怎样邀请家长加入班级优化大师
- 下一篇: 软件工程师怎样减轻工作过程中遇到的压力