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 / Trigger zone: Door opens and hud image plays

Author
Message
Toffeemouse
14
Years of Service
User Offline
Joined: 29th Apr 2010
Location: United Kingdom
Posted: 21st Jun 2012 00:10
Hello, can anyone suggest how i fix this script i have made:



I can get the door to open fine, but no image will play. Have also tried making two seperate scripts and overlapping trigger zones, same result.



BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 21st Jun 2012 02:41 Edited at: 21st Jun 2012 02:52
First, I'd recommend defining your hud(s) in the beginning of the state lines. It makes it easier to keep it organized. So your beginning would be like this:



Why the "state=0:state=1" line? In case you want to add more huds to the script, then you only need to add more "state=0" lines and define the additional hud(s).

Next, you have a few syntax errors. For example, "timerstart" is an action, not a condition as you defined in your "state=3" line. Also there is no way your hud will come up because it never reaches the line to actually show it. In addition, you called the hud "openhatch", but when wanting to show it you gave an incorrect name of "welcome" (the hudfadeout name is correct).

You might try something like this:



The last line will loop back to "state=1", but if you only want to show the hud once, change the line to read ":state=5:none". Hope that helps.


Twitter: @NFoxMedia
Ross tra damus
3D Media Maker
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Looking to Escape London
Posted: 21st Jun 2012 02:43 Edited at: 21st Jun 2012 02:48
Toffeemouse

Your Hud image folder should be in the FPSC 'gamecore/huds' folder.

I don't think you can make your own hud directories.

Quote: ":state=10,plrwithinzone=1:hudshow=welcome,state=2"


In the line above shouldn't your hud be called 'openhatch' and not 'welcome'?
Plus I don't think you need the very last 'state=1' line.


Don't forget to delete all '.BIN and .DBO' files before retesting.

EDIT - BlackFox beat me to it so stick with BlackFox's corrections.
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 21st Jun 2012 02:49
Good catch, Ross. I edited my post and have "PATH" so the proper path can be put in that spot.

We normally put our huds in the "languagebank\English\gamecore\NorthernFox\GAMENAME\" folder, but everyone has their own preference.


Twitter: @NFoxMedia
Toffeemouse
14
Years of Service
User Offline
Joined: 29th Apr 2010
Location: United Kingdom
Posted: 21st Jun 2012 10:33 Edited at: 21st Jun 2012 10:53
Brilliant, thanks Blackfox and Ross tra damus, the script now works.
I put that path in because I wasn't happy that fpsc was splitting half my assets into a program files folder and half of them into a folder on my desktop, now I know I just have to type the full location in if it originally wants to use a file from the documents folder (Why does it create that folder anyway?)




Would it be possible to play a letterboxed video rather than an image using this script? I have used ply and redeyes animated title script in the past to create animation by playing many frames:



I'm not 100% sure how this would work in this script,



I dont know where to begin on this, i think "hudshow=openhatch" is an issue as this would range from 'openhatch' to 'openhatch4'. In addition, can these files be bmp/jpg/png rather than dds? Ideally it would play a six second animation of a door opening and closing.

Thanks



Login to post a reply

Server time is: 2024-11-24 01:13:27
Your offset time is: 2024-11-24 01:13:27