Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / How to use a switch to destroy two triggers?

Author
Message
riccetts
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 24th Oct 2018 16:02
@ncmako
I need some help I'm trying to use a switch to destroy two triggers. Is this possible?
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 25th Oct 2018 00:09
Riccetts Yes it is very easy to do. First name the two triggers the SAME Name. They can each have their own script running.
Put the NAME of these two triggers into the "ifused" field of the "SWITCH"

Now for the two triggers/scripts running, you have to insert the command "activated=1" into both trigger scripts at just the right spot
to then "destroy" the script... or take it to an dead-end state ( unless of course they are both the same script )
Example: sound in zone, but when activated, no sound when entering zone

Another example... water already on, but when activated it turns off water.

So as you see, it depends what your script is doing at the time your activating it, and what you want it to do next
Try to finish it yourself. If after that your stuck, post the triggerzone scripts and we'll fix it
My games never have bugs. They just develop random features..
Lots and lots of random features...
Location: You know that space between a dresser and the floor? Yeah, that's where I'm at !
riccetts
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 25th Oct 2018 00:44
@ncmako
Thanks again
riccetts
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 27th Oct 2018 19:51
@ncmako
The water itself is destroyed but the fog remains. How come it does not destroy the whole script?
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 27th Oct 2018 21:36
Riccetts
Quote: "How come it does not destroy the whole script?"

As I said before, I have no idea how you setup your two scripts.
Is your fog set up in the "levelsetup.fpi" ??? Or by a script ?
Post the two scripts your trying to destroy with a single "switch" and we'll have a look at it
My games never have bugs. They just develop random features..
Lots and lots of random features...
Location: You know that space between a dresser and the floor? Yeah, that's where I'm at !
riccetts
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 27th Oct 2018 23:27
@ncmako
Ok I uploaded them both

Attachments

Login to view attachments
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 27th Oct 2018 23:56
@ Riccetts First, after activating the trigger, did you want the Dmask to disappear or still show.
You have it set to still show/display.
The water is an easy fix.
My games never have bugs. They just develop random features..
Lots and lots of random features...
Location: You know that space between a dresser and the floor? Yeah, that's where I'm at !
riccetts
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 28th Oct 2018 13:43
@ncmako
As far as the mask is concerned I can easily take it off by pressing G.
The water is the main script that I wanted destroyed by the switch.
Did I put it in the right place in the script?
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 28th Oct 2018 14:27
@ Riccetts
Quote: "Did I put it in the right place in the script?"

Yes you did. This line of code is my concern for the Dmask

When activated the mask hud appears and stays on ?
Quote: " I can easily take it off by pressing G"

Well we can have it so it un-shows the mask hud when activated, that would be easier.. yes/no ?

Now for the water, I did some testing and there is a slight bug/snag if the player is "under water" the water can NOT
be turned off. It seems to be a hard coded thing. The player just needs to be up out of the water. You can be standing
in water, just above it. So my questions is, when the "Switch" is thrown to kill the water, is it under water or above water ???
If its under water I have to re-write script so it "lowers water level " first !
My games never have bugs. They just develop random features..
Lots and lots of random features...
Location: You know that space between a dresser and the floor? Yeah, that's where I'm at !
riccetts
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 28th Oct 2018 22:36
@ncmako
Its under water.
maybe relocating the switch but your idea to let the water drain might be better.
It should be hudunshow instead of hudshow on the mask
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 30th Oct 2018 09:53
Riccetts Did some tests to make sure water switch works. First is the Dmask script.

Here is the water script. Note that I changed "waterheightofzone" to "waterheight"
Using "waterheightofzone" would not kill the water. You are going to have to adjust to your needs.
"waterheight=570 means its on Layer-5, 70% high up in that layer. If your using it on layer 4 change it to 470 or whatever. Easy

Place both in a triggerzone and give them both the Same Name. Put that name in the switch ifused field and done.
Water & mask now should disappear even underwater when switch is activated.
My games never have bugs. They just develop random features..
Lots and lots of random features...
Location: You know that space between a dresser and the floor? Yeah, that's where I'm at !
riccetts
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 30th Oct 2018 13:01
@ncmako
Thanks for your help I will test them out later.
Can I use the mask as a weapon and choose it and the hud appears instead of the mask itself?
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 31st Oct 2018 20:43
riccetts
Quote: "Can I use the mask as a weapon"

Yes, you will have to make a weapon HUD to use. lets just make sure this script works first for now
My games never have bugs. They just develop random features..
Lots and lots of random features...
Location: You know that space between a dresser and the floor? Yeah, that's where I'm at !
riccetts
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 31st Oct 2018 21:04
@ncmako
The water script didn't work right the fog is still present after the switch is activated.
When I asked you about mask as a weapon is because I'm wanting the the mask as a option to choose like a gun.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 31st Oct 2018 21:50
Riccetts Wait a minute, do you mean you have "fog" setup in your level ???
We were only working on water ( which includes the waterfog & the Dmask scripts. Nothing was said about regular "fog" ?
Did you setup fog in the levelsetup.ini.... or are you running a separate script for that ?
My games never have bugs. They just develop random features..
Lots and lots of random features...
Location: You know that space between a dresser and the floor? Yeah, that's where I'm at !
riccetts
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 1st Nov 2018 15:41 Edited at: 1st Nov 2018 16:34
@ncmako
It works right I just had to play around with the waterheigth in the script. no I didn't not tamper with the level setup at all.
So I was also trying to use the toggle mask script on the mask as a weapon.fpe so I could just choose from weapons select.
So far it hasn't worked in fact I lost the mask bmp and got a dot instead. If you could help me with this it would be great.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 2nd Nov 2018 22:59
Riccetts Ok glad you got it working correctly. Yes, play with the "waterheight" setting to adjust to your needs.
Quote: " trying to use the toggle mask script on the mask as a weapon.fpe"

No it doesn't work that way. Your going to have to make a weapon HUD to use as a mask.
Do you have Fragmotion? It's not that hard. Good time to start learning ( hint, hint )
My games never have bugs. They just develop random features..
Lots and lots of random features...
Location: You know that space between a dresser and the floor ? Yeah, that's where
riccetts
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 4th Nov 2018 23:49
@ncmako
I have it downloaded and installed. Can you explain to me how to use it?
Can i use the same DiverMask.x file that I have already?
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 5th Nov 2018 10:41
Riccetts Setup two trigger zones, each has one of the scripts attached, each zone has the SAME NAME.
I don't know your map layout, where the water starts & ends, how deep & which layers...ect.
Your going to have to figure that out in the "waterheight" settings what works best. Place a switch
and put name of "zones" in the "ifused" field. Throw switch to "activate" BOTH scripts.

Quote: "Can i use the same DiverMask.x file that I have already? "

I recall the Dmask .x files was only to "pickup the goggle entity and then trigger the "Dmask" hud, that's all.
The .x file is not used again after it's picked up.
Right now we're only activating/destroying the two scripts (the Dmask image & waterheight setting)

Right now I have a feeling that using "plrwithinzone" is going to cause problems for the Dmask goggle hud
when player is in/out of water. I really think using "plrunderwater=x" would be a better choice.
That way the Dmask hud would auto appear when player is underwater, and disappear out of water.
My games never have bugs. They just develop random features..
Lots and lots of random features...
Location: You know that space between a dresser and the floor ? Yeah, that's where

Login to post a reply

Server time is: 2024-04-18 12:53:42
Your offset time is: 2024-04-18 12:53:42