中国虚拟军事网(VME)- 专注于武装突袭系列虚拟军事游戏

 找回密码
 加入VME

QQ登录

只需一步,快速开始

搜索
查看: 4568|回复: 39

[原创] 求几个脚本,谢谢

[复制链接]
发表于 2010-11-11 11:40:18 | 显示全部楼层 |阅读模式
本帖最后由 bym101 于 2010-11-11 11:40 编辑

空降脚本
跟随脚本,最好可以设定跟随距离



嗯,谢谢
发表于 2010-11-11 14:56:03 | 显示全部楼层
本帖最后由 FFUR2007SLX2_5 于 2010-11-11 15:01 编辑

空降
飞机名C130,空降部队名wg0
private ["_Arrary","_number","_index"]
_Arrary=units wg0
_number=count _Arrary
_index=0
#Eject
(_number select _index) action ["eject",C130]
unassigncargo (_number select _index)
_index=_index+1
~1
?(_number>_index):goto "Eject"
exit
使用:[this] exec "para.sqs"
发表于 2010-11-11 15:00:55 | 显示全部楼层
本帖最后由 FFUR2007SLX2_5 于 2010-11-11 15:03 编辑

跟随follow.sqs
private ["_x","_y","_follower"]
_follower=_this select 0
_x=random 10
_y=random 10
if (alive player) then {_follower move [(getpos player select 0)+_x,(getpos player select 1)+_y,(getpos player select 2)]} else {dostop _follower}
使用:在跟随者init中输入[this] exec "follow.sqs"
 楼主| 发表于 2010-11-11 16:11:07 | 显示全部楼层
楼上的小哥,该怎样感谢你?
 楼主| 发表于 2010-11-11 16:20:59 | 显示全部楼层
回复 FFUR2007SLX2_5 的帖子

试着弄下,没跳。。。

wg0是队长的名字,还是队长所带领的组的名字?
发表于 2010-11-11 16:24:00 | 显示全部楼层
wg0=group this
 楼主| 发表于 2010-11-11 16:33:22 | 显示全部楼层
组名,不知道为什么,还是没跳。。
 楼主| 发表于 2010-11-11 16:39:50 | 显示全部楼层
本帖最后由 bym101 于 2010-11-11 16:40 编辑

关于跟随哪个脚本:
是否应该加个循环呢,就是让跟随者不断的跟着PLAYER.
怎么让跟随者跟着PLAYER的组呢?比如PLAYER是队长,队长死了,跟随者应该继续跟随,直到把玩家小组杀光为止。。
 楼主| 发表于 2010-11-11 16:43:38 | 显示全部楼层
_ap=_this select 0

#loop
_ap move getpos player
~3
goto "loop"




这是我在以前论坛上找的跟随脚本,这个就可以不断的跟随
 楼主| 发表于 2010-11-11 16:56:06 | 显示全部楼层
跟随脚本改了一下:
private ["_x","_y","_follower"]
_follower=_this select 0
_x=random 10
_y=random 10
#loop
if (alive player) then {_follower move [(getpos player select 0)+_x,(getpos player select 1)+_y,(getpos player select 2)]} else {dostop _follower}
~3
goto "loop"

这样就不断的跟随了,呵呵
发表于 2010-11-11 18:35:19 | 显示全部楼层
bym101 发表于 2010-11-11 16:33
组名,不知道为什么,还是没跳。。

空降测试后修改了下
private ["_Arrary","_number","_index"]
_Arrary=units wg0
_number=count _Arrary
_index=0
#Eject
(_number select _index) action ["eject",C130]
unassignVehicle (_number select _index)
_index=_index+1
~1
?_number>_index:goto "Eject"
exit
发表于 2010-11-11 18:41:52 | 显示全部楼层
bym101 发表于 2010-11-11 16:56
跟随脚本改了一下:
private ["_x","_y","_follower"]
_follower=_this select 0

跟随脚本不必使用循环,更改了下可以不用脚本,直接将以下这段复制到触发器condition中即可
if (alive player) then {ws0 move [(getpos player select 0)+(random 10),(getpos player select 1)+(random 10),(getpos player select 2)]} else {dostop ws0}
跟随者名为ws0
 楼主| 发表于 2010-11-11 19:05:58 | 显示全部楼层
回复 FFUR2007SLX2_5 的帖子

被跟随的要是一个组,该如何?PLAYER要换成什么
 楼主| 发表于 2010-11-11 19:08:44 | 显示全部楼层
对了,我想明白了,被跟随的是PLAYER就行,这样只要玩家的组没有死光,就有PLAYER,ai就会继续跟随。。对吧。
 楼主| 发表于 2010-11-11 19:11:35 | 显示全部楼层
还是空降:
我试了你修改的哪个,不知为何还是没有跳。

我又搜可一个:
_aunits=units xyz
_i=0
_Max=count_aunits
#Here
(_aunits select _i)action["eject",c130]
unassignvehicle (_aunits select _i)
_i=_i+1
~1
?_Max>_i:goto "Here"
exit


只有XYZ(队长)跳了,别人不跳,不知为何?
您需要登录后才可以回帖 登录 | 加入VME

本版积分规则

小黑屋|中国虚拟军事网

GMT+8, 2024-5-2 06:36

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表