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 hudanim=

Author
Message
Snake675
FPSC Reloaded TGC Backer
7
Years of Service
User Offline
Joined: 6th Apr 2012
Location: Planet Earth
Posted: 31st Mar 2013 10:55
Hi there

There are many scripting commands but some of them are poorly documented and lack examples.

Does someone know how the script action hudanim= works exactly?

Thanks for your kind answers,

snake67

------------------------------------------------------------
i5 2.8 GHz 64bit / 4G ram / W7 home sp1 / geforce gts 250
FPSC 120 Beta 3
Corno_1
8
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 31st Mar 2013 14:50
Before you next time create a thread, look at this post. There is a complete syntax with very good explanations.

http://forum.thegamecreators.com/?m=forum_view&t=180924&b=23

3.12.2.19 HUDANIM=X
Description: This defines the file path to the animated HUD image.
Range: X = File name (*.bmp, *.dds, *.jpg, *.png, *.tga)
Example:
:state=0:hudreset,hudx=50,hudy=90,hudanim=gamecore\huds\TestTubes\Pre
ssEnterToUse.png,hudname=usedoorprompt,hudhide=1,hudmake=display


Snake675
FPSC Reloaded TGC Backer
7
Years of Service
User Offline
Joined: 6th Apr 2012
Location: Planet Earth
Posted: 31st Mar 2013 20:00
Yes sir, i did.

I would like to ask the same, because it didt help. Does someone know what it does exactly. Whats the diference to the common hud. The definition looks exactly the same. The picture file isnt animated because its no gif.

Thanks anyway,

snake67

------------------------------------------------------------
i5 2.8 GHz 64bit / 4G ram / W7 home sp1 / geforce gts 250
FPSC 120 Beta 3
Flatlander
FPSC Tool Maker
12
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 1st Apr 2013 04:11 Edited at: 1st Apr 2013 04:15
hudanim needs to be in tga format. The tga picture file is actually a grid or tile based image. Here is a jpg representation of a tga 1024x1024 image used for animation.



The following is download link for the TGA file (1.8 MB zip)

http://www.olivetreegames.com/files/TGC_images/dRv-anim-powerLines01-01.zip

I see that in the source code there is an iteration of 11 passes and creates a tga file for each pass. I'm really not sure how this works, yet. When you use "hudanim" you will also have to set hudmake to "anim" (hudmake=anim). Also, you will need to set the correct value for "hudtype". It looks like there are only 4 possibilities according to the source code.

1=lives
2=health
3=ammo
11=blip

I don't know how this differs from the numeric huds for the same (lives,health,ammo).

So, I'm still clueless as how it all fits together or works. It looks like one will need to do some trial and error before they can figure it out. At least it looks like it might work now. Back in 2006-2008 it didn't work. The code was the same for hudanim and huimage. No difference. At least there's a difference now and it seems to approach the possibility of animation.

Good luck to that person who wants to start working at it.


I'm addicted to programming and coffee!
Snake675
FPSC Reloaded TGC Backer
7
Years of Service
User Offline
Joined: 6th Apr 2012
Location: Planet Earth
Posted: 1st Apr 2013 05:21
@flatlander

Thanks! Thats what I wanted to know.

Greetings, snake67

------------------------------------------------------------
i5 2.8 GHz 64bit / 4G ram / W7 home sp1 / geforce gts 250
FPSC 120 Beta 3
Flatlander
FPSC Tool Maker
12
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 1st Apr 2013 14:11
I was hoping that this could be a start. If you find a a way to make it work it would be really cool to post it here. I may not work on it as I have a lot of other things I need to do. If I was sure other types could be used I would be more excited about it.

I wonder if Black Fox has worked with it? Hey guuyyy! You out there someplace?


I'm addicted to programming and coffee!
Teabone
Valued Member
13
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 1st Apr 2013 18:36
I didn't know there was a hud animating command o_O

Flatlander
FPSC Tool Maker
12
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 1st Apr 2013 18:59
Quote: "I didn't know there was a hud animating command "


Unfortunately most of us don't know how it works yet. Somebody might know. Like Scene Commander or Black Fox.


I'm addicted to programming and coffee!
Snake675
FPSC Reloaded TGC Backer
7
Years of Service
User Offline
Joined: 6th Apr 2012
Location: Planet Earth
Posted: 6th Apr 2013 22:41
Hi

Ok. I tried something:



Attached this to main of a marker, but it does absolutely nothing

Is there something i did wrong?

Snake67

------------------------------------------------------------
i5 2.8 GHz 64bit / 4G ram / W7 home sp1 / geforce gts 250
FPSC 120 Beta 3
ncmako
7
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 7th Apr 2013 20:52 Edited at: 7th Apr 2013 20:54
Hi Snake675
This caught my interest and I also tried to make it work, to no avail I could not. I thought it had possibilities. I did find this online from about 2006 by a rockstevens?
Quote: "
Type:ACTION

Description:Set the filename X of the animation sequence(exclude#.TGA).
Syntax:HUDANIM=X

Simple Example:
(If ALL the CONDITIONS are TRUE then it will perform the ACTIONS once).

;Artificial Intelligence Script

;Header

desc = Simple HUDANIM Example

;Triggers

:state=0,plrdistwithin=50:state=1,hudanim=X

Used in FPSC V1 Scripts:

No Specific Examples.

"

Used in FPSC V1??? Also I noticed in several places this "exclude#.TGA" So no .tga's? So I take it has to used as an "Action" not condition as when setting up ones HUD?
Flatlander
FPSC Tool Maker
12
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 7th Apr 2013 21:04
I'm not sure that it works yet; even though there has been some changes made to the actual command. I wouldn't spend any more time on it for now.


I'm addicted to programming and coffee!
BlackFox
FPSC Master
11
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 7th Apr 2013 21:20 Edited at: 7th Apr 2013 21:31
Apologies...comment withdrawn... wrong thread.


There's no problem that can't be solved without applying a little scripting.
rolfy
13
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 7th Apr 2013 21:20 Edited at: 7th Apr 2013 22:53
Isn't this only for numerics? Probably hard coded to change frames for numerals in health, ammo etc, which currently uses a tga sprite image and not font, I dont think it was ever intended for full blown animated huds. With the right kind of tinkering it might be usable in some way if wanting to change current numeric huds to something more graphic.

Quote: "Used in FPSC V1??? Also I noticed in several places this "exclude#.TGA" So no .tga's? So I take it has to used as an "Action" not condition as when setting up ones HUD?"

Probably to exclude a number shown when going from triple to double or single figures, otherwise it would use 010 instead of simply 10.


If you want animated huds then this works:
http://forum.thegamecreators.com/?m=forum_view&t=166815&b=24

And I have attached a simple animated nightvision hud to this post for download.

Original thread:
http://forum.thegamecreators.com/?m=forum_view&t=123027&b=24

I don't trip over...I do random gravity checks.

Attachments

Login to view attachments
ncmako
7
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 8th Apr 2013 02:25
@Flatlander I agree, spent too much time on this already
Well spent on other things. Also(off topic)if you have time check out this rock stevens at www.rockstevens.com. Found an early form of an FPI Script Editor "FPEye" Interesting.


@Rolfy
Quote: "Probably hard coded to change frames for numerals in health, ammo "

That's what I thought after awhile, ones choices for hud-type are lives,health & ammo.
Yes, your animated hud is what I used and studied to start making my own. Luv that hud, great work!
Now the "Night vision" hud I didn't have yet. Thank you for the link. Superb work as always. Will definitely use this

Login to post a reply

Server time is: 2019-06-25 10:28:42
Your offset time is: 2019-06-25 10:28:42