TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 21 of 21

Thread: Cannot get NVPhantomTrap to work [Solved] | additional questions

  1. #1
    Member
    Registered: Sep 1999
    Location: Portland, OR

    Cannot get NVPhantomTrap to work [Solved] | additional questions

    I was experimenting with Heat Disks on my torch, using an Emitter setup like SlipTips Fire/Water FX demo (FXDemo.zip thread).
    It's been a fun learning experience, but I realized the disks needed to fade out.
    I opened up the FXDemo.zip .cow, having read it was a script, I wanted to see how it was applied to the emitting object. Since I have never done any scripting before I also read An Introduction to Scripts.

    It seems straightforward. I wanted to test within the same .cow environment that already had NVScript already loaded so I setup a chair. But I can't get it to work?


    I tried saving a new COW and opening it. Nothing. I feel like I'm missing something basic. I went back and read on thread that ST had a longer design note, ("NVPhantomAlphaMax="1.00"; NVPhantomFadeOff="1500"; NVPhantomTrapOff="BeginScript") but that didn't even work. Sorry if it's something obvious but I've put of script stuff until this point.

    Edit: I do have the latest NVScript126.zip, beside the actual smoke objects are fading like normal.
    Last edited by gamophyte; 16th Jan 2018 at 22:51.

  2. #2
    Member
    Registered: May 2002
    Location: Texas
    Are your heat disks objects or particle SFX? I would think the NVPhantomTrap works on objects but not SFX.

  3. #3
    Member
    Registered: Sep 1999
    Location: Portland, OR
    Quote Originally Posted by john9818a View Post
    Are your heat disks objects or particle SFX? I would think the NVPhantomTrap works on objects but not SFX.
    It has to be a emitted object with heat disks, the is no particle heat disk.

    Also I'm failing at even fading a chair in my screenshot.

    Sent from my SM-G920T using Tapatalk
    - The Gamophyte
    "They settled into the depths of Cesseld, only the symbols remind us they still exist"

  4. #4
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Fields of bluegrass
    The second param should be NVPhantomTrapOff="BeginScript", since you want the TurnOff effect (fading out) to begin as soon as it's created.

  5. #5
    Member
    Registered: Sep 1999
    Location: Portland, OR
    Unless I'm missing your point, the order didn't seem to matter with SlipTip's smoke.


    Tried rearranging the begin first on chair, but no dice.

  6. #6
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    What is the alpha setting on your heat disk object in the Hierarchy? It is possible that NVPhantomTrap will not work if it is not specified explicitly, that is, an explicit alpha value is needed on these objects from which to fade.

  7. #7
    Member
    Registered: Sep 1999
    Location: Portland, OR
    Quote Originally Posted by LarryG View Post
    What is the alpha setting on your heat disk object in the Hierarchy? It is possible that NVPhantomTrap will not work if it is not specified explicitly, that is, an explicit alpha value is needed on these objects from which to fade.
    Thanks for sticking with me. I've tried both vanilla and purposely defining alpha 1.00. But from what I read it seems that it calls to the same section in the API and it doesn't matter what value is there before it will still fade from that point.

    But I think your thinking is in the right direction. Like, what is it in the properties that can make the smoke object work and the chair not, even within the same COW file loaded?

  8. #8
    Member
    Registered: Sep 1999
    Location: Portland, OR
    A little progress. Well I don't know. I went back to chair test demo in FX cow. I finally got it to work messing around with delete time. But also I changed it back and it still worked. So I have no idea. I've already tried the close dromed and try again. It just started working on it's own I guess. No idea. Now in other demo just testing heat disks and a torch, it's still not working there. I will keep hacking away.

  9. #9
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Fields of bluegrass
    No no, my point was you're setting NVPhantomTrapOn and you need to be setting NVPhantomTrapOff. You're right, the order doesn't matter.

  10. #10
    Member
    Registered: Sep 1999
    Location: Portland, OR
    Wow I kept missing that. It was even specified by Sliptip in the forum post correctly, so this must have been when I suddenly fixed the chair. I copy/pasted from above. What's odd is the smoke fx object had it ON as well. I suppose this is just my lack of knowledge with scripts. It has that "afraid of math" feeling.

    Thank you Yandros! I will have to become an expert at this if I'm going to do all the neato stuff on my list.

  11. #11
    Member
    Registered: Mar 2001
    Location: Ireland
    I suspect that alpha won't work on the heat disc because it's a rendering effect, not an actual object.

    Does applying Renderer->Transparency (Alpha) and setting it to something like 0.2 have any effect on the heat disc at all?
    If that doesn't work, then fading won't work either.

  12. #12
    Member
    Registered: Sep 1999
    Location: Portland, OR
    Quote Originally Posted by Nameless Voice View Post
    I suspect that alpha won't work on the heat disc because it's a rendering effect, not an actual object.

    Does applying Renderer->Transparency (Alpha) and setting it to something like 0.2 have any effect on the heat disc at all?
    If that doesn't work, then fading won't work either.
    Oh no you can actually. And, I got it working now, I just have to figure out a nice rhythm to where doesn't come into existence in a heartbeat like fashion. I'd fire so many that you can't recognize it but that would lag out my computer and I'm trying to be somewhat friendly for old computers with this mission.

  13. #13
    Member
    Registered: Sep 1999
    Location: Portland, OR
    Poohy. Thank for all the help but I cannot seem to make it look good without serious taxing. My last chance is maybe one large disk with a slow vertical grow while lifting away, and as soon as it slowly fades a new one fades in.

    Does NVPhantomTrapOn make it fade in? Is it possible to have a fade in on the same object? Or would I have to make a unique object that fades in to not conflict with scripts?

  14. #14
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Fields of bluegrass
    By default a TurnOn will make it fade from min alpha to max alpha. You can change the signal to be whatever by setting NVPhantomTrapOn to some other message. If you need something that fades in on creation and then fades out a certain length of time later, you need to use NVRelayTrap and NVPhantomTrap both on the archetype. Set NVPhantomTrapOn="BeginScript", and also NVRelayTrapOn="BeginScript". Then have the relay send its object TurnOff after a delay, and that will kick off the fade out.

    Code:
    NVPhantomTrapOn="BeginScript"; NVRelayTrapOn="BeginScript"; NVRelayTrapDelay=3000; NVRelayTrapTOn="TurnOff'; NVRelayTrapTDest="[me]";
    That will start the fade in on creation, and then 3 seconds later will send TurnOff to itself, which will trigger the phantom trap to start the fadeout. Play with the delay time and the On and Off times on the phantom trap until it looks like you want it.

  15. #15
    ZylonBane
    Registered: Sep 2000
    Location: ZylonBane
    What the hell happened to the thread title? Who does that?

  16. #16
    Member
    Registered: Mar 2001
    Location: Ireland
    Quote Originally Posted by Yandros View Post
    Code:
    NVPhantomTrapOn="BeginScript"; NVRelayTrapOn="BeginScript"; NVRelayTrapDelay=3000; NVRelayTrapTOn="TurnOff'; NVRelayTrapTDest="[me]";
    Any particular reason why you're saying to configure the NVRelayTrapOn to send TurnOff, rather than just using NVRelayTrapOff="BeginScript"?
    The way you've coded this, it should constantly re-trigger itself every 3 seconds because NVRelayTrapOff is still TurnOff.

    I'd go with:

    Code:
    NVPhantomTrapOn="BeginScript"; NVRelayTrapOn="null"; NVRelayTrapOff="BeginScript"; NVRelayTrapDelay=3000; NVRelayTrapTDest="[me]";

  17. #17
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Fields of bluegrass
    No reason at all, just not taking the time to think it through. Thanks for the improvement.

  18. #18
    Member
    Registered: Sep 1999
    Location: Portland, OR
    I have yet to try this; busy week, but thanks for all the valuable information guys! I will soak it up and try to learn.

  19. #19
    Member
    Registered: May 2002
    Location: Texas
    I was thinking of the disks used in particles.

    Quote Originally Posted by gamophyte View Post
    It has to be a emitted object with heat disks, the is no particle heat disk.

    Also I'm failing at even fading a chair in my screenshot.

    Sent from my SM-G920T using Tapatalk

  20. #20
    Member
    Registered: Sep 1999
    Location: Portland, OR
    EDIT2: Never mind , I got it, but see message below this one.

    You can change the signal to be whatever by setting NVPhantomTrapOn
    Yeah.. I don't understand why the relay. I don't know what you mean by signal. I am completely lost. I re-read all but there's something fundamental I'm missing. I only learned where to put script params from the FX demo but I don't understand what I'm doing.

    Am I to mix those in the same design note like this?
    Code:
    NVPhantomTrapOn="BeginScript"; NVRelayTrapOn="null"; NVRelayTrapOff="BeginScript"; NVRelayTrapDelay=5000; NVRelayTrapTDest="[me]"; NVPhantomAlphaMax="1.00"; NVPhantomFadeOff="10000"; NVPhantomTrapOff="BeginScript"
    It's not fading in then out. It just fades out.

    Edit: I have the scripts loaded
    Last edited by gamophyte; 21st Jan 2018 at 22:22. Reason: Never mind

  21. #21
    Member
    Registered: Sep 1999
    Location: Portland, OR
    Okay I kept thinking about it and what it means, and why you told me that. So I was able to realize what it was doing.

    I settled on:
    Code:
    NVPhantomTrapOn="BeginScript"; NVPhantomFadeOn="3000"; NVRelayTrapOn="null"; NVRelayTrapOff="BeginScript"; NVRelayTrapDelay=7000; NVRelayTrapTDest="[me]"
    and it seems to be working. Also I didn't get that I had to start my object on 0.00 alpha to make the transition make sense. Now I just have to play with time to make it look right. I also notice the fade out is smoooth and the fad in is hitchy. Like in almost strobing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •