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

 找回密码
 加入VME

QQ登录

只需一步,快速开始

搜索
查看: 1569|回复: 2

[求助] 在房屋内放置人员

[复制链接]
发表于 2012-3-17 20:22:28 | 显示全部楼层 |阅读模式
本帖最后由 qevhytpl 于 2012-3-17 20:24 编辑

Example would be like this:

First, get the house you want to put your soldier in, few ways to do this, I'd recommend to get it's ID number (Show IDs, pick it out) and use the nearestObjects command to reference it.

Then through trial and error place the unit at the various positions in the house (0 - however many), some example code for that:

In the unit's init

Code:
this setPos (house1 buildingPos 3);

house1 would have to be declared earlier, an example on how to do that, again, few ways to do it:

Place an invisible H, in it's init:


Code:
house1 = (getPos this) nearestObjects 123456;

123456 is the ID of the house you want.
最后两句怎么整?
发表于 2012-3-18 09:54:23 来自手机 | 显示全部楼层
id是房屋的编号,在编辑器可以用show id查看
 楼主| 发表于 2012-3-18 13:00:04 | 显示全部楼层
纯真年代 发表于 2012-3-18 09:54
id是房屋的编号,在编辑器可以用show id查看

哦,昨天试了,这个东西不给力,不能用。求删帖,以免误导大众。
您需要登录后才可以回帖 登录 | 加入VME

本版积分规则

小黑屋|中国虚拟军事网

GMT+8, 2024-5-18 15:02

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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