PointLight problem

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Re: PointLight problem

Postby Hell-met » Fri Oct 01, 2021 5:08 pm

Enjay wrote:As for why ours both work and your doesn't - it's very difficult to tell unless you actually send us your file to check.


I'm unsure of what I'm doing, so here you go
You do not have the required permissions to view the files attached to this post.
Hell-met
 
Joined: 28 Oct 2019

Re: PointLight problem

Postby Enjay » Fri Oct 01, 2021 5:19 pm

I actually meant your whole project file - because those little bits work just fine for me.

I'm still not fully clear on what you want to do or what you are trying to do with your item.

Do you want to make it so that your NewSphere is a stand-alone item that does not depend on anything else and can only be in a map if you place it there yourself? (In which case it will need an editor number (e.g. the 2000 that Logan used)).

or

Do you want to make it so that your NewSphere automatically replaces an existing item (such as the GreenArmor)? (In which case use the "replaces" syntax that I had in my example).

or

Something else?

At the moment, unless you have given your sphere an editor number in your MAPINFO lump, there is no way for it to appear in a map. When it does appear (using either of the above methods that Logan and I have shown you) it works: it appears in a map and it has a light.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: PointLight problem

Postby Hell-met » Fri Oct 01, 2021 5:25 pm

Well my wad will not have unique maps, it's entirely meant to be played on ID's content. So I use "replaces" methods. But doing so does not create the dynamic light it's supposed to.

What should I do with the fix you provided? Do I merge it in my wad somehow? I'm very new to this.
Hell-met
 
Joined: 28 Oct 2019

Re: PointLight problem

Postby Enjay » Fri Oct 01, 2021 5:31 pm

Have you tried just changing the first line of your item definition in your file from:

Code: Select allExpand view
ACTOR NewSphere : Health

to
Code: Select allExpand view
ACTOR NewSphere : Health replaces GreenArmor

:?:

That should be all that's needed provided your GLDEFS file is also in your project. By doing that, everywhere there was a GreenArmor in the id levels, there will now be your new sphere - with its light.

If it doesn't work for you, I'm struggling to figure out why because it works just fine for me.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: PointLight problem

Postby Hell-met » Fri Oct 01, 2021 5:38 pm

Yes, however I want it to replace more than the green armor. Blue armor and blursphere aswell.

I've copied the script all over the place but now it says it's defined more than once. What's the point of inheritance if it doesn't inherit all properties such as dynamic lights?
Hell-met
 
Joined: 28 Oct 2019

Re: PointLight problem

Postby Enjay » Fri Oct 01, 2021 5:43 pm

Hell-met wrote:Yes, however I want it to replace more than the green armor. Blue armor and blursphere aswell.

Let's just get it working for one thing then we can worry about the rest later.

Hell-met wrote:I've copied the script all over the place but now it says it's defined more than once.

Well, that's because you copied it several times. It is now defined more than once.

Hell-met wrote:What's the point of inheritance if it doesn't inherit all properties such as dynamic lights?

Like I explained, you often don't want it to inherit the dynamic lights because the thing you are replacing it with might look very different. I mean, if your NewSphere is replacing the GreenArmor, you don't want it to inherit a green light do you?
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: PointLight problem

Postby Hell-met » Fri Oct 01, 2021 5:51 pm

Ah ha I figured it out!

its because I had to define my replacement actors in gldefs (comically named Yeet). It wasn't the fault of the sphere itself it's the dummies that cause the replacement that needed to be told what to do.

thank you guys nonetheless, great community :D
You do not have the required permissions to view the files attached to this post.
Hell-met
 
Joined: 28 Oct 2019

Previous

Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest