ACS scripting

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
ExtremeMachine
Posts: 58
Joined: Sun Aug 26, 2007 18:16

ACS scripting

Post 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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Because you did something wrong. What, I can't say. There's not enough information here.
ExtremeMachine
Posts: 58
Joined: Sun Aug 26, 2007 18:16

Post 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?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Me neither - because it's impossible to check without the rest of your setup.
ExtremeMachine
Posts: 58
Joined: Sun Aug 26, 2007 18:16

Post by ExtremeMachine »

Ok i put the wad up. I still dont understand why it wont work.

http://www.zshare.net/download/5166397196496605/
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post 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
ExtremeMachine
Posts: 58
Joined: Sun Aug 26, 2007 18:16

Post by ExtremeMachine »

It worked! =D


This is what i used.

Code: Select all

script 100 enter
{

    Thing_ChangeTID (0, 20);
    SetActorAngle(20, 192);	

}
However :P, 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 :P
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post 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.
ExtremeMachine
Posts: 58
Joined: Sun Aug 26, 2007 18:16

Post 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! :P
Locked

Return to “GZDoom”