FreeSpace Releases > Scripting Releases

Script: flicker glowmaps of dying ships

<< < (2/4) > >>

zookeeper:

--- Quote from: m!m on November 27, 2011, 06:40:18 am ---Nice script, I've been working on something similar :yes:
Here are a few things I noticed:

Is there a reason why you don't use the "deactivate-glow-maps" SEXP? That might be faster than doing texture replacement.
--- End quote ---

Well, yes, that deactivates all glow maps, whereas I want to exclude debris-glow.


--- Quote from: m!m on November 27, 2011, 06:40:18 am ---Your "On State End" may be executed although the game is still in the gameplay state (for example when you pause the game). You could use the "On Mission Start/End" hooks here to avoid unintended behavior.
--- End quote ---

I guess you're right about pausing. However, the "On Mission Start/End" hooks are at least as problematic, because they don't get triggered when you quick-restart the mission after you die. Stuff like this is notoriously difficult to deal with as far as I've discovered, due to that unfortunate feature.

Basically, as silly as it sounds, there's no hook/condition combination which would trigger when the gameplay part of a mission starts. Unless I'm missing something.

m!m:

--- Quote from: zookeeper on November 27, 2011, 07:51:44 am ---Well, yes, that deactivates all glow maps, whereas I want to exclude debris-glow.

--- End quote ---
Hmm, why don't you want to disable debris-glow?


--- Quote from: zookeeper on November 27, 2011, 07:51:44 am ---I guess you're right about pausing. However, the "On Mission Start/End" hooks are at least as problematic, because they don't get triggered when you quick-restart the mission after you die. Stuff like this is notoriously difficult to deal with as far as I've discovered, due to that unfortunate feature.

Basically, as silly as it sounds, there's no hook/condition combination which would trigger when the gameplay part of a mission starts. Unless I'm missing something.

--- End quote ---
The last times when I used that hook it worked as expected even when doing a quick start. You can do initialization when the gameplay starts by doing it in the first execution of the "On Frame"-hook. You will have to check for "mn.getMissionTime() ~= 0" or you will get some weird results when doing a quick start as some things are not initialized correctly then.

zookeeper:

--- Quote from: m!m on November 27, 2011, 08:31:33 am ---
--- Quote from: zookeeper on November 27, 2011, 07:51:44 am ---Well, yes, that deactivates all glow maps, whereas I want to exclude debris-glow.

--- End quote ---
Hmm, why don't you want to disable debris-glow?
--- End quote ---

Because "debris" is the damage texture I use on -destroyed models, and its glowmap shouldn't flicker, because it isn't used to represent lights, windows, engine glows etc that the other glowmaps are used for.


--- Quote from: m!m on November 27, 2011, 08:31:33 am ---
--- Quote from: zookeeper on November 27, 2011, 07:51:44 am ---I guess you're right about pausing. However, the "On Mission Start/End" hooks are at least as problematic, because they don't get triggered when you quick-restart the mission after you die. Stuff like this is notoriously difficult to deal with as far as I've discovered, due to that unfortunate feature.

Basically, as silly as it sounds, there's no hook/condition combination which would trigger when the gameplay part of a mission starts. Unless I'm missing something.

--- End quote ---
The last times when I used that hook it worked as expected even when doing a quick start. You can do initialization when the gameplay starts by doing it in the first execution of the "On Frame"-hook. You will have to check for "mn.getMissionTime() ~= 0" or you will get some weird results when doing a quick start as some things are not initialized correctly then.

--- End quote ---

I tested, and no, $On Mission Start hooks do not run when doing a quick restart (the one you can pick when you die, not the restart option from the pause menu). When you start a mission, that hook runs before the briefing comes up so I don't think it's ever been triggered by a quick restart.

Actually I think we should add a $On Mission Gameplay Start hook which would run whenever the gameplay of a mission starts. Would make stuff like this a whole lot easier to do.

Alan Bolte:
Did using "mn.getMissionTime() ~= 0" instead of $On Mission Start and ending the script with $On Mission End not work for you then zookeeper?

Nighteyes:
M!M might this make you finish the death roll script?? :P

its a shame people waste time working on the same thing...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version