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.
loismustdie555
Posts: 220
Joined: Thu Sep 25, 2014 2:20 pm
Location: Renton, Washington, USA

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

Post by loismustdie555 »

How can I get and return the damagetype in acs?

Something like this;
str type = damagetype[notsurewhatgoesehere];
int deathtype = strparam(s:"Death.", s:type);


But I'm not entirely sure how to go about storing damage types...
Can someone help me with this?
Or is what I'm trying to do not possible?
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

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

Post by edward850 »

It's not possible. Damage types aren't actually strings, for starters. :P
loismustdie555
Posts: 220
Joined: Thu Sep 25, 2014 2:20 pm
Location: Renton, Washington, USA

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

Post by loismustdie555 »

How do I use hudmessage to display the count of an item in the player inventory?
User avatar
XCVG
Posts: 561
Joined: Fri Aug 09, 2013 12:13 pm

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

Post by XCVG »

Is there a way to move the player to an arbitrary location? SetActorPosition doesn't seem to work.

EDIT: I hacked around it by spawning a teleport destination, but this seems like an ugly way to do it, so my question still remains.
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

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

Post by edward850 »

XCVG wrote:Is there a way to move the player to an arbitrary location? SetActorPosition doesn't seem to work.

EDIT: I hacked around it by spawning a teleport destination, but this seems like an ugly way to do it, so my question still remains.
SetActorPosition is one of the many ways you can do it, so something else is wrong with how you've done it.
loismustdie555 wrote:How do I use hudmessage to display the count of an item in the player inventory?
d:[wiki]CheckInventory[/wiki]("Shell")
User avatar
DoomKrakken
Posts: 3489
Joined: Sun Oct 19, 2014 6:45 pm
Location: Plahnit Urff
Contact:

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

Post by DoomKrakken »

Just in case this got buried...

It's been edited, btw...
DoomKrakken wrote:Still working on the Brutal Guncaster patch. I have a couple things to ask...

Firstly, I want the Pulverizer, Strucker, and Longhorn to fire tracer projectiles. I'm using the A_FireCustomMissile command to do it.

I'm not entirely sure how it works though... I want those weapons to have the same kind of spread as they normally do, however, I cannot find anything in the A_FireCustomMissile command that relates to the "angle spread_horz" and "angle spread_vert" variables in A_FireBullets.

For example... the Strucker has a horizontal spread of 7 and a vertical spread of 3 (I think). How would I make the tracer projectiles have that spread?

Secondly, I have a new idea on how Corpseblast should work in Brutal Guncaster (since the way it originally works doesn't work in Brutal Doom).

I was thinking that the spell would deal 1 damage (with damagetypes Corpseblast, or Corspeblast2 if tomed, assigned to them), and every actor but the corpses would have DamageFactor "Corpseblast", 0.0 and DamageFactor "Corpseblast2", 0.0. The corpses themselves would probably have DamageFactor "Corpseblast", 50000; DamageFactor "Corpseblast2", 0.0; DamageFactor "Flesh", 0.0; and PainChance "Corpseblast2", 255.

That being said, if the corpse actor is hit with "Corpseblast", then it'll go to Death.Corpseblast, and from there, spawn the corresponding blasted corpse actor. If hit with a tomed Corpseblast, "Corpseblast2", then the corpse actor will go to Pain.Corpseblast2, so that it doesn't die when it spawns the corresponding blasted corpse actor. My question here is what part of the Corpseblast DECORATE code should deal the damage in the first place?
Spoiler: CorpseBlast DECORATE Code, for those of you who do not have Guncaster open at the moment...
Thanks. :)

P.S.: Can an actor go into a pain state from another actor that deals no damage to it?
loismustdie555
Posts: 220
Joined: Thu Sep 25, 2014 2:20 pm
Location: Renton, Washington, USA

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

Post by loismustdie555 »

In my mod it doesn't seem to want to refresh the count.
Am I doing something wrong?

script 3794 OPEN
{
HudMessage(s:"XP: ",d:CheckInventory("555PointDummy");1,4,CR_GREEN, 0, 2, 0.1, 0.8, 3.7);
Delay(1);
Restart;
}
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

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

Post by edward850 »

Yes. The world doesn't have an inventory, so an OPEN script is obviously not what you want, there. :P
loismustdie555
Posts: 220
Joined: Thu Sep 25, 2014 2:20 pm
Location: Renton, Washington, USA

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

Post by loismustdie555 »

edward850 wrote:Yes. The world doesn't have an inventory, so an OPEN script is obviously not what you want, there. :P
I assumed an ENTER script?

It doesn't work either :(
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

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

Post by edward850 »

loismustdie555
Posts: 220
Joined: Thu Sep 25, 2014 2:20 pm
Location: Renton, Washington, USA

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

Post by loismustdie555 »

I had 555PointDummy as custominventory, I set it to ammo and it worked fine. :D
User avatar
zrrion the insect
Posts: 2432
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

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

Post by zrrion the insect »

How would I add an intro sequence to a wad?
I'm looking for something similar to the intro for strife, but using a mapinfo intermission doesn't seem the way to go as Inter_Strife_Intro is commented out in mapinfo/strife.txt. Am I missing something?
User avatar
Vincent(PDP)
Posts: 60
Joined: Fri May 16, 2014 3:49 pm
Location: Sweden
Contact:

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

Post by Vincent(PDP) »

loismustdie555 wrote:I had 555PointDummy as custominventory, I set it to ammo and it worked fine. :D
Also see the Inventory class.
Barrelsofun
Posts: 5
Joined: Sun Aug 16, 2015 2:28 pm

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

Post by Barrelsofun »

Okay, I am really stumped. How do I make it so an actor enters a pain state when players and only players touch it and change the target to them for an A_GiveToTarget. I spent 2 days trying to figure this out yet I can't.
User avatar
kodi
 
 
Posts: 1361
Joined: Mon May 06, 2013 8:02 am

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

Post by kodi »

Use these flags:
BUMPSPECIAL
THINGSPEC_ThingTargets
and set the actors action special to ACS_EXECUTE, pointing to a script which contains GiveActorInventory(0, "Bumpcounter",1);
Then have your custom inventory item "bumpcounter" put it's carrier into a custom pain2 or something state where an A_GiveToTarget is executed.

I haven't tested this though, but I believe it should work. Rather convoluted, and there might be some other, obvious way I'm not seeing.
Locked

Return to “Editing (Archive)”