沙盘引擎 (SEngine)

创意诞生沙盘世界,不止如此想象!

用户工具

站点工具


scripting:world:main

📚 差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
scripting:world:main [2024/03/25 22:05] bibiboxsscripting:world:main [2024/03/31 15:55] (当前版本) bibiboxs
行 52: 行 52:
 ```javascript ```javascript
 function OnThrowCastTrigger( tag: string, point: Vector ): bool function OnThrowCastTrigger( tag: string, point: Vector ): bool
 +```
 +
 +```javascript
 +//阻止投掷物引起的爆炸,不会产生爆炸
 +function OnThrowCastTrigger( tag, point )
 +{
 + //Prop grenade [tag] is "Grenade"
 + if(tag == "Grenade")
 + {
 + DLog("An explosion tagged 'Grenad' was stopped!");
 + return false;
 + }
 +}
 ``` ```
  
行 328: 行 341:
 ### SetWorldFogColor() ### SetWorldFogColor()
  
-> 设置游戏世界雾颜色,默认为白色`Color(102102102)`。+> 设置游戏世界雾颜色,默认为白色`Color(150150150)`。
  
 > 此方法是`SetGameRule("fogcolor")`的快捷方法。 > 此方法是`SetGameRule("fogcolor")`的快捷方法。
行 518: 行 531:
  
 - `ignoreSelf`:是否忽略**发起伤害单位**自身(如`from`为空则没有意义) - `ignoreSelf`:是否忽略**发起伤害单位**自身(如`from`为空则没有意义)
 +
 +
 +
 +### CreateFire()
 +
 +> 在指定位置**生成一团火焰**,火焰将对附近的实体造成燃烧+传播伤害。
 +
 +```javascript
 +function CreateFire( pos: Vector, time: float, radius: float = 1.0 )
 +```
  
  
行 564: 行 587:
  
 ```javascript ```javascript
-function CreateThrowCast( start: Vector, direction: Vector, color: Color, width: float = 0.2, speed: float = 1.0, tag: string = "", action: Action<Vector> = null )+function CreateThrowCast(  
 + start: Vector,  
 +    direction: Vector,  
 +    color: Color,  
 +    width: float = 0.2,  
 +    speed: float = 1.0,  
 +    tag: string = "",  
 +    action: Action<Vector> = null )
 ``` ```
  
行 578: 行 608:
 - **width:**射线宽度 - **width:**射线宽度
 - **speed:**投掷物理速度 - **speed:**投掷物理速度
-- **tag:**标签,仅有识别作用,主要用于`OnThrowCastTrigger() `事件参数+- **tag:**标签,仅有识别作用,主要用于`OnThrowCastTrigger()`事件参数
 - **action:**碰撞时触发方法(参数:`Vector`) - **action:**碰撞时触发方法(参数:`Vector`)
  
行 585: 行 615:
 ### CreateModelThrowCast() ### CreateModelThrowCast()
  
-> 在指定位置生成一条**包含模型的投掷抛物射线(物理)**,与`CreateThrowCast()`功能基本相同,但会额外多出子模型效果(例如射出的子弹、炮弹、弓箭、手榴弹模型等)。+> 在指定位置生成一条**包含模型的投掷抛物射线(物理)**,与`CreateThrowCast()`功能基本相同,但会额外多出**子模型**效果(例如射出的子弹、炮弹、弓箭、手榴弹模型等)。
  
 ```javascript ```javascript
-function CreateModelThrowCast( model: int, localPos: Vector, localAngle: Vector, localScale: Vector, start: Vector, over: Vector, color: Color, width: float = 0.2, time: float = 0.1 )+function CreateModelThrowCast(  
 + model: int,  
 +    localPos: Vector,  
 +    localAngle: Vector,  
 +    localScale: Vector,  
 +    start: Vector,  
 +    direction: Vector,  
 +    color: Color,  
 +    width: float = 0.2,  
 +    speed: float = 1.0,  
 +    tag: string = "",  
 +    action: Action<Vector> = null )
 ``` ```
  
行 913: 行 954:
 SendSocketData("127.0.0.1:8192", "Test"); SendSocketData("127.0.0.1:8192", "Test");
 ``` ```
 +
 +
 +
 +
 +
  
  
scripting/world/main.1711375530.txt.gz · 最后更改: 2024/03/25 22:05 由 bibiboxs