Death at day , resurrect at night?

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.
Locked
User avatar
Sephiron
Posts: 300
Joined: Mon Jun 28, 2010 1:56 pm
Location: Michigun, pew pew!

Death at day , resurrect at night?

Post by Sephiron »

I want spectres to appear only during the night (outside, of course).
The way I have it set up is this (all spectres have the TID 9)

Code: Select all

                                //NIGHT
                                Thing_Raise (9);
                                //Above resurrects all spectres at night
                                ChangeSky("SKY1NIGH","");
                                Floor_RaiseByValue(6, 10, 160);
                                fadeto(0,0,20,0.8,1300);
                                delay(500);
                                        //MORNING
                                        Thing_Destroy (9, 0);
                                        //Above kills all spectres in the day
                                        Floor_lowerByValue(6, 10, 160);
                                        changesky("Sky1dawn","");
                                        fadeto(20,10,5,0.6,1100);
                                        delay(300);
                                            restart;
}
However none die and none resurrect. Is there something I'm missing?
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Death at day , resurrect at night?

Post by InsanityBringer »

A better way of doing it would probably be just to spawn them when night comes in, rather than resurrect them.

Other than that, the code does look right. Double-check your tags, perhaps.
User avatar
Sephiron
Posts: 300
Joined: Mon Jun 28, 2010 1:56 pm
Location: Michigun, pew pew!

Re: Death at day , resurrect at night?

Post by Sephiron »

InsanityBringer wrote:A better way of doing it would probably be just to spawn them when night comes in, rather than resurrect them.

Other than that, the code does look right. Double-check your tags, perhaps.
I would do that, but I can't give spawned actors tags. How would I kill them? and I just double check my tags. maybe something else is wrong?
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Death at day , resurrect at night?

Post by NeuralStunner »

Sephiron wrote:I would do that, but I can't give spawned actors tags.
Uh, yes you can. Any spawn function has a TID parameter to give to the spawned thing.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Death at day , resurrect at night?

Post by InsanityBringer »

Sephiron wrote:I would do that, but I can't give spawned actors tags. How would I kill them?
Actually, you can, [wiki]Spawn[/wiki]'s tid paramater is the tid of the spawned actor (same with SpawnSpot).

Also, post the DECORATE for the spectre.

edit: ns said the first part but still post the decorate
User avatar
Sephiron
Posts: 300
Joined: Mon Jun 28, 2010 1:56 pm
Location: Michigun, pew pew!

Re: Death at day , resurrect at night?

Post by Sephiron »

I just stole it from here
http://www.realm667.com/index.php?optio ... Itemid=137
Spoiler:
Also guys, thanks for the spawn link. Going to see if that works any better.


EDIT:

Still no luck :\
I replaced the resurrect with this

Code: Select all

Spawn ("wraith", -5649, 784, 32 , 9 , 6);
But it still doesn't spawn...

EDIT 2:

Oops, it's DEwraith. Going to see if that works...

EDIT 3:
Nope, still won't spawn.

EDIT 4:
It's odd... I was just walking around minding my own business when a wraith tried to kill me out of nowhere. He didn't spawn anywhere NEAR where I wanted him to!

EDIT 5:
Found out they were spawning at 0,0. Wtf?
User avatar
Salad Viking
Posts: 752
Joined: Tue Apr 20, 2010 8:58 pm
Location: In high orbit

Re: Death at day , resurrect at night?

Post by Salad Viking »

Sephiron wrote:EDIT 5:
Found out they were spawning at 0,0. Wtf?
Try [wiki]SpawnSpot[/wiki] instead of [wiki]Spawn[/wiki]. As for why Spawn isn't working, are you sure you're correctly using [wiki=Definitions]fixed point coordinates[/wiki]?
User avatar
Sephiron
Posts: 300
Joined: Mon Jun 28, 2010 1:56 pm
Location: Michigun, pew pew!

Re: Death at day , resurrect at night?

Post by Sephiron »

Salad Viking wrote:
Sephiron wrote:EDIT 5:
Found out they were spawning at 0,0. Wtf?
Try [wiki]SpawnSpot[/wiki] instead of [wiki]Spawn[/wiki]. As for why Spawn isn't working, are you sure you're correctly using [wiki=Definitions]fixed point coordinates[/wiki]?
Yeah, spawnspot is working now. thanks.
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

Re: Death at day , resurrect at night?

Post by ChronoSeth »

BTW, I'm quite sure that the resurrection isn't working because the wraith doesn't have a Raise state. :wink:
User avatar
Ethril
Posts: 2677
Joined: Sun Nov 16, 2008 2:59 am
Location: with you in the dark

Re: Death at day , resurrect at night?

Post by Ethril »

ChronoSeth wrote:BTW, I'm quite sure that the resurrection isn't working because the wraith doesn't have a Raise state. :wink:
And even if it did, the death state ends with a "stop" after a frame using a duration other than -1, so the actor will simply be removed at the end of its death animation. (See: Pain Elemental)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Death at day , resurrect at night?

Post by Graf Zahl »

Sephiron wrote:

Code: Select all

Spawn ("wraith", -5649, 784, 32 , 9 , 6);

Spawn uses fixed point coordinates so the above has to be:

Code: Select all

Spawn ("wraith", -5649.0, 784.0, 32.0 , 9 , 6);
Locked

Return to “Editing (Archive)”