I do tried to use the "search" on forum, it appeared lot of pages and going through I have found nothing related to my problem, sorry if I skipped a thread with same subject.
So, I saw the zdoom wiki about the Spawn function and it have this nice feature of spawning health bonus in a circle around the player...
... The problem is, when I used this code, the math does change the 'x' and 'y' value, but the object spawn exactly in the middle of the actor tag. The code is the following:
Code: Select all
// Spawn a circle of Health Bonus in a radius 64 around a teleport spawn:
script 12 (void)
{
print(s: "This is not working strangely...");
int Total = 10;
for (int n = 0; n < Total; ++n)
{
int Angle = FixedDiv(n, Total - 1);
int x = GetActorX(21) + FixedMul(cos(Angle), 64);
int y = GetActorY(21) + FixedMul(sin(Angle), 64);
print(s: "x: ", d: x, s: " y: ", d: y);
int z = GetActorFloorZ(21);
Spawn("HealthBonus", x, y, z);
delay(16);
}
}
---
So well, it does spawn the health bonus, but as I said, only in the exactly point of the tagged actor, yet, when printed, the console shows differences between 'x' and 'y', here is an image:
Spoiler:---
EDIT:
Sorry the late edit, but well, I have no answer yet, but I wanted to put more info, the port I'm using is the last version of "Zandronum" and I'm making the map with "(ZDoom) Doom in Hexen format".