- 积分
- 754
- 威望
- 5
- 魅力
- 9
- 经验
- 471
- 热心度
- 0
- 注册时间
- 2013-9-9
- 最后登录
- 2020-2-6
- 主题
- 10
- 回帖
- 166
- 精华
- 0
- 阅读权限
- 30
TA的每日心情 | 郁闷 2016-5-14 04:24 |
---|
签到天数: 28 天 连续签到: 4 天 [LV.4]狂狼人
3级 Known Hero
- 积分
- 754
|
发表于 2016-5-11 08:16:22
|
显示全部楼层
Function local variables (y1-y100) are similar to x variables in that they are normally only be used within a function. However, they are unique to each function, so if you have four different functions, each will have its own set of y variables. Like most of the other variables, they store numeric values only. There is also one set of global y variables that may be used outside of functions and could be used if you run low on v variables, but be aware that if another trigger (e.g., HL or BA) occurs in the middle of your script, the values of these y variables could be wiped out.
Trigger based variables
y-1...y-100 are integer vars
e-1...e-100 are floating point vars
You may use them in the same places that you use y and e vars now.
Specific features:
1. They are NOT saved in the saved game. Actually every trigger section will run completely and you cannot save and load a game being inside a trigger section.
2. These variables are local for every trigger and if even one trigger works out inside another trigger section, they will have a different set of variables. As you can see you cannot pass values from trigger to trigger using these variables.
3. All variables are set to 0 at any trigger start, so you can use this as a default value.
4. All functions called from a particular trigger can access and share that trigger's set of variables, since they're trigger-based and not function-based.
|
|