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 / Problems With HUD Scripts

Author
Message
Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 31st Jan 2009 00:18
I'm trying to make the HUD show a message, then delete the message and show a new one when the TAB key is pressed. I have these scripts assigned to trigger zones in my level. Some of the commands are un-needed, but are required in the level I am making. I'm using V1.09 with Ply's Mod.

To show the first message:


And to show the next message:


The first message shows up just fine, but the second message refuses to show up. Any ideas?

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
Plystire
22
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 31st Jan 2009 02:58
In your code it says:
:state=1:hudunshow=objective
:state=2:hudshow=objective,state=1

Perhaps the reason it's not showing up is because it immediately goes back to state 1 in state 2 and unshows the hud.


The one and only,


Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 31st Jan 2009 18:17
Hm... I directly copied my previous HUD script, so that shouldn't be the problem. I'll try messing around with it. I also think I wasn't specific enough about the problem; when I press TAB when the 1st script is running, the first text fails to dissappear.

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 31st Jan 2009 18:32 Edited at: 31st Jan 2009 19:13
Nevermind the script i had here was bad, sorry.

I'll play with it, and I'll test it before I post this times.
sorry.

OOOPS i can't test it proper because I am not using Ply's Mod, so I can try to help but you'll have to test.

Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 31st Jan 2009 18:54 Edited at: 31st Jan 2009 19:04
That looks the same. What did you change?

EDIT: I saw what you changed, testing now...

EDIT 2: It hid the first HUD, but it won't show the second HUD.

EDIT 3: I tried to modify the second script, but it still doesn't work.


Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 31st Jan 2009 19:11 Edited at: 31st Jan 2009 19:12
Why are you using hudreset when you are not creating a hud???

Why are you using two scripts for this when they could both be in one?

I never liked using the HUDTEXT.
I always make an image of what I want to say like the stock messages are done. (You picked up an item)

Try using images of the text instead of using that HUDTEXT, and I think you will get better results.

Plystire
22
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 31st Jan 2009 19:47
Quote: "I also think I wasn't specific enough about the problem; when I press TAB when the 1st script is running, the first text fails to dissappear"


That's because "hudreset" doesn't make a hud disappear, you'll have to use "hudunshow" to do that.


You may also want to try using an image for your text like Conjured suggested. Aside from that, you still didn't fix what I mentioned in my first post.

Another thing to make note of in your script:
You should always load any necessary HUDs in state 0, then have the script wait in state 1. There's no reason to load a HUD in mid-script.



The one and only,


Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 31st Jan 2009 22:07 Edited at: 31st Jan 2009 22:12
Quote: "Why are you using two scripts for this when they could both be in one? "


I never thought about doing that... Wow I feel dumb.


Quote: "Try using images of the text instead of using that HUDTEXT, and I think you will get better results."


I'm not very good with graphics, but I'll try it out.

Quote: "Aside from that, you still didn't fix what I mentioned in my first post."


That shouldn't be the problem. I basically used the exact script I wrote previously that worked perfectly, with maybe 1 or 2 minor modifications.

Quote: "That's because "hudreset" doesn't make a hud disappear, you'll have to use "hudunshow" to do that."


I got the first HUD to dissappear, now the second is doesn't show up. I'll tinker with it and see what else I can do. Fixing what you pointed out is probably my problem. I'm also going to try and condense these into 1 script.

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 31st Jan 2009 22:18 Edited at: 31st Jan 2009 22:23
Sorry about the double post, but I condensed the scripts together and it worked! Everything is working, and I'm gonna mess around with the "hudfadeout=" command and see if I can make it look cooler. Here's the script as of now. It manages to make the debug info huge, but that won't be a problem one the game is built.


Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
Dar13
17
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 31st Jan 2009 22:22 Edited at: 31st Jan 2009 22:39
umm...maybe that's because you only tell it to show? here is your script optimized and (somewhat) fixed



-EDIT- fixed some small errors in the script.

I know not with what weapons WWIII will be fought but WWIV will be fought with sticks and stones-Albert Einstein
Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 31st Jan 2009 22:26
Not sure how that's gonna work, but I got the script running and it works just fine. Thanks anyway.

For everybody who helped, have one on me.

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!

Login to post a reply

Server time is: 2025-05-23 14:01:40
Your offset time is: 2025-05-23 14:01:40