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.
Barrelsofun
Posts: 5
Joined: Sun Aug 16, 2015 2:28 pm

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

Post by Barrelsofun »

I think I found a way, but theres one last thing. How do I make the player have a constant "Explosion" around them that activates the item?

I have this, but it doesn't work

Code: Select all

actor SpringCheck : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
+INVENTORY.AUTOACTIVATE
+INVENTORY.UNDROPPABLE
States
{
Spawn:
TNT1 a -1
stop
Use:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("SpringCheck2", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
loop
}
}

actor SpringCheck2
{
+Ripper
+DONTSPLASH
+NOGRAVITY
+MISSILE
+SKYEXPLODE
+NOINTERACTION
+NOCLIP
+NOTIMEFREEZE
+FORCEPAIN
+NOBLOOD
speed 0
Damagetype "Spring"
Damage 0
States
{
Spawn:
SPRR A 2 A_Explode(1,24,0)
stop
}
}
When I give myself the inventory item, It thinks the item is repeating without a delay so it freezes the game for a while before terminating it, even though I have a delay (1) before the loop.
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 »

You cannot delay a use state. All actions must occur instantly seeing as it's called and must return to the inventory management, and looping it will hard-lock ZDoom.
Barrelsofun
Posts: 5
Joined: Sun Aug 16, 2015 2:28 pm

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

Post by Barrelsofun »

Alright, I got the spring object to work correctly. Does anybody know how to make a player face the same direction as an object he touches? If you could answer me, that would be great.
C343
Posts: 49
Joined: Sat Jun 20, 2015 1:50 pm

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

Post by C343 »

Is there any possible way to have a certain animation play for when you first draw your weapon? I was thinking for example, the Rifle, when you would select it for the first time, the animation changes to you pulling the bolt back. But when you return back to it, he just pulls it out like normal.
Barrelsofun
Posts: 5
Joined: Sun Aug 16, 2015 2:28 pm

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

Post by Barrelsofun »

C343 wrote:Is there any possible way to have a certain animation play for when you first draw your weapon? I was thinking for example, the Rifle, when you would select it for the first time, the animation changes to you pulling the bolt back. But when you return back to it, he just pulls it out like normal.
You could add this to your weapon ready state

Code: Select all

actor WeaponStart : Inventory
{
inventory.amount 1
inventory.maxamount 1
}
...
...
Ready:
TNT1 A 0 A_JumpIfInInventory("WeaponStart", 1, "Ready2)
TNT1 A 0 A_GiveInventory("WeaponStart", 1)
D2JK
Posts: 545
Joined: Sat Aug 30, 2014 8:21 am

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

Post by D2JK »

I'm trying to add a primary fire key which also gives the player an item. I have this in KEYCONF:

Code: Select all

AddMenuKey "New primary fire"				+Attack; "Give MyItem"
The attack works but the item is not given. What I noticed is that the standard primary fire key changes in sync with my custom menu key. Now, this is just my speculation, but I wonder if the game is detecting the "+Attack" command in my custom key, and mapping the key to the standard fire command instead, which of course does not have the item giving command.

If that's true, what would be the best way to work around this?
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 Hudmessageonactor along with a Dynamic TID Assigner in a script?

I've tried, here's my attempt, but it doesn't work

Code: Select all

script "NameTag" (void) 
{
	int Cucumber = UniqueTID();
	Thing_ChangeTID(0, Cucumber);
	Str nametag = (GetActorProperty(0, APROP_NameTag));
	If(GetActorProperty(0, APROP_HEALTH) > 5)
	{
	hudmessageonactor(cucumber, cucumber, 640, 480, 0, -120, 512, -1, StrParam(n:nametag), 0.1, CR_GREEN);   //   Displays nametags
	hudmessageonactor(cucumber, cucumber, 640, 480, 0, -112, 512, -1, StrParam(s:"Health: ",d:GetActorProperty(cucumber, APROP_Health),s:"%"), 0.1, CR_WHITE);   //   Displays health
    }
	Delay(1);
}
And in decorate under spawn is

Code: Select all

TNT1 A 0 ACS_NamedExecuteAlways("NameTag", 0)
Kagur
Posts: 165
Joined: Fri Mar 14, 2014 12:40 am

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

Post by Kagur »

Does anyone have an ACS script that allows two actors to be bound to each other with a medium (like a rope or chain) and can only jump and move around at the rope length limit?

Something like this(only longer):
Spoiler:
User avatar
jacob_jub
Posts: 9
Joined: Tue Jul 28, 2015 1:47 pm

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

Post by jacob_jub »

How do i make the episode selection screen create a second column instead of going off screen if you have too much?
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 »

You cannot modify the episode selection screen. It's created by the engine. Considering it turns into a basic list after ~8 entries, you need to rethink your episode situation.
User avatar
jacob_jub
Posts: 9
Joined: Tue Jul 28, 2015 1:47 pm

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

Post by jacob_jub »

edward850 wrote:You cannot modify the episode selection screen. It's created by the engine. Considering it turns into a basic list after ~8 entries, you need to rethink your episode situation.
Really? So i cant even make in centered?
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 »

Not sure what you mean there. It's centered by design, as is everything else menu related.
User avatar
jacob_jub
Posts: 9
Joined: Tue Jul 28, 2015 1:47 pm

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

Post by jacob_jub »

Not the episode screen. This is what mine looks like.

Image

P.S I just moved this from Doom 1 to 2 other than the music is there anything else i need to grab from doom 1?
User avatar
Stormwalker
Posts: 100
Joined: Mon Sep 05, 2011 10:22 pm

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

Post by Stormwalker »

I am trying to create a situation where, after the player selects his episode, class, and difficulty he is treated to an opening slideshow before he can begin the first level of play. Currently I have it set up through ACS so that upon entering the level, the player is given a slideshowstarter, and I've defined the intermission referenced by the slideshowstarter in ZMAPINFO. The slideshow plays fine, but just before it begins the player can see the opening level because there is a slight delay between when he enters the level and when he is given the slideshowstarter. I've tried to overcome this by using the FADERANGE actor function in ACS, which works okay at first, but when I try to implement the CANCELFADE actor function with a DELAY on it to turn off the palette flash after the slideshow, nothing happens. Does anyone know why CANCELFADE isn't doing its job in this instance?
User avatar
TheBadHustlex
Posts: 1914
Joined: Thu Oct 03, 2013 12:50 am
Location: 'stria

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

Post by TheBadHustlex »

My problem: Those sectors tagged 75 are both on the same height. Now, I want both of them to be used via Platform_Lower_Wait_Raise, at the same time.
That doesn't really work, though. I think I understand why, because the middle-sector always is at it's target-height when it's executed, but what could I do? Floor_MoveToValue is a bit tedious here since there are lots of those platformsat different heights in the map.
Locked

Return to “Editing (Archive)”