Page 1 of 1
ACS scripting
Posted: Thu Nov 20, 2008 22:45
by ExtremeMachine
Hey
I currently working on a map. Now i need my character to change his angle from north to south.
Using this code:
Code: Select all
Script 06 (void)
{
SetActorAngle(8,192);
}
Why wont it work?, nothing happens.
Posted: Fri Nov 21, 2008 0:13
by Graf Zahl
Because you did something wrong. What, I can't say. There's not enough information here.
Posted: Fri Nov 21, 2008 17:01
by ExtremeMachine
well what should be wrong? :S, 8 is the thing tag, (player1), and 192 = south angle.
http://zdoom.org/wiki/SetActorAngle
I can't see what i did wrong?
Posted: Fri Nov 21, 2008 18:56
by Graf Zahl
Me neither - because it's impossible to check without the rest of your setup.
Posted: Fri Nov 21, 2008 20:48
by ExtremeMachine
Ok i put the wad up. I still dont understand why it wont work.
http://www.zshare.net/download/5166397196496605/
Posted: Fri Nov 21, 2008 20:56
by Enjay
You can't give a player a tid by giving it to the player start. You have to allocate a tid to the player via a script.
http://zdoom.org/wiki/Thing_ChangeTID
Posted: Fri Nov 21, 2008 22:21
by ExtremeMachine
It worked! =D
This is what i used.
Code: Select all
script 100 enter
{
Thing_ChangeTID (0, 20);
SetActorAngle(20, 192);
}
However

, Now to next problem. The value 192=South direction it says on:
http://zdoom.org/wiki/Definitions. This wont work for me? :S, it doesn't matter if i change it from 96-224, still the pll facing the same direction. How this come?
Very much thanks! Soon i can stop being a pain in the ass for u guys

Posted: Fri Nov 21, 2008 23:24
by Enjay
Unfortunately, it's not a function that I have ever used, so I don't really know the particulars of it. What I would suggest, however, is that this is really a general Zdoom editing question. Seeing as how the Zdoom forum gets far more visitors than this one, you might get a quicker or fuller response if you ask the question in the editing forum over there.
Posted: Fri Nov 21, 2008 23:51
by ExtremeMachine
I worked it out by testing alot.
Anyways, for those who dont know it works like this:
0.25= North
0.50= West
0.75= South
1.0= East
And if you want to face northeast u just change the numbers something between 0 - 0.25, northeast would be 0.125 as 0.25/2 = 0.125.
0.125= Northeast
0.375= Northwest
0.625= Southwest
0.875= Southeast
Over and out!
