请选择 进入手机版 | 继续访问电脑版

站内搜索

搜索
热搜: 活动 交友 discuz

iFAction 世界需要你的想象力!

[官方] 改变鼠标样式 MOD

 

20

主题

209

帖子

1361

积分

管理员

Rank: 22Rank: 22Rank: 22Rank: 22Rank: 22Rank: 22

积分
1361

iFAction官方导师

发表于 2020-5-20 17:38:50 | 显示全部楼层 |阅读模式
改变鼠标样式 MOD 使用方法介绍
MOD名称/ Name改变鼠标样式MOD /Change Cursor Pattern
MOD适用平台/ PlatformACT,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.
  1. 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)
  1.     function doTrigger(){
  2.         if(nowPage == null) return;
  3.         if(nowPage.type == 0 && !doEnd){//执行事件
  4.             addTrigger();
  5.         }else if(nowPage.type == 1 && !doEnd && rect != null && RV.NowMap.getActor().getCharacter().isContactFortRect(rect)){
  6.             addTrigger();
  7.         }else if(nowPage.type == 2 && !doEnd  && rect != null && RV.NowMap.getActor().getCharacter().isContactFortRect(rect)){
  8.             icon.visible = true;
  9.             IVal.scene.getMainUI().setPhoneButton(true);
  10.             if( IInput.isKeyDown(RC.Key.ok) || IVal.scene.getMainUI().nextClick ){
  11.                 addTrigger();
  12.                 IVal.scene.getMainUI().nextClick = false;
  13.             }
  14.         }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)))){
  15.             IInput.up = false;
  16.             addTrigger();
  17.         }else{
  18.             icon.visible = false;
  19.         }
  20.     }
复制代码
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


  1. 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)))){
  2.                 IInput.up = false;
  3.                 character.InteractionBlockContact.doEvent(1);
  4.             }
复制代码





28

主题

316

帖子

4569

积分

iF世界

次元文明-Original Sin

Rank: 8Rank: 8

积分
4569

摩点支持者内测用户

QQ
发表于 2020-5-20 20:34:43 | 显示全部楼层
666666666666
moon大佬666

8

主题

59

帖子

669

积分

iF村庄

Rank: 5Rank: 5

积分
669

摩点支持者内测用户

发表于 2020-5-20 20:38:57 | 显示全部楼层
本帖最后由 MCCF 于 2020-5-20 22:07 编辑

666666
找时间移植到Web端--------------------------
移植已经开始动工(

18

主题

177

帖子

1916

积分

iF城镇

Rank: 6Rank: 6

积分
1916

摩点支持者内测用户继续加油哦!

QQ
发表于 2020-5-20 23:22:40 | 显示全部楼层
月老6666

点评

月老  详情 回复 发表于 2020-5-23 23:59
坐等开罗mod

8

主题

59

帖子

669

积分

iF村庄

Rank: 5Rank: 5

积分
669

摩点支持者内测用户

发表于 2020-5-23 11:58:04 | 显示全部楼层
移植版MOD1.0版本已完成!(仅限Web端
该版本使用纯粹CSS实现,所以没有实现动画部分(
但是增加了调用系统自带的数十种光标样式的功能……
正在考虑要不要免费发布emm

44

主题

507

帖子

3983

积分

管理员

Rank: 22Rank: 22Rank: 22Rank: 22Rank: 22Rank: 22

积分
3983

iFAction官方导师

发表于 2020-5-23 23:59:12 | 显示全部楼层
欢迎来到iFAction的大家庭,世界需要你的想象力!
下面是为你准备的各种传送门,祝你在这里玩的开心~
|下载iFAction最新版 |iFAction教学区 |iFAction提问区| 素材交流| 游戏发布区| 喝茶聊天嗑瓜子的欢乐水区|

10

主题

48

帖子

318

积分

iF平原

次元文明-Original Sin

Rank: 4

积分
318
发表于 2020-5-25 20:53:42 | 显示全部楼层
moon姐

10

主题

48

帖子

318

积分

iF平原

次元文明-Original Sin

Rank: 4

积分
318
发表于 2020-5-25 20:54:00 | 显示全部楼层
牛逼牛逼牛逼

3

主题

22

帖子

52

积分

iF基础方块

Rank: 3Rank: 3

积分
52
发表于 2021-6-7 01:25:25 | 显示全部楼层
Can I have a video? I have a conflict with arpg 鼠标 控制 角色 移动 MOD 介绍.

7

主题

14

帖子

99

积分

iF基础方块

Rank: 3Rank: 3

积分
99
发表于 2022-2-11 22:01:04 | 显示全部楼层
加载MOD后,当鼠标移动到有的触发器上方时,会出现死机现象,画面静止,按键也无效,需要如何处理?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系我们
QQ群:977585123
iFAction下载
Windows客户端
反馈
意见建议
iFAction

iFAction

京ICP备15053274号-1

Powered by Discuz! X3.4 © 2001-2013 Comsenz Inc.