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
Andie
Posts: 53
Joined: Sun May 19, 2013 3:33 pm

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

Post by Andie »

Gez wrote:

Code: Select all

Skybox MYSKY
{
  SKYN
  SKYE
  SKYS
  SKYW
  SKYT
  SKYB
}
Yes, you need to set your map to use the "MYSKY" sky since it's the name of your GL skybox.
Can you elaborate? Will it be like this?

Code: Select all

map MAP01 "Fancy name" {
	Sky1 = "MYSKY", 0
}
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

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

Post by Gez »

Yes.
User avatar
Andie
Posts: 53
Joined: Sun May 19, 2013 3:33 pm

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

Post by Andie »

Everything works now, thank you.
albiongeck
Posts: 182
Joined: Fri Mar 16, 2012 7:11 am
Contact:

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

Post by albiongeck »

How do I place a camera texture on a floor? I've tried the steps for textures in wiki:SetCameraToTexture, but I get a corrupted mess of columns. Works fine on wall textures but I mean to place it on a slope. Is there a way for flats? I'm using software rendering and Zdoom Doom in Hexen format.

SOLVED: Use a power-of-two texture.
Last edited by albiongeck on Thu Jun 20, 2013 4:22 pm, edited 1 time in total.
Warhawk
Posts: 161
Joined: Tue Mar 27, 2012 5:48 pm

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

Post by Warhawk »

How to correctly make a monster aim at the player with ZDoom's "spawnofs_z"?

Code: Select all

     SKLL K 0 A_CustomRailgun (10,12,none,red,0,1,0,0,0,0,0,0,0,0,0,30)
     SKLL K 0 A_CustomRailgun (10,-12,none,red,0,1,0,0,0,0,0,0,0,0,0,30)
A screen will explain the problem:
Attachments
Screenshot_Doom_20130615_073846.png
Stardust
Posts: 57
Joined: Sat Jan 12, 2013 6:41 pm
Location: France

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

Post by Stardust »

Sorry for bothering with another problem, especially because it's about scripting. I "simply" want to transfer an actor's pointers toward one of its summonings.
It means, let's say there is an actor A and actor B. The actor A has the target "actor X". The actor B can't target the "actor X", but it has targetted actor A so it'll need a script to copy its target's target (this means actor A's target). Actor A's target is actor X.

Now if I'm requesting a script, it's because neither A_SpawnItemEx's SXF_TRANSFERPOINTERS flag, neither A_TransferPointers and A_ReorganisePointers work. It's like if they don't seem to exist (it causes a fatal error "invalid state parameter" when I launch the game).
Thank you in advance for any help
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

Could you post the code so we can see what's wrong?
Stardust
Posts: 57
Joined: Sat Jan 12, 2013 6:41 pm
Location: France

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

Post by Stardust »

Yes, here it is, through disregarding which actor has the SpawnItemEx pointer transfer flag or the ReorganisePointer action, it won't work. I'm pretty sure it has nothing to do with the actor's behavior, after all everyone could use at any moment a SpawnItemEx, right ? :geek:

Here's a random actor that would cause the same error message (see pictures) as any other actor that has the SpawnItemEx flag or pointer transfer stuff.

Code: Select all

actor StardustLaevateinn
{
-SOLID
-SHOOTABLE
+SEEKERMISSILE
+LOOKALLAROUND
-EXTREMEDEATH
+NOGRAVITY
+DONTBLAST
+NOTARGETSWITCH
obituary "%o should have thought two times before firing a binding circle."
+SKYEXPLODE
speed 0
scale 5.6
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("Weapon/StardustFlandruCircle", "Body")
TNT1 A 0 A_GiveInventory("StardustLaevateinnSwitch", 1)
STMP QRQRQRQRQ 4
TrembleInTerrorYourAreFinished:
STMP QRQRQRQRQRQRQRQRQRQRQRQRQRQRQRQRQRQ 4 A_LookEx(LOF_NOSOUNDCHECK | LOF_NOSEESOUND, 0, 0, 0, 360, "PrepareToBecomeSpaceDust")
stop
PrepareToBecomeSpaceDust:
TNT1 A 0 A_PlaySoundEx("Weapon/StardustRiposteFlandre", "Voice")
KYOR A 0 A_FaceTarget
KYOR A 0 A_CustomMissile("StardustLaserCounter", 0, 0, 0)
Death:
STMP QRQRQRQRQRQRQ 4
TNT1 A 0
TNT1 A 0 A_RearrangePointers(AAPTR_NULL, AAPTR_NULL, AAPTR_DEFAULT) // Look at here, look at here ! Nothing wrong with this RearrangePointer, right.
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, -80, 0, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, -80, 35, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, -80, 70, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, -80, 105, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, -80, 140, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 0, 0, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 0, 35, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 0, 70, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 0, 105, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 0, 140, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 80, 0, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 80, 35, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 80, 70, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 80, 105, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 80, 140, 0, 0, 0)
stop
}
}
The code above results in :

http://i44.tinypic.com/nlcx15.png

Code: Select all

actor StardustLaevateinn
{
-SOLID
-SHOOTABLE
+SEEKERMISSILE
+LOOKALLAROUND
-EXTREMEDEATH
+NOGRAVITY
+DONTBLAST
+NOTARGETSWITCH
obituary "%o should have thought two times before firing a binding circle."
+SKYEXPLODE
speed 0
scale 5.6
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("Weapon/StardustFlandruCircle", "Body")
TNT1 A 0 A_GiveInventory("StardustLaevateinnSwitch", 1)
STMP QRQRQRQRQ 4
TrembleInTerrorYourAreFinished:
STMP QRQRQRQRQRQRQRQRQRQRQRQRQRQRQRQRQRQ 4 A_LookEx(LOF_NOSOUNDCHECK | LOF_NOSEESOUND, 0, 0, 0, 360, "PrepareToBecomeSpaceDust")
stop
PrepareToBecomeSpaceDust:
TNT1 A 0 A_PlaySoundEx("Weapon/StardustRiposteFlandre", "Voice")
KYOR A 0 A_FaceTarget
KYOR A 0 A_CustomMissile("StardustLaserCounter", 0, 0, 0)
Death:
STMP QRQRQRQRQRQRQ 4
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, -80, 0, 0, 0, 0, SXF_TRANSFERPOINTERS) // Look at here, look at here ! Nothing wrong with this flag, yes ?
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, -80, 0, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, -80, 35, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, -80, 70, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, -80, 105, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, -80, 140, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 0, 0, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 0, 35, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 0, 70, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 0, 105, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 0, 140, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 80, 0, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 80, 35, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 80, 70, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 80, 105, 0, 0, 0)
TNT1 A 0 A_SpawnItemEx("StardustStardustRedHigh", 0, 80, 140, 0, 0, 0)
stop
}
}
This code results in :

http://i41.tinypic.com/2vjaohk.png
User avatar
jpalomo
Posts: 776
Joined: Mon May 17, 2010 9:45 am

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

Post by jpalomo »

You are using the angle argument for your flags in A_SpawnItemEx.

Code: Select all

A_SpawnItemEx("StardustStardustRedHigh", 0, -80, 0, 0, 0, 0, SXF_TRANSFERPOINTERS)
should be:

Code: Select all

A_SpawnItemEx("StardustStardustRedHigh", 0, -80, 0, 0, 0, 0, 0, SXF_TRANSFERPOINTERS)
If this is for Zandronum, I have no idea if A_RearrangePointers even works.
Stardust
Posts: 57
Joined: Sat Jan 12, 2013 6:41 pm
Location: France

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

Post by Stardust »

No I'm not :3 the fields to fill of SpawnItemEx are so easy to remember because this function's so common : X Y Z position, and then X Y Z speed. And then the 7th thing is about angle and 8th about flags.
Anyway I had some help IIRC, they said Zandronum just CAN'T make it work. As you guessed :P
Through problem solved, thanks again everyone
User avatar
KingShinra
Posts: 204
Joined: Wed Jan 26, 2011 12:28 pm
Location: 19.454.18.5.25.5.18
Contact:

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

Post by KingShinra »

Sincerest apologies. Didn't know there was a thread like this.

I want to build a script that, when Doomguy kills 12 enemies (All Tagged 1000), a sector rises with a switch to lower some bars that block the path ahead.

How would I write it. Once I have it, I'll keep it in an ACS library and study it. Help is definitely appreciated.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

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

Post by cocka »

Simple:

Code: Select all

script 1 (void)
{
	until(ThingCount(T_NONE, 1000) == 0)
	{
	delay(3);
	}
	Floor_RaiseByValue(tag, speed, height);
}
User avatar
KingShinra
Posts: 204
Joined: Wed Jan 26, 2011 12:28 pm
Location: 19.454.18.5.25.5.18
Contact:

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

Post by KingShinra »

Thanks Cocka. Much appreciated!

EDIT: Code seems right, but the floor isn't raising after I kill the monsters. Copied the code verbatim.

Anything else that might be wrong?
User avatar
BloodyAcid
Posts: 372
Joined: Thu Jul 26, 2012 10:28 pm
Location: Canadia

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

Post by BloodyAcid »

The script type should be open instead of void I think. When it's (void), you've nothing triggering the check.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

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

Post by cocka »

When it's (void), you've nothing triggering the check.
He didn't write anything about that. I suppose he just drew a line and assigned a script execute action special to it.
Copied the code verbatim.
Really?
Floor_RaiseByValue(tag, speed, height);
I wrote in this form because I thought you could fill in the named parameters logically. :oops:
Locked

Return to “Editing (Archive)”