for simplifying a trap script, I did the following script:
Code: Select all
int fire_direction=215;
int fire_counter=0;
script "Fire_Traps" (void)
{
while(fire_counter<5)
{
Thing_Projectile2(fire_direction, 222, GetActorAngle(fire_direction), random(48,56), 0, 0, 0);
delay(random(1,6));
fire_counter++;
}
fire_direction=random(215,218);
fire_counter=0;
delay(35);
restart;
}
It randomly chooses between a map spot (215 to 218), gets the actors angle to determine in which direction to shoot the fire attack and then fires it. After 5 bursts have been dealt, it starts over again with a new map spot. The problem is: The attack always goes in the eastern direction (angle 0). Does a map spot not have an angle or does the GetActorAngle function not read its angle?