GTA CLEO 制作教程(5)





代码
06D1:
v$1225 = “Bat_block”// 16-byte strings
06D1:v $ 1225
=“Bat_block”/ / 16字节的字符串

0605: actor
$PLAYER_ACTOR perform_animation_sequence v$1225 from_file
“BASEBALL”  4.0  1
 0  0  0 -1
ms
0605:演员$ PLAYER_ACTOR perform_animation_sequence v $ 1225
from_file“棒球”4.0 1 0 0 0 -1毫秒

______________________________________________________________________________________
______________________________________________________________________________________

______________________________________________________________________________________
______________________________________________________________________________________

Scripting/Writing a
Thread
脚本/写线程

The scripts
which are running in GTA are called
该脚本,它运行在多伦多被称为

THREAD
螺纹

They are
defined in the main.scm as thread with the create_thread command or
a mission script as
mission
它们界定为与create_thread命令或作为特派团的任务脚本线程main.scm

As well the
Extern scripts of script.img are also
threads.
以及通过extern的script.img脚本也线程。

The cleo
programm checks if there is
在克利奥programm检查是否有

.cs 。政务司司长
file in the
Cleo folder
文件夹中的克莱奥

and if yes, it
start this script as thread
如果是的,它开始为这个脚本线

Script structur / short
version:
脚本structur
/短版本:

At first, the
head, it beginns with the Cleo
directive
起初,头部,它beginns与克利奥指令





CODE
代码
{$CLEO
.cs}
($ CLEO的。政务司司长)


First Label
(adress)
第一个标签(地址)





CODE
代码
:Akt :AKT公司


Then give the
thread a name
然后给该线程的名称





CODE
代码
03A4:
name_thread ‘AKT’
03A4:name_thread’AKT的’


now put a code
inthere which will doing something and then end_custom_thread as
last
code
现在把代码inthere会做一些,然后作为最后一个代码end_custom_thread

its ready then
to test it ingame
它愿意就测试游戏内





CODE
代码
{$CLEO
.cs}
($ CLEO的。政务司司长)

:Akt
:AKT公司

03A4:
name_thread ‘AKT’
03A4:name_thread’AKT的’

08B2:
toggle_thermal_vision 1
08B2:toggle_thermal_vision
1

0A93:
end_custom_thread
0A93:end_custom_thread


Script above
activates the Infrarot view unless in
cutscenes
上面的脚本激活,除非在过场动画的Infrarot看法

The script
ends then, will be deactivated because it ends with opcode 0A93:
end_custom_thread
在脚本结束后,将被停用,因为它的操作码0A93结束:end_custom_thread

The script
will be started by each loading of savegame or by start new
game
该脚本将开始由每个秘技或开始新的游戏加载

______________________________________________________________________________________
______________________________________________________________________________________

Next step / using
conditional checks
下一步/使用条件检查

A
conditional check requires minimum 3 opcodes

有条件的检查需要最少3操作码

1.
1。
the IF-variation
在IF -变化

2.
2。
the real question
真正的问题

3.
3。
the jump instruction by
negation
由否定跳转指令

1.
1。
if
如果

2.
2。
0AB0: key_pressed
8
0AB0:key_pressed 8

3.
3。
004D: jump_if_false
@akt_01
004D:jump_if_false @ akt_01

We use the
previous script again but now we wonna be able to switch into
normal view
我们使用以前的剧本再说,但现在我们wonna可以切换到普通视图

Therefore we
use a conditional check and build a
因此,我们使用条件,建立一个检查

“LOOP”
“循环”

Loop means
that a jump instruction can send the reading process to a previous
adress
循环意味着跳转指令可将阅读过程到以前的地址

I call such an
adress “Loop-adress”
我希望这样的报告“环路adress”

Important:重要事项:

The first
opcode after such a Loop-adress must be the wait
opcode
操作码后的第一个这样的循环,adress必须等待操作码

mostly wait 0
millisecond
主要是等待0毫秒

the jump
instruction can be a jump instruction by
negation
跳转指令可以是一个由否定跳转指令

or also a
normal jump instruction
或同样是正常的跳转指令





CODE
代码
004D:
jump_if_false @akt_01
004D:jump_if_false @
akt_01

 


 
Source: New feed

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください