When the object is spawned it checks all players' coordinates and teleports them if they're blocked by the object.
For some reason the players aren't teleported when blocked by it.
-= ACS Code =-
Code: Select all
Script 18 (Int x, Int y, Int z)
{
For(Int P=0; P <3 2; P++)
{
Int TeleportMe = False;
If(GetActorX(PLAYER_TID+P) < (x + 60.0) && GetActorX(PLAYER_TID+P) > (x + 62.0))
{
TeleportMe = True;
}
Else If(GetActorX(PLAYER_TID+P) > (x - 60.0) && GetActorX(PLAYER_TID+P) < (x - 62.0))
{
TeleportMe = True;
}
If(GetActorY(PLAYER_TID+P) < (y + 60.0) && GetActorY(PLAYER_TID+P) > (y + 62.0))
{
TeleportMe = True;
}
Else If(GetActorY(PLAYER_TID+P) > (y - 60.0) && GetActorY(PLAYER_TID+P) < (y - 62.0))
{
TeleportMe = True;
}
If(TeleportMe == True)
{
TeleportOther(PLAYER_TID+P, 800+P, Yes);
TeleportMe = False;
}
}
}
Code: Select all
Actor BrokenTree1 30303
{
//$Category Visual Vincent's Stuff
height 97
radius 65
+SOLID
+FORCEYBILLBOARD
states
{
Spawn:
TRBR A 1
TRBR A 1 ACS_ExecuteAlways(18, 0, x, y, z)
TRBR A -1
Stop
}
}
Anybody have any suggestions?