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
lwks
Posts: 212
Joined: Thu May 28, 2015 9:19 pm
Location: Fucking Brazil

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

Post by lwks »

My error:

Code: Select all

Execution could not continue.

Script error, "Hellspawn v1.x.wad:DECORATE" line 58:
Expected ')', got '=='.

My code

Code: Select all

actor MinionRevenant : Revenant replaces Revenant
{
  DropItem "RocketAmmo"
  States
  {
  Death:
    SKEL LM 7
    SKEL N 7 A_Scream
	SKEL N 0
	{
		if (GetCVAR(hs_hierarchy == 1)) {      //LINE 58 IS HEAR \o/
			A_SpawnItemEx("ChaingunGuySpawner",0,0,0,0,0,0);
		} if (GetCVAR(hs_hierarchy == 2)) {
			A_SpawnItemEx("ShotgunGuySpawner",0,0,0,0,0,0);
		}
	}
    SKEL O 7 A_NoBlocking
    SKEL P 7
    SKEL Q -1
    Stop
  }
}
Nice error I got here
Some1 can help me?
Thanks in advance
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

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

Post by Matt »

Mav3r1ck wrote:
Spoiler:
This is what I did. I'm guessing I'm missing something?
I copypasted your code without any changes and summoned the ball. It worked exactly as I thought.

Remember, unless you change that number you have to be within 256 units of the ball when it explodes for it to work. (Now that I try it out it seems a little close, so maybe 512-1024?)

Also, why are you giving it 10 times? (2 zero-length frames both calling it, each one giving 5 of the items at once)
User avatar
worldendDominator
Posts: 291
Joined: Sun May 17, 2015 9:39 am

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

Post by worldendDominator »

lwks wrote:Nice error I got here
Some1 can help me?
Thanks in advance
I think it should be like this:

Code: Select all

if (GetCVAR(hs_hierarchy) == 1)
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

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

Post by Gez »

BFG wrote:just wondering if it is possible or not.

I've noticed that if you use PNG for your player's sprite, it will automatically be changed to the Doom's palette in order for the green color to be changed.
I've also noticed when monsters from other games, such as Duke's Assault Trooper & Captain they can not be palette translated with a code, or the same thing would happen, so they would both need their own separate sprites in order to have their correct original color.

So I wonder, since SLADE has palettes for many games, why can they not be included with GZDoom? And with a tag on the actor would be something like:

Code: Select all

SetPalette "Name of Game"
This would assign that sprite to the colors of that chosen palette so that they can now be translated correctly, and of course the same thing can be done with the player with ColorRange.
Having a "palette" property for actors was an item for the long-abandoned doom64 branch, because that's how that game does it -- the baron and hell knights, for example, use the exact same sprites, but a different palette.

As for including palettes in GZDoom -- no need. If and when multiple palette support is added, then it'll be up to each mod to include the palettes they need.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

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

Post by Graf Zahl »

In the context of ZDoom, a 'palette' could simply be implemented by allowing to load translations from some form of graphics file instead of defining them as ranges.
User avatar
Expect No Mercy
Posts: 45
Joined: Sun Mar 18, 2012 1:43 am

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

Post by Expect No Mercy »

DoomKrakken wrote:I think this is doable...

Code: Select all

HealThing(Random(0,100))
Doh! Such simple. :bang:
Thanks!
User avatar
TheRailgunner
Posts: 1556
Joined: Mon Jul 08, 2013 10:08 pm

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

Post by TheRailgunner »

How do I make a double-jump for a player?
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 »

I've seen examples in both Parkmore (which has a double jump) and Guncaster (which has 4-12 jumps). Maybe look in there?

If you're looking through Guncaster, I'd suggest looking through GUNCASTER.acs.
Expect No Mercy wrote:
DoomKrakken wrote:I think this is doable...

Code: Select all

HealThing(Random(0,100))
Doh! Such simple. :bang:
Thanks!
No problem. :D
User avatar
TheRailgunner
Posts: 1556
Joined: Mon Jul 08, 2013 10:08 pm

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

Post by TheRailgunner »

DoomKrakken wrote:I've seen examples in both Parkmore (which has a double jump) and Guncaster (which has 4-12 jumps). Maybe look in there?

If you're looking through Guncaster, I'd suggest looking through GUNCASTER.acs.
Honestly, no part of the Guncaster double jump code makes sense to me - I'm trying to get this to work, but I can't get it to detect the jump or trigger only when pressed, not held:

Code: Select all

script "DoubleJump" ENTER {	
	int input = GetPlayerInput(-1, INPUT_BUTTONS);
	int a_jumps = 0;
	//int input;
	While(1) {
		Delay(1);
		if ((input & BT_JUMP) & (GetActorVelZ((1000 + PlayerNumber())) != 0)) {
				a_jumps++;
				//SetAJumpVel();
				//SetActorProperty(0, APROP_Gravity, 0.94);
				//SetActorVelocity(0, 0, 0, 16.0, 0, 0);
				ThrustThingZ((1000 + PlayerNumber()),12,0,0);
				Delay(1);
		}
	}
}
User avatar
Zan
Posts: 338
Joined: Sat Oct 22, 2016 12:43 pm
Location: The depths of Hedon.
Contact:

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

Post by Zan »

Hey, everyone, I am working on the gorey structure of my game, and realised that rendering blood is not that simple. Moreover, I am unsure of what options I even have at my disposal.

In your opinion, what is the most satisfying form of rendering and implementing blood? I'm talking about both the graphical aspect and the implementation one.

From what I understand, Doom has 3 blood sprites which it just pops according to the amount of damage dealt. However, I read on wiki that Zdoom also allows for blood splats to stick to walls and stuff. How do you modify those? (For example, if I want to create an animated blood sprite and give it some X/Y/Z momentum, how do I tell the engine to use it when the monster is hit? Also, how to I change the graphic decals of wall splats?)

And generally, if someone knows anything important about this topic, I'd be grateful for some info before I dive into it.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

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

Post by Matt »

TheRailgunner wrote:detect the jump or trigger only when pressed, not held:

Code: Select all

int oldinput = GetPlayerInput(-1, MODINPUT_OLDBUTTONS);
...
if ((input & BT_JUMP) && (!(oldinput & BT_JUMP)))
I'd recommend using MODINPUT for the current input as well:
The MODINPUT_* series check the values after they have been processed by the game engine. These may be different if, for example, the player is fully or partially frozen (Movement inputs will be nulled) or is using a weapon such as the chainsaw which alters the player's input to include forward movement.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

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

Post by Nevander »

How do you give an obituary to a projectile fired through ACS in a map? I have both Obituary and HitObituary defined on the projectile itself which I imagine should be working, but it always says that I "died" when they kill me.
User avatar
Namelessdeity
Posts: 51
Joined: Tue Apr 10, 2012 7:10 am
Location: Canada

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

Post by Namelessdeity »

Using the +WALLSPRITE variable, how can I make a stop sign and not have the back of the sprite being a reverse image of the main sprite?
Something like this
Image
User avatar
ZZYZX
 
 
Posts: 1384
Joined: Sun Oct 14, 2012 1:43 am
Location: Ukraine
Contact:

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

Post by ZZYZX »

Two wallsprites. One displays front, another back.
The problem here however is that we don't have a flag that makes wallsprites draw only the front side (unless we do).

The closest for road signs (i.e. wallsprites that are not aligned by pitch, only rotated at most) would be this: https://zdoom.org/wiki/Actor_properties#VisibleAngles

Code: Select all

        +MASKROTATION;
        VisibleAngles -90, 90;
        VisiblePitch -180, 180;
If you want it to work reliably with any actor pitch, you'd need to calculate it yourself with arcane vector maths and use this action.

Alternatively you can also use sprite rotations and make frame 1 (forward) the front side, and frame 5 (back) the back side. Not sure if ZDoom allows incomplete frame sets though (only 1 and 5), and that will also be buggy if you modify wallsprite's pitch/roll. Not sure if ZDoom allows sharp transition between front and back side either, because with regular 1-5 sprite frames the 90 degree angle would always be represented using '3'.

I personally like VisibleAngles/VisiblePitch approach more in this case.
Last edited by ZZYZX on Wed Mar 01, 2017 9:36 am, edited 1 time in total.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

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

Post by Nevander »

What I would do personally is to make the front and back side into a transparent mid-texture, and then in-map draw a 32 unit wide (or however wide) line where I want the sign to be and then give the right sides the front or back side of the sign, then make the line impassible.
Locked

Return to “Editing (Archive)”