The "How do I..." Thread

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Jimmy
 
 
Posts: 4720
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him

Re: The "How do I..." Thread

Post by Jimmy »

0x7fffffff.

That's zero-x-seven-seven f's. :D
User avatar
Deathman101
Posts: 55
Joined: Thu Sep 25, 2008 4:28 pm

Re: The "How do I..." Thread

Post by Deathman101 »

How do I use the arguments you can set in lines like ACS_Execute?
User avatar
bagheadspidey
Posts: 1490
Joined: Sat Oct 20, 2007 10:31 pm

Re: The "How do I..." Thread

Post by bagheadspidey »

SoulPriestess wrote:Every separate translation gets its own quote mark set.

Code: Select all

Translation "112:127=208:223", "192:207=16:31"
Ahh, good to know. And now that [wiki]Translation[/wiki] is overhauled I see that information was already on the [wiki=Actor_properties#Rendering]wiki[/wiki] after all =p
User avatar
ThatOneZDoomer
Posts: 225
Joined: Sun Jun 01, 2008 1:33 am
Preferred Pronouns: She/Her
Location: Where I'm at of course

Re: The "How do I..." Thread

Post by ThatOneZDoomer »

I was looking at A_CountdownArg and I'm wondering, what does an actor's arg mean? Any code examples? I may have a good use for this if I know how to use it.
SoulPriestess wrote:Every separate translation gets its own quote mark set.

Code: Select all

Translation "112:127=208:223", "192:207=16:31"
That solved the problem, thanks.
User avatar
Rachael
Posts: 13575
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: The "How do I..." Thread

Post by Rachael »

ThatOneZDoomer wrote:I was looking at A_CountdownArg and I'm wondering, what does an actor's arg mean? Any code examples? I may have a good use for this if I know how to use it.
Args are from the map's actor definitions; you will never define them in DECORATE itself. If you load a map in Hexen format, every actor will have 5 args that you can use.
User avatar
DoomerMrT
Posts: 370
Joined: Tue Nov 21, 2006 10:58 am
Location: Budapest,Hungary

Re: The "How do I..." Thread

Post by DoomerMrT »

I would like to make a sprint script which makes the player run a bit faster than his normal running speed for a certain amount of time. Sprint could be triggered while pressing a certain button assigned to it or pressing it only once, I don't know which is possible.

So far I came up with this(No keyconf yet as I don't know how to do a proper definition for such an action)

Code: Select all

script 290(void)
{
SetActorProperty(0,APROP_SPEED,1.25);
int buttons;
int stillrunning;

while(True)
{
buttons = GetPlayerInput(-1,INPUT_BUTTONS);
	
if(buttons & BT_FORWARD)
{
stillrunning = stillrunning + 1;
	
	if(stillrunning <= 5) 
	{
	ThingSound(0,"player/breath",48);  // Breathe light
	delay(75);
	}
	
	if(stillrunning > 5 && stillrunning <= 8)
	{
	ThingSound(0,"player/breath",80);  // Breathe medium
	delay(75);
	}
	
	if(stillrunning > 8 && stillrunning <=12)
	{
	ThingSound(0,"player/breath",128);  // Breathe heavy
	delay(75);
	}
	
	if(stillrunning > 12)
	{
	break;
	}


}

if(stillrunning <= 12)
{

}


ThingSound(0,"player/nostamina",255);
stillrunning = 0;
SetActorProperty(0,APROP_SPEED,1.0);
delay(20*35);


} 
}

Not sure if this works properly, its just an overview how should it function.
skadoomer
Posts: 1026
Joined: Fri Sep 05, 2003 12:49 pm

Re: The "How do I..." Thread

Post by skadoomer »

ThatOneZDoomer wrote:I was looking at A_CountdownArg and I'm wondering, what does an actor's arg mean? Any code examples? I may have a good use for this if I know how to use it.
Here's what i used it for:

Code: Select all

		Spawn: 
			TNT1 A 2 A_Look
			loop

		See: //(see state sets property)
			TNT1 A 0 A_JumpIf(Args[0] > 0, "MakeFrightened")
			TNT1 A 0 A_JumpIf(Args[1] > 0, "MakeFly")
			TNT1 A 1 ACS_ExecuteAlways(SetCountdownArg, 0, Args[0], Args[1], Args[2])
			
			//Apply chase states 
			TNT1 A 0 A_JumpIf(Args[2] == 2, "Wonder")
			TNT1 A 0 A_JumpIf(Args[2] == 1, "FastChase")
			goto Chase
		
		MakeFrightened:
			TNT1 A 0 A_ChangeFlag("Frightened", 1)
			TNT1 A 1 Thing_SetSpecial(tid, 0, -1, Args[1], Args[2])
			goto See	
		
		MakeFly:
			TNT1 A 0 A_ChangeFlag("NoGravity", 1)
			TNT1 A 0 A_ChangeFlag("Float", 1)
			TNT1 A 1 Thing_SetSpecial(tid, 0, Args[0], -1, Args[2])
			goto See	
					
		Wonder:
			ARM1 A 4 A_Wander
			ARM1 A 0 A_CountdownArg(3)
			loop

		FastChase:
			ARM1 A 4 A_FastChase
			ARM1 A 0 A_CountdownArg(3)
			loop

		Chase:
			ARM1 A 4 A_Chase
			ARM1 A 0 A_CountdownArg(3)
			loop
Basically, I created a node that sets some property's to its-self from whatever its args when it is spawned. You can use SetThingSpecial to pass values into the actors args. (that's how I set the initial countdown amount) Its use requires some creative thinking, but the args[] command is one of the most powerful, yet underused platform you can use to have decorate and acs talk to each other.
User avatar
Mik57
Posts: 675
Joined: Sun Jul 27, 2008 1:39 pm
Location: Phelan, California

Re: The "How do I..." Thread

Post by Mik57 »

Random would be my friend, if it was a command on its own. I've tried an If/Else statement with random in it, which just gives me an error. I need a function, or something.
User avatar
Captain Ventris
Posts: 4605
Joined: Mon Jul 31, 2006 4:25 pm
Location: San Antonio, TX

Re: The "How do I..." Thread

Post by Captain Ventris »

So, if a GZDoom Wad uses models (The GZDoom verison of ZanZan, in this case), will those models work fine in Skulltag, or is there a difference between them? Will models show up to someone using Software Mode?
User avatar
Cutmanmike
Posts: 11335
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Re: The "How do I..." Thread

Post by Cutmanmike »

No, they will simply see the sprite that the model is replacing.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany

Re: The "How do I..." Thread

Post by Hirogen2 »

So I have (1) a true-color sprite which (2) uses a color set (a limited 32 color set still) other than the Doom green for the suit. The former makes me wonder how to do translation at all on it, and for the latter, how to set up the PlayerPawn decorate definition so that gzdoom can recolor the sprite according to the player's likes.
ShailsTSPT
Posts: 50
Joined: Tue Oct 28, 2008 3:51 am

Re: The "How do I..." Thread

Post by ShailsTSPT »

How do I make it so if a player presses use in a linedef it executes a script that shows a message on the screen of all the players in the game? PS: I only now that scripts go in the BEHAVIOR lump nothing more >.< know nothing about script and all that. But I may end up needing to use what im asking.
User avatar
Mario123311
Posts: 19
Joined: Sat May 02, 2009 1:43 pm
Location: Mushroom kingdom

Re: The "How do I..." Thread

Post by Mario123311 »

My EWX Crashed :evil: Nothing works. WHAT THE F***?!?!?!?!?!?! I open a wad file and then i get an error Message! GIVE ME A BETTER WAD MAKER AND I SHAL GET MAH SLEF A COPY OF FREEDOOMS WAD SO I WONT HAVE TO BUY DOOM!!!!!!!!!!
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Re: The "How do I..." Thread

Post by Ryan Cordell »

Calm the hell down.

You can try SlumpED, but XWE doesn't crash without a purpose. What's the error message say? (When that window pops up, press CTRL and C, then use CTRL and V when posting on this forum to paste the message.)
User avatar
Unknown_Assassin
Posts: 2468
Joined: Wed Apr 12, 2006 5:17 pm
Location: Where dead carcasses lie

Re: The "How do I..." Thread

Post by Unknown_Assassin »

Mario123311 wrote:My EWX Crashed :evil: Nothing works. WHAT THE F***?!?!?!?!?!?! I open a wad file and then i get an error Message! GIVE ME A BETTER WAD MAKER AND I SHAL GET MAH SLEF A COPY OF FREEDOOMS WAD SO I WONT HAVE TO BUY DOOM!!!!!!!!!!
It could be the fact that:
1) You're an idiot.
2) You failed to install XWE properly
3) Your computer is not set to open wad files with XWE because you need to configure that. Either set wads opened to XWE or you could right click and say "Edit with XWE." You could also drag and drop to XWE, which is easier.
4) Something else.

Return to “Editing (Archive)”