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 / Show direction of hit/damage on hud

Author
Message
Effanz
16
Years of Service
User Offline
Joined: 30th Nov 2007
Location:
Posted: 22nd Aug 2009 17:40
Hi, Im fairly new to scripting in FPSC. I have tried searching the forum for an answer to my question but had no luck. I was wondering if it was possible to have a hud display the direction in which the player is hit? If it is possible does anyone know if there is a script floating around to do this or how it might be done? Thanks a lot
anayar
15
Years of Service
User Offline
Joined: 19th Aug 2009
Location: Minneapolis, MN
Posted: 22nd Aug 2009 20:50
Are you thinking of a map whch shows which all the enemies are(kind of like in Ghost Recon), or a HUD which shows dots or something where the firing is coming from??

A.N
Wazoo117
15
Years of Service
User Offline
Joined: 11th Dec 2008
Location: Coarsegold, CA
Posted: 23rd Aug 2009 03:39
The second one is the one he is looking for, so am I...

MASSIVE Multiplayer game in the works. [href]www.wazoo117.webs.com[/href]
EGG HEAD OF DOOM
16
Years of Service
User Offline
Joined: 21st Sep 2008
Location: The Hacked Hospital Lobby
Posted: 23rd Aug 2009 06:25
you might need a mod, but that idea that i would use is:

make the directional blood hud image.

make a script for the character that shoots at you, that would rotate the hud inage corrisponding to the characters grid position.

i don't think there are any commands for that stuff in stock fpsc, but if you can find a mod that has those (Project Blue most likely) and out it together.

anayar
15
Years of Service
User Offline
Joined: 19th Aug 2009
Location: Minneapolis, MN
Posted: 10th Sep 2009 04:17
are you sure there arent any other free mods which do this??? I cant seem to be able to figure it out with Apple Juice mod, but maybe another one???

A.N
Bugsy
16
Years of Service
User Offline
Joined: 24th Nov 2008
Location: another place in time
Posted: 11th Sep 2009 20:23
plys mod is free, and does this. try that.
Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 11th Sep 2009 22:30
Quote: "plys mod is free, and does this"

Really?!! there was nthn in the manual regarding this.. any idea how?

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 14th Sep 2009 05:08
The jist of how this is going to work is:
- When an enemy shoots at the player, find out if it hit the player (Using a global script to determine if the player got it, as well as a per-entity trigger to find out which one hit it)
- When you know an entity hit the player and which one, have it trigger a portion of that enemy's script.
- The part of that enemy's script is going to find out what angle the entity is from the player (general angle, if nothing else) and trigger a global script that will show the HUD that's needed as well as fade it in/out.


It's not exact science because you don't have a proper programming language to do it the professional looking way, but it'll get the basic job done.


The one and only,


Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 14th Sep 2009 23:01
after almost 4 hours of scripting I finally did it Thanks

DarkFrost
15
Years of Service
User Offline
Joined: 3rd May 2009
Location: ON, Canada
Posted: 14th Sep 2009 23:46
Care to share? Im curious of how you performed this task.


Alt Schule
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: In Your Mind
Posted: 15th Sep 2009 00:17
Yes, don't be a tease. Do share your findings.


EGG HEAD OF DOOM
16
Years of Service
User Offline
Joined: 21st Sep 2008
Location: The Hacked Hospital Lobby
Posted: 15th Sep 2009 02:22
and maybe share a little more...just maybe

Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 15th Sep 2009 02:52 Edited at: 15th Sep 2009 02:56
sure why not this community has given me so much

the easiest way I've got it to work so far is editing the enemie's AI script and adding the following..

loading the direction huds (basic shapes are in the attached file just place it directly in the Files folder)


right after the line telling the entity to shoot the player add these lines


this is a full AI with the script added


u might wanna edit the state number as suits ur AI script..

I have another idea in mind to make it more realistic i'll share it once it's complete...

Attachments

Login to view attachments
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 15th Sep 2009 21:19
Wow Bibo4PC, i always admire you for that generosity, ofcourse i admire other users also. But after reading posts above like:
Quote: "Yes, don't be a tease. Do share your findings."
, ... wow didnt really expected it.

Did you people actually heard what he said:
Quote: "after almost 4 hours of scripting I finally did it Thanks"



Anyways good job. Great Job.


anayar
15
Years of Service
User Offline
Joined: 19th Aug 2009
Location: Minneapolis, MN
Posted: 16th Sep 2009 03:45
Ya guys, dont be rude now...
Anyways, thanks a lot Bibo4PC, now all i have to do is make some decent looking huds....

ahhhh s#%t....JK

A.N
Talairina
18
Years of Service
User Offline
Joined: 9th Jan 2006
Location: United Kingdom
Posted: 18th Sep 2009 00:29
Very impressive Bibo4PC. Great script and works wonderfully well. Very kind of you to share it too. Should I decide to use it expect credits on my game (Not quite sure if I want a 'show direction of fire' script yet).
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 18th Sep 2009 01:28
Congrats, Bibo! Nice script. I'm glad to see you were able to make it with the super-simple instructions I gave. I completely forgot to mention the angle padding when checking, but you seemed to have solved that quite nicely. Great work!


The one and only,


Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 18th Sep 2009 04:58 Edited at: 18th Sep 2009 04:59
Thanks everyone I really appreciate it.. glad u like it

nikas
15
Years of Service
User Offline
Joined: 23rd Apr 2009
Location:
Posted: 18th Sep 2009 12:49
i used it but why the huds dont appear?i saw that they were working cause fpsc created dds files but the huds didnt appeared on the game why?

Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 19th Sep 2009 11:48 Edited at: 19th Sep 2009 12:06
@Bibo4PC: Well the only thing i can say is that you will be credited in Teraborus - The Begin of the Solaris for this awesome script, it works perfectly i will edit it to my likings, but it is already awesome as it is.

I am gonna do a test room with third person with all stock. And post a screen. Expect a edit.

EDIT: Here are three shots, with Custom WIP Third Person in the working and that awesomness of Biobo4pc his script.





@Bibo4PC: Yep it is cool. No doubts.


nikas
15
Years of Service
User Offline
Joined: 23rd Apr 2009
Location:
Posted: 19th Sep 2009 12:15
help me why doesnt it works for me?

Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 19th Sep 2009 12:19
did you placed the damage huds that bibo4pc premade for you in your files folder of your fpsc dir? and just copy the whole AI full into a fpi edit pad make the changes u need (u dont need any if you just want to test it out) then make it a .fpi and place it in the main of a character


nikas
15
Years of Service
User Offline
Joined: 23rd Apr 2009
Location:
Posted: 19th Sep 2009 13:43
i did all this things the ai is working damage huds in the correct folder in my fpsc dir tested it out and saw that the damage huds had the dds files but they dont appeared it the test

Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 19th Sep 2009 13:49
DDS? I believe they must be in png.


nikas
15
Years of Service
User Offline
Joined: 23rd Apr 2009
Location:
Posted: 19th Sep 2009 13:56
if fpsc reads the png it then makes the dds files....so fpsc reads the huds but dont show them...

Alt Schule
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: In Your Mind
Posted: 19th Sep 2009 14:36
Thanks for sharing this breakthrough. It's a great addition.

Just to clarify: This script will work only with Ply's Mod. Correct?


Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 19th Sep 2009 17:07
Yeah.


Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 19th Sep 2009 18:54 Edited at: 19th Sep 2009 20:14
@Red Eye: thx it's greatly appreciated and good luck with ur game

@nikas: did u use the AI posted above or did u modify ur own?

Login to post a reply

Server time is: 2024-11-25 06:47:01
Your offset time is: 2024-11-25 06:47:01