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 / Huds won't repeatedly show. [ERROR]

Author
Message
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 12th Jun 2011 06:49
Ok so I have this code:




For some reason, the hud doesn't keep on showing(it only shows once).

I looked at the dooruse script and it makes no sense on why it works and mine doesn't...

Here is the dooruse:




Does anyone see why mine doesn't work but this does?

God help me, Please.

Come on down to my site at Unleashed FPSCreators
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 12th Jun 2011 13:41
I've not tested it, but on the first line you set x=1, then on the third line you only show the HUD when x<>1 so this may be your problem.

I also see that on the forth line you may x=z, but z is not defined as a variable in this script, do you have z defined as a global variable somewhere else?

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 12th Jun 2011 17:53
@Ched80
The x=z thing is a mistake, but in my actual script(it is a hit detector) I set the var to equal health. So the hud comes in and goes away but when I change the health again it doesn't work.


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 13th Jun 2011 06:23
Could someone test this for me(it is a hit detector). What it is suppose to do is show a hud when the entities health changes. Right now it shows but doesn't go away(until the entity is dead).


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators

Attachments

Login to view attachments
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 13th Jun 2011 10:17
Hi Beastmode,

I tested your script and I have found your problem. You do not need the last line in the script. Instead move "hudfadeout=" to the line above and then the script works. This is because "hudfadeout=" only initiates the HUD to fade out. Repeatedly calling hudfadeout, repeatedly starts the fade out routine so, in effect, it never fades out.

I also think, however, that your code can be simplified with the use of the "shotdamage=X" condition. This condition is true if the shot damage recieved by the entity is greater than X. So all you need to do is set up your HUD and then use ":shotdamage=1:" to check if the entity has been shot and display the HUD. I modified your script, tested it and it worked.

Sorry, I should have realised this earlier.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 13th Jun 2011 17:51
Wow, I understand why in the dooruse script the fadeout is on the same line. It makes sense now.
The only thing that I don't get is the shotdamage thing. I never knew that the value reset like that. Could you post that shotdamage script in here for me to see?
Thanks for everything Ched80.


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 13th Jun 2011 18:43
I don't have the script on this machine, but it was something like:



Suprisingly simple

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 13th Jun 2011 18:48
Wow, does that work with grenades as well? Either way, Thanks.


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 13th Jun 2011 18:59
I think we just created the first ever hitmarker system!


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 13th Jun 2011 21:30
Ched80 could you try out the finished Hitmarker script for me and tell me what you think? Thanks.

Download it here.


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 14th Jun 2011 12:24
Beastmode,

I'll download it tonight and try it. Depedning on when I get home, you may have to wait until tomorrow morning for the answer.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 14th Jun 2011 15:29
Thanks.


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 15th Jun 2011 11:12
Beastmode, I've got your scripts, ddn't manage to test it this morning but I'll have time on the train this evening so i'll post when I get home. It looks good, but I may add some mods to it, if you don't mind.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 15th Jun 2011 20:58
Beastmode,

I tested it and it works, but the HUD is off center and looked a bit odd.

I've modified two of the scripts to try and re-center is and also add some limb detection. So now if you shoot the guy in the head you get a little "Headshot!" prompt. Similarlu if you shoot them in the arm or leg you get a "Dead arm!" or "Dead leg!" prompt and if you shoot them elsewhere on the body you get the "Heart breaker!" prompt.

The new prompts only work if the limbs have been defined within the character's fpe file. I tested it used the AI (unarmed) stock character and it worked. I'm not sure if you can simply copy across the limb data for this entity to the other stock entities.

I also slightly modified the shoot script. You don't need to re-define the local health variable - the variable is local to the entity so it was already defined in the main script. Similarly with the HUD, you don't need to re-define this in the shoot script.

Feel free to take my mods out, i was just playing with the commands and thought your hitmaker was a good opportunity to test it

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]

Attachments

Login to view attachments
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 16th Jun 2011 01:54
@Ched80
I added your modifications to the download. They were great! I also made sure to credit you.


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators

Login to post a reply

Server time is: 2024-11-24 08:29:11
Your offset time is: 2024-11-24 08:29:11