|
尝试制作给限定玩家创建特效的效果,遇到一个问题。
当使用ActorSend() 给一个actor发送一个“计时器设置”的消息时,发现不能生效,想问下这样做是不是不可以?
如果不可以的话,还有哪些消息是不能这样使用的。
如果可以的话,请问我哪里做错了呢?
脚本代码如下:
[codes=galaxy]
playergroup Actor_HaveNonePlayersInPlayerGroup(playergroup pg){
    int p = 0;
    playergroup otherPlayers = PlayerGroupEmpty();
    while(p<=15){
        if(!PlayerGroupHasPlayer(pg,p)){
            PlayerGroupAdd(otherPlayers,p);
        }
        p = p + 1;
    }
    return otherPlayers;
}
actor Actor_AttachModelToUnitForPlayerGroup(unit u,playergroup players,string lj,string attachPoint){
    actorscope scope = ActorScopeFromUnit(u);
    playergroup otherPlayers = Actor_HaveNonePlayersInPlayerGroup(players);
    actor a;
    UIFlyerHelperOverride(players, 2);
    UIFlyerHelperOverride(otherPlayers, 0);
    a = ActorCreate(scope, "FuJiaTeXiaoDian", attachPoint, "", "");
    ActorSend(a,"TimerSet 0.100000,0.000000 Destroy");
    a = ActorCreate(scope, "FuJiaTeXiao", lj, "", "");
    ActorSend(a,"TimerSet 0.070000,0.000000 Destroy");
    UIFlyerHelperClearOverride(PlayerGroupAll());
    return a;
}
[/codes]
问题地图也附上了,进入地图后请按“空格”。 |
|