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.

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

Postby Jimmy » Mon May 04, 2009 2:08 pm

0x7fffffff.

That's zero-x-seven-seven f's. :D
User avatar
Jimmy
 
 
 
Joined: 10 Apr 2006
Discord: Jimmy#4100
Twitch ID: JimmySquared
Operating System: Windows 10/8.1/8/201x 64-bit

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

Postby Deathman101 » Mon May 04, 2009 2:20 pm

How do I use the arguments you can set in lines like ACS_Execute?
User avatar
Deathman101
 
Joined: 25 Sep 2008

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

Postby bagheadspidey » Mon May 04, 2009 2:28 pm

SoulPriestess wrote:Every separate translation gets its own quote mark set.
Code: Select allExpand view
Translation "112:127=208:223", "192:207=16:31"


Ahh, good to know. And now that Translation is overhauled I see that information was already on the wiki after all =p
User avatar
bagheadspidey
 
Joined: 20 Oct 2007

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

Postby ThatOneZDoomer » Tue May 05, 2009 8:31 am

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 allExpand view
Translation "112:127=208:223", "192:207=16:31"

That solved the problem, thanks.
User avatar
ThatOneZDoomer
Still too lazy for a new avatar
 
Joined: 01 Jun 2008
Location: Where I'm at of course

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

Postby Rachael » Tue May 05, 2009 10:18 am

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
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby DoomerMrT » Tue May 05, 2009 2:48 pm

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 allExpand view
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.
User avatar
DoomerMrT
 
Joined: 21 Nov 2006
Location: Budapest,Hungary

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

Postby skadoomer » Tue May 05, 2009 8:00 pm

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 allExpand view
      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.
skadoomer
 
Joined: 05 Sep 2003

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

Postby Mik57 » Tue May 05, 2009 9:18 pm

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
Mik57
Play Sigmata. It eats children.
 
Joined: 27 Jul 2008
Location: Phelan, California

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

Postby Captain Ventris » Tue May 05, 2009 11:37 pm

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
Captain Ventris
Buy my novel, “The Shadow Among The Stars” on Amazon or Itch.io!
 
Joined: 31 Jul 2006
Location: St. Louis, Missouri

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

Postby Cutmanmike » Wed May 06, 2009 2:40 am

No, they will simply see the sprite that the model is replacing.
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom
Discord: https://discord.gg/Whts7Bj
Operating System: Windows Vista/7/2008 64-bit

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

Postby Hirogen2 » Sat May 09, 2009 9:57 pm

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.
User avatar
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

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

Postby ShailsTSPT » Sun May 10, 2009 5:21 am

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.
ShailsTSPT
 
Joined: 28 Oct 2008

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

Postby Mario123311 » Sun May 10, 2009 12:32 pm

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
Mario123311
 
Joined: 02 May 2009
Location: Mushroom kingdom

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

Postby Ryan Cordell » Sun May 10, 2009 12:41 pm

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
Ryan Cordell
PDA Man
 
Joined: 06 Feb 2005
Location: Capital of Explodistan
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia (Modern GZDoom)

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

Postby Unknown_Assassin » Sun May 10, 2009 1:34 pm

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.
User avatar
Unknown_Assassin
Bow down to the Protoss Race!!
 
Joined: 12 Apr 2006
Location: Where dead carcasses lie

PreviousNext

Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 0 guests