如何在制空時做動作
本帖最后由 Sidlady 于 2012-6-18 16:05 编辑:s_11
31@ = 0
30@ = 0
wait 0
if and
0AB0: key_pressed 88
not Actor.Dead($PLAYER_ACTOR)
not Actor.Driving($PLAYER_ACTOR)
jf @s_11
:s_33
wait 0
30@ += 1
31@ += 1
0812: AS_actor $PLAYER_ACTOR perform_animation "DRIVE_BOAT" IFP_file "PED" 4.0 loopA 1 lockX 1 lockY 1 lockF 1 time -1 // versionB
0612: set_actor $PLAYER_ACTOR animation "DRIVE_BOAT" paused 0
0614: set_actor $PLAYER_ACTOR animation "DRIVE_BOAT" progress_to 0.27 // 0.0 to 1.0
0 lockY 0 lockF 0 time -1 // versionB
04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.1
00A1: put_actor $PLAYER_ACTOR at 11@ 12@ 13@
:S_77
wait 0
if
30@ > 8
jf @s_33
:S_99
04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.1
00A1: put_actor $PLAYER_ACTOR at 11@ 12@ 13@
13@ -= 1
00A1: put_actor $PLAYER_ACTOR at 11@ 12@ 13@
if
31@ > 30
jf @s_99
0612: set_actor $PLAYER_ACTOR animation "DRIVE_BOAT" paused 1
0687: clear_actor $PLAYER_ACTOR task
jump @s_11
我這個cleo是想讓主角上升到一定高度然後制空並保持動作,一定時間才落下并解除動作
然而。。。我上升過程主角並沒有做動作,只是普通站立
但是我很確信是綫程是執行了動作(某特殊測試- -)
沒辦法解決,所以過來請教下懂cleo的
@kami @kwanz @peace @【游骑兵】天涯 @小鉛筆 我知道原因是sa機制自動觸發下落動作抵消了我的動作,那怎麽解決呢?
有沒有取消下落動作的代碼:L 本帖最后由 紫夕£夏夜 于 2012-6-17 21:33 编辑
Sidlady 发表于 2012-6-17 21:20 static/image/common/back.gif
我知道原因是sa機制自動觸發下落動作抵消了我的動作,那怎麽解決呢?
有沒有取消下落動作的代碼
这……不太清楚,你参考一下论坛上的走水之术CLEO和万象天引CLEO,感觉都有你所说的功能,万象天引是J16D的,我不能发,所以私聊给你地址,也别指望这货多高级了= = 到最高点在脚下垫块隐形木板 kwanz 发表于 2012-6-17 21:28 static/image/common/back.gif
到最高点在脚下垫块隐形木板
問題是上升過程怎麽辦呢:L 上升的过程是动作执行的? kami 发表于 2012-6-17 21:33 static/image/common/back.gif
上升的过程是动作执行的?
是的 中间没有预留施展动作的wait时间,从而导致了30@在没大于8之前不断循环。
大于8后又施展接下来的动作去了。导致前面的动作都没出现就完了 kami 发表于 2012-6-17 21:39 static/image/common/back.gif
中间没有预留施展动作的wait时间,从而导致了30@在没大于8之前不断循环。
大于8后又施展接下来的动作去了。 ...
好吧。。有個問題是只要主角一上升,無論什麽動作就會自動取消
表示我已經把動作移到30@上面那個循環了,不會因爲無限循環導致動作無法施展了- -
Sidlady 发表于 2012-6-17 22:48 static/image/common/back.gif
好吧。。有個問題是只要主角一上升,無論什麽動作就會自動取消
表示我已經把動作移到30@上面那個循環了 ...
你可以参考忍者跳CLEO
一切问题就会迎刃而解。
SA机制不会屏蔽CLEO的动作的。
应该是循环导致的 kami 发表于 2012-6-17 23:29 static/image/common/back.gif
你可以参考忍者跳CLEO
一切问题就会迎刃而解。
SA机制不会屏蔽CLEO的动作的。
好吧,, how about an invinsible platform so the protagonist can "stand" in mid-air like he is just in the ground. Easier then to do other "actions" while in air. So he is not flying, just standing in mid-air. sixace 发表于 2012-6-18 15:14 static/image/common/back.gif
how about an invinsible platform so the protagonist can "stand" in mid-air like he is just in the gr ...
I KNOW ,BUT..cj can't do"actions"when he up
like j16d cleo
http://www.miuk.net/thread-1766-1-1.html
it can make cj do "actions" when up
sorry for my bad english:L 本帖最后由 sixace 于 2012-6-18 16:04 编辑
ok...my suggestion was a different idea. But to help with your code:
You want to rise to a certain height. You will need reference to ground_z and use the 02CE opcode:Actor.StorePos($PLAYER_ACTOR, 11@, 12@, 13@)
Actor.PutAt($PLAYER_ACTOR, 11@, 12@, 13@)
02CE: 11@ = ground_z_at 11@ 12@ 13@
0063: 13@ -= 11@ // (float)
13@ represents your height or distance from the ground
so for example you want to rise up about 5 meters:
:height
And then
0812: AS_actor $PLAYER_ACTOR perform_animation "DRIVE_BOAT" IFP_file "PED" 4.0 loopA 1 lockX 1 lockY 1 lockF 1 time -1 // versionB
0612: set_actor $PLAYER_ACTOR animation "DRIVE_BOAT" paused 0
0614: set_actor $PLAYER_ACTOR animation "DRIVE_BOAT" progress_to 0.27 // 0.0 to 1.0
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 0.0 3.0
Actor.StorePos($PLAYER_ACTOR, 11@, 12@, 13@)
02CE: 11@ = ground_z_at 11@ 12@ 13@
0063: 13@ -= 11@ // (float) I hope that makes sense. Sorry for my english.
页:
[1]
2