站内搜索

搜索
热搜: 活动 交友 discuz

iFAction 世界需要你的想象力!

[请帮忙] It is possible to call Common triggers by his ID?

Jwx

4

主题

11

帖子

64

积分

iF基础方块

Rank: 3Rank: 3

积分
64
发表于 2021-11-4 11:55:44 | 显示全部楼层 |阅读模式
Hi, my question is if there a way to call a common trigger by his ID number via script in the UI editor?. Thanks

5

主题

34

帖子

1571

积分

iF城镇

Rank: 6Rank: 6

积分
1571
QQ
发表于 2021-11-4 23:39:40 | 显示全部楼层
  1. var trigger = RV.NowSet.findEventId(ID);
  2.         if(trigger != null){
  3.             trigger.doEvent();
  4.         }
复制代码
Jwx

4

主题

11

帖子

64

积分

iF基础方块

Rank: 3Rank: 3

积分
64
 楼主| 发表于 2021-11-5 07:15:33 | 显示全部楼层
Hi, great, thanks for your response, :)
and if I wanted to execute a specific common trigger via script for his ID... is there something in a similar? ....

5

主题

34

帖子

1571

积分

iF城镇

Rank: 6Rank: 6

积分
1571
QQ
发表于 2021-11-5 08:52:58 | 显示全部楼层
本帖最后由 qq755860252 于 2021-11-5 08:56 编辑
Jwx 发表于 2021-11-5 07:15
Hi, great, thanks for your response, :)
and if I wanted to execute a specific common trigger via scr ...

Whose ID? Sorry, the translation is a little incomprehensible. If it is the ID of a public trigger, you can use the following script.

  1. var trigger = RV.NowSet.findEventId(Fill in the public trigger ID);
  2.         if(trigger != null){
  3.             trigger.doEvent();
复制代码

The Fill in the public trigger ID is changed to 1. Running the script will execute the 001 general trigger.
Jwx

4

主题

11

帖子

64

积分

iF基础方块

Rank: 3Rank: 3

积分
64
 楼主| 发表于 2021-11-5 12:35:32 | 显示全部楼层
I'm sorry I got a little confused myself, ... also English is not my main language too :p ..., but now your answer is already clearer to me, and I will try it, thank you for your support. Greetings.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

iFAction

京ICP备15053274号-1

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