|
改变鼠标样式 MOD 使用方法介绍
MOD名称/ Name | 改变鼠标样式MOD /Change Cursor Pattern | MOD适用平台/ Platform | ACT,ARPG | MOD是否开源/ Whether open source | 否/ No | MOD是否存在触发器/ Trigger command | 否/ No | MOD是否存在外接DLL/ External DLL | 是/ Yes
|
使用说明 / Instructions
1、概览 / Preview
本MOD支持修改鼠标为图片及动画两种样式。The MOD supports changing the cursor pattern to pictures and animations.
2、使用 / Use
指令 / command | 中文 | English | 如何使用
How to use | 1、打开MOD中的脚本,对默认的鼠标样式进行设置
默认鼠标图片
changeMouseV.mouseImage
设置完成后,运行游戏默认鼠标就会被替换为设置的鼠标样式。
2、设置悬停在触发器上时鼠标的样式
a、在MOD脚本中找到 changeMouseV.mouseList。
b、在该数组中添加一个逗号",",然后填写changeTriggerMouse("name","path",animId,animType)
name: 你为这一类光标样式起的名字。
path :鼠标接触后替换样式的图片地址。如果替换为动画,这里请填写null。
animId :鼠标接触后替换的动画id。如果替换为图片这里请填写null。
animType : 替换的动画类型,0为帧动画,1为粒子动画。如果替换为图片这里请填写null。
例如1(图片):changeTriggerMouse("hand","System/mouse_1.png",null,null)
例子2(帧动画):
changeTriggerMouse("hammer",null,1,0)
3、在触发器中设置
为你想要让鼠标悬停后变换样式的触发器进行如下设置:
新建一个注释,将这一行内容填写在触发器第一页的第一行的注释中。
changeMouse|@| name
这里的name就是你刚刚在第二步中设置的。
如changeMouse|@|hand
你可以在changeMouse|@|后面写你设置好的不同名字,鼠标接触后就会替换成相应的样式。
tips:显示条件不满足的触发器被鼠标悬停时不会变化鼠标图像
| 1, find the script in MOD and set the default cursor pattern.
The default cursor image
changeMouseV.mouseImage
2, Please set pattern that will change after the mouseover trigger
① Find changeMouseV.mouseList in script.
② Refer to the example, add a new changeTriggerMouse (note, image, animId, animType) to the array, separated by commas.
- changeTriggerMouse("name","path",animId,animType)
复制代码 name | the name of this pattern
image | The address of the mouse image, you need to fill in whole addresses including the folder name and suffix, if you change mouse with animation, please fill in "null"
animId | animation id, if you change mouse with image, please fill in null here
animType | The type of animation, 0 is key frame animation, 1 is particle animation, if you change mouse with image, please fill in "null" here
example 1(image):changeTriggerMouse("hand","System/mouse_1.png",null,null)
example 2(image):changeTriggerMouse("hammer",null,1,0)
3, Set following note in trigger
Set the following for the trigger you want to change cursor pattern after hovering the mouse:
Create a new Note and fill in "changeMouse|@| name" in the note on the first line of the first page of the trigger.
example:
changeMouse|@|hand
(this name is the "name" you have set in step 2
tips: Triggers whose appearing conditions are not satisfied will not work when hovered |
一些应用实例的脚本改法:Some tips for game script:
1、如果想要实现无需角色靠近,鼠标点击触发器即触发的效果,请粘贴以下脚本,来替换LTrigger中的同一function(ACT在109行)
If you want to execute the content of trigger by clicking the trigger without the role being close, please paste the following script to replace the same function in LTrigger (ACT is on line 109)
- function doTrigger(){
- if(nowPage == null) return;
- if(nowPage.type == 0 && !doEnd){//执行事件
- addTrigger();
- }else if(nowPage.type == 1 && !doEnd && rect != null && RV.NowMap.getActor().getCharacter().isContactFortRect(rect)){
- addTrigger();
- }else if(nowPage.type == 2 && !doEnd && rect != null && RV.NowMap.getActor().getCharacter().isContactFortRect(rect)){
- icon.visible = true;
- IVal.scene.getMainUI().setPhoneButton(true);
- if( IInput.isKeyDown(RC.Key.ok) || IVal.scene.getMainUI().nextClick ){
- addTrigger();
- IVal.scene.getMainUI().nextClick = false;
- }
- }else if(IInput.up && rect.intersects(new IRect((IInput.x - view.ox),(IInput.y - view.oy),(IInput.x - view.ox + 1),(IInput.y - view.oy + 1)))){
- IInput.up = false;
- addTrigger();
- }else{
- icon.visible = false;
- }
- }
复制代码 2、如果想要实现和交互块接触同时点击交互块触发事件的效果,那么可以修改LActor 848 ~ 850行(ACT)为:
If you want to make the effect of touching and clicking the interaction block to trigger the event, you can change the LActor line 848 ~ 850 (ACT) to
- if(character.InteractionBlockContact != null && IInput.up && character.InteractionBlockContact.getRect().intersects(new IRect((IInput.x - view.ox),(IInput.y - view.oy),(IInput.x - view.ox + 1),(IInput.y - view.oy + 1)))){
- IInput.up = false;
- character.InteractionBlockContact.doEvent(1);
- }
复制代码
|
|