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 / Replaceimage=

Author
Message
Akanto10
14
Years of Service
User Offline
Joined: 24th Apr 2010
Location: Earth
Posted: 16th May 2011 02:48
I have made a script that uses GUI-9 to make an armor representation HUD. Here it is:



It just stays on the a100.dds and doesn't change when I step into a hurt zone. Why?

I believe I should put a smart comment here, but I wouldn't have time to think about it.
bobochobo
16
Years of Service
User Offline
Joined: 9th Jul 2008
Location: My house, in the middle of my street
Posted: 16th May 2011 11:24
I'm not familiar with armour scripts but try changing the hurt zone to take off armour 'points' instead of health.

All browsers should come with compulsory spell checks.

Akanto10
14
Years of Service
User Offline
Joined: 24th Apr 2010
Location: Earth
Posted: 17th May 2011 02:14
The armor script works so that any damage your health takes goes to the armor and sets the health back to what it was before you got hurt, so that's not the issue. Thanks for the post though.

Thanks,
Akanto

I believe I should put a smart comment here, but I wouldn't have time to think about it.
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 17th May 2011 10:37
I don't think replaceimage is the correct command to use here as it does not update the HUDs associated with the updated image.

Your better off creating all your HUDs a100 to a0 at the start and then use showhud= for the latter part of your script.

Also - did you know WASP mod already includes armour - have you thought about using WASP?

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Akanto10
14
Years of Service
User Offline
Joined: 24th Apr 2010
Location: Earth
Posted: 17th May 2011 22:44
Ched80,

A couple of questions:

1. I have 101 pictures to show/hide and it really lags the engine, so is there any possible way I could do it with GUI-9?
2. Does WASP have armor that recharges? Does it stop recharging when hurt? Does it subtract health while you have armor?
3. Is WASP for v1.18?

I believe I should put a smart comment here, but I wouldn't have time to think about it.
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 17th May 2011 23:30
1. You can do it with GUIx9, but replaceimage is not the function to use on its own - try adding "updategui" at the end of each line.
From a design point. Do you really need 101 pictures? Will the player notice the difference between 100% and 99%? Maybe show every 2% or 5%?

2. The armour doesn't recharge automatically - you'd have to script that, but WASP provides you with $ARM which is the value of the armour aswell as dedicated armour commands - WASP automatically calculates the damage taken by the armour and the player. Check out the WASP manual (you can download it on the WASPv2 thread.

3. WASPv2 is built on v118 Beta 14 i think - it's currently in beta (like v118) when v118 goes gold - i beleve WASPv2 will.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Akanto10
14
Years of Service
User Offline
Joined: 24th Apr 2010
Location: Earth
Posted: 23rd May 2011 22:58 Edited at: 23rd May 2011 23:22
Ched80, sorry for the slow reply, I had some business to attend to.

I have tried putting "updategui" at the end and it still doesn't work. I have pretty much given up on GUI-X9, and have taken half the pictures away, as 101 pictures was TOO smooth and it really lagged the engine, and every 5% was too choppy, so every 2% is fine (51 pictures). Question - Is $ARM a global variable that can be acquired when you use "dimvar=(variable name)" and "setvar=(variable name) $ARM"? If so, it is probably easier to use that instead of Ply's armor script, assuming that health is never taken AT ALL, unlike his, which sets the damage as a temporary variable and recharges it automatically.

Thanks for your help,
Akanto

EDIT: It seems that they haven't a v1.18.17 version out yet, so I'll have to wait to get that $ARM internal variable.

I believe I should put a smart comment here, but I wouldn't have time to think about it.
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 24th May 2011 07:46
$ARM is an internal variable, much like $PH in stock FPSC, and just like $PH you can you use it with setvar=(variablename) $ARM.

WASP isn't based on 118B17 yet, but I believe the last version was based on v118B16. I think a new version is due when v118 goes gold.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Akanto10
14
Years of Service
User Offline
Joined: 24th Apr 2010
Location: Earth
Posted: 24th May 2011 22:49 Edited at: 30th May 2011 04:47
Ched80,

Thanks for all your help,
Akanto

EDIT: I've figured that since I want to use LRMod when it comes out, I would use the standard animated HUD representation method, and having a HUD display every 2% worked well and smooth without lagging the engine.

I believe I should put a smart comment here, but I wouldn't have time to think about it.

Login to post a reply

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